diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index a49f720a..5b3b8ae2 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,36 +1,36 @@ -speakeasyVersion: 1.545.0 +speakeasyVersion: 1.639.3 sources: Gusto-App-Int-OAS: sourceNamespace: gusto-app-int-oas - sourceRevisionDigest: sha256:163ef8c7de4ae2582c583b9b7677d80714669b03f45459c01f6dff9b2d3afbfb - sourceBlobDigest: sha256:87c1c61661402940b9497a0f9aa072ec0c8aff318aaedae2ca5ab49a21a2e0b2 + sourceRevisionDigest: sha256:763b0f1aa6b5a021f9a68413d552f56eea8bacf6cd4d7a97cbcf85cd4f80e426 + sourceBlobDigest: sha256:e85cffc0c9f45958efde6d930f721669b5794c54aa43bae0952a85bc45987d9f tags: - latest - - speakeasy-sdk-regen-1744935831 + - speakeasy-sdk-regen-1758759857 - "2024-04-01" Gusto-OAS: sourceNamespace: gusto-oas - sourceRevisionDigest: sha256:44e7b8dfa1de649a098ce98b82b05e5d12f7f1a796ac2f22d2a86b00acf18c1e - sourceBlobDigest: sha256:c0cca1c776a150a8b06dff09b846d29eadc2b7fd26b470f65725d97b395049db + sourceRevisionDigest: sha256:bcd537d09c28142ec47a4fbd170415dd04e909aa6cb22fb7c03c4cab418f3394 + sourceBlobDigest: sha256:0529b1a27f222fc5806f1be56d3e09d0709d2f84bb8258c9ee2b5492fb608f24 tags: - latest - - speakeasy-sdk-regen-1744935831 + - speakeasy-sdk-regen-1758759857 - "2024-04-01" targets: gusto: source: Gusto-OAS sourceNamespace: gusto-oas - sourceRevisionDigest: sha256:44e7b8dfa1de649a098ce98b82b05e5d12f7f1a796ac2f22d2a86b00acf18c1e - sourceBlobDigest: sha256:c0cca1c776a150a8b06dff09b846d29eadc2b7fd26b470f65725d97b395049db + sourceRevisionDigest: sha256:bcd537d09c28142ec47a4fbd170415dd04e909aa6cb22fb7c03c4cab418f3394 + sourceBlobDigest: sha256:0529b1a27f222fc5806f1be56d3e09d0709d2f84bb8258c9ee2b5492fb608f24 codeSamplesNamespace: gusto-oas-python-code-samples - codeSamplesRevisionDigest: sha256:1971fbb55b78f1604821ab018302b82dbd2be3c5d72aa576a54ecfd04a955c94 + codeSamplesRevisionDigest: sha256:c36cc20a4ef62dc8b94a5b5eef838f2c16e21dd7f20554fffe00304f59e1f793 gusto-app-int: source: Gusto-App-Int-OAS sourceNamespace: gusto-app-int-oas - sourceRevisionDigest: sha256:163ef8c7de4ae2582c583b9b7677d80714669b03f45459c01f6dff9b2d3afbfb - sourceBlobDigest: sha256:87c1c61661402940b9497a0f9aa072ec0c8aff318aaedae2ca5ab49a21a2e0b2 + sourceRevisionDigest: sha256:763b0f1aa6b5a021f9a68413d552f56eea8bacf6cd4d7a97cbcf85cd4f80e426 + sourceBlobDigest: sha256:e85cffc0c9f45958efde6d930f721669b5794c54aa43bae0952a85bc45987d9f codeSamplesNamespace: gusto-app-int-oas-python-code-samples - codeSamplesRevisionDigest: sha256:c00ed11b6f8344da2be1583a11c63c5e7c998c07039b4f7b3dfd0150b54554d0 + codeSamplesRevisionDigest: sha256:c803c9ebbe9efafc2ad689bfcda2ff6b74f23fe1a2103cbafb48b914a692704b workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/RELEASES.md b/RELEASES.md index e1e795d0..58984826 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -88,4 +88,14 @@ Based on: ### Generated - [python v0.3.0] gusto_app_int ### Releases -- [PyPI v0.3.0] https://pypi.org/project/gusto_app_integration/0.3.0 - gusto_app_int \ No newline at end of file +- [PyPI v0.3.0] https://pypi.org/project/gusto_app_integration/0.3.0 - gusto_app_int + +## 2025-10-27 00:26:59 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.639.3 (2.730.5) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.4.0] gusto_app_int +### Releases +- [PyPI v0.4.0] https://pypi.org/project/gusto_app_integration/0.4.0 - gusto_app_int \ No newline at end of file diff --git a/gusto_app_int/.gitignore b/gusto_app_int/.gitignore index 32b5e095..58aad17f 100644 --- a/gusto_app_int/.gitignore +++ b/gusto_app_int/.gitignore @@ -1,3 +1,5 @@ +.env +.env.local **/__pycache__/ README-PYPI.md **/.speakeasy/temp/ diff --git a/gusto_app_int/.speakeasy/gen.lock b/gusto_app_int/.speakeasy/gen.lock index 93ff5f36..6e8813eb 100644 --- a/gusto_app_int/.speakeasy/gen.lock +++ b/gusto_app_int/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 307f4640-0d05-4c9e-b275-cb7fc716aa23 management: - docChecksum: 61d4e03d26263eadcc71201cb2154ed2 + docChecksum: bcc79ae6ca6436ca66b1e9588ca0267b docVersion: "2024-04-01" - speakeasyVersion: 1.545.0 - generationVersion: 2.599.0 - releaseVersion: 0.3.0 - configChecksum: 3b380c7ad141e44bd4cfc6861d590598 + speakeasyVersion: 1.639.3 + generationVersion: 2.730.5 + releaseVersion: 0.4.0 + configChecksum: 4b20710f5bb2c222b43dabe68517cfef repoURL: https://github.com/Gusto/gusto-python-client.git repoSubDirectory: gusto_app_int installationURL: https://github.com/Gusto/gusto-python-client.git#subdirectory=gusto_app_int @@ -16,18 +16,18 @@ features: additionalDependencies: 1.0.0 additionalProperties: 1.0.1 constsAndDefaults: 1.0.5 - core: 5.18.0 + core: 5.23.0 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 enumUnions: 0.1.0 envVarSecurityUsage: 0.3.2 flatRequests: 1.0.1 flattening: 3.1.1 - globalSecurity: 3.0.3 + globalSecurity: 3.0.4 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 globalServerURLs: 3.1.1 - groups: 3.0.0 + groups: 3.0.1 inputOutputModels: 3.0.0 methodArguments: 1.0.2 methodSecurity: 3.0.1 @@ -35,12 +35,11 @@ features: nullables: 1.0.1 responseFormat: 1.0.1 retries: 3.0.2 - sdkHooks: 1.0.1 + sdkHooks: 1.1.0 serverIDs: 3.0.0 - unions: 3.0.4 + unions: 3.1.0 generatedFiles: - .gitattributes - - .python-version - .vscode/settings.json - USAGE.md - docs/models/accruingtimeoffhour.md @@ -49,6 +48,9 @@ generatedFiles: - docs/models/addresses.md - docs/models/admin.md - docs/models/agencies.md + - docs/models/aggregation.md + - docs/models/amounttype.md + - docs/models/approver.md - docs/models/authentication.md - docs/models/base.md - docs/models/benefits.md @@ -86,15 +88,8 @@ generatedFiles: - docs/models/contractor.md - docs/models/contractoronboardingstatus.md - docs/models/contractorpayment.md - - docs/models/contractorpaymentforgroup.md - - docs/models/contractorpaymentforgrouppaymentmethod.md - - docs/models/contractorpaymentforgroupstatus.md - - docs/models/contractorpaymentforgroupwagetype.md - - docs/models/contractorpaymentgroup.md - - docs/models/contractorpaymentgroupminimal.md - - docs/models/contractorpaymentgroupminimalstatus.md - - docs/models/contractorpaymentgroupstatus.md - - docs/models/contractorpaymentgrouptotals.md + - docs/models/contractorpaymentdetailslist.md + - docs/models/contractorpaymentdetailslistpaymentmethod.md - docs/models/contractorpaymentmethod.md - docs/models/contractorpaymentpaymentmethod.md - docs/models/contractorpaymentsmodel.md @@ -105,12 +100,15 @@ generatedFiles: - docs/models/contractorpaymentsummarybydatestotal.md - docs/models/contractorpaymentwagetype.md - docs/models/contractorsmodel.md + - docs/models/contractorssortby.md - docs/models/contractortype.md - docs/models/contribution.md + - docs/models/contributionexclusion.md - docs/models/coverageamount.md - docs/models/coveragesalarymultiplier.md - docs/models/currentemploymentstatus.md - docs/models/customfieldtype.md + - docs/models/days.md - docs/models/deductaspercentage.md - docs/models/deductionreducestaxableincome.md - docs/models/deductions.md @@ -126,10 +124,12 @@ generatedFiles: - docs/models/deletev1employeerequest.md - docs/models/deletev1employeesemployeeidrehirerequest.md - docs/models/deletev1employeesemployeeidterminationsrequest.md + - docs/models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md - docs/models/deletev1homeaddresseshomeaddressuuidrequest.md - docs/models/deletev1jobsjobidrequest.md - docs/models/deletev1webhooksubscriptionuuidrequest.md - docs/models/deletev1webhooksubscriptionuuidsecurity.md + - docs/models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md - docs/models/deletev1workaddressesworkaddressuuidrequest.md - docs/models/department.md - docs/models/earningtype.md @@ -143,8 +143,13 @@ generatedFiles: - docs/models/employeebenefitforcompanybenefitvalue.md - docs/models/employeebenefitsmodel.md - docs/models/employeecompensations.md + - docs/models/employeecurrentemploymentstatus.md - docs/models/employeecustomfield.md - docs/models/employeededuction.md + - docs/models/employeehomeaddress.md + - docs/models/employeeonboardingdocumentsconfig.md + - docs/models/employeeonboardingstatus.md + - docs/models/employeepaymentmethod.md - docs/models/employeesmodel.md - docs/models/employeeworkaddress.md - docs/models/employmenthistorylist.md @@ -163,12 +168,16 @@ generatedFiles: - docs/models/garnishment.md - docs/models/garnishmentchildsupport.md - docs/models/garnishmenttype.md + - docs/models/generalledgerreport.md - docs/models/getcompaniescompanyuuidtimetrackingtimesheetsrequest.md - docs/models/getcompaniesdepartmentsrequest.md + - docs/models/getcompanynotificationsheaderxgustoapiversion.md + - docs/models/getcompanynotificationsrequest.md - docs/models/getdepartmentrequest.md - docs/models/getemployeeytdbenefitamountsfromdifferentcompanyrequest.md - docs/models/geteventsrequest.md - docs/models/geteventssecurity.md + - docs/models/getreportsrequestuuidrequest.md - docs/models/gettimetrackingtimesheetstimesheetuuidrequest.md - docs/models/getv1benefitsbenefitidrequest.md - docs/models/getv1benefitsbenefitsidrequirementsrequest.md @@ -177,15 +186,18 @@ generatedFiles: - docs/models/getv1companiescompanyidadminsrequest.md - docs/models/getv1companiescompanyidcompanybenefitsrequest.md - docs/models/getv1companiescompanyidcontractorpaymentcontractorpaymentrequest.md - - docs/models/getv1companiescompanyidcontractorpaymentgroupsrequest.md - docs/models/getv1companiescompanyidcontractorpaymentsrequest.md - docs/models/getv1companiescompanyidcontractorpaymentsresponsebody.md + - docs/models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md + - docs/models/getv1companiescompanyidcontractorspaymentdetailsrequest.md - docs/models/getv1companiescompanyidcustomfieldsrequest.md - docs/models/getv1companiescompanyidearningtypesrequest.md - docs/models/getv1companiescompanyidemployeesheaderxgustoapiversion.md - docs/models/getv1companiescompanyidemployeesrequest.md - docs/models/getv1companiescompanyidlocationsrequest.md - docs/models/getv1companiescompanyidpayperiodsrequest.md + - docs/models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md + - docs/models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md - docs/models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md - docs/models/getv1companiescompanyidpayrollspayrollidrequest.md - docs/models/getv1companiescompanyidpayrollsqueryparaminclude.md @@ -193,13 +205,15 @@ generatedFiles: - docs/models/getv1companiescompanyidpayschedulesassignmentsrequest.md - docs/models/getv1companiescompanyidpayschedulespayscheduleidrequest.md - docs/models/getv1companiescompanyidpayschedulesrequest.md + - docs/models/getv1companiescompanyidtimeoffrequestsheaderxgustoapiversion.md + - docs/models/getv1companiescompanyidtimeoffrequestsrequest.md - docs/models/getv1companiescompanyidunprocessedterminationpayperiodsrequest.md - docs/models/getv1companiescompanyuuidcontractorsrequest.md - docs/models/getv1companiesrequest.md + - docs/models/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md - docs/models/getv1companybenefitscompanybenefitidemployeebenefitsrequest.md - docs/models/getv1companybenefitscompanybenefitidrequest.md - docs/models/getv1compensationscompensationidrequest.md - - docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md - docs/models/getv1contractorscontractoruuidrequest.md - docs/models/getv1employeebenefitsemployeebenefitidrequest.md - docs/models/getv1employeesemployeeidcustomfieldsrequest.md @@ -208,16 +222,19 @@ generatedFiles: - docs/models/getv1employeesemployeeidemploymenthistoryheaderxgustoapiversion.md - docs/models/getv1employeesemployeeidemploymenthistoryrequest.md - docs/models/getv1employeesemployeeidgarnishmentsrequest.md + - docs/models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md - docs/models/getv1employeesemployeeidhomeaddressesrequest.md - docs/models/getv1employeesemployeeidjobsqueryparaminclude.md - docs/models/getv1employeesemployeeidjobsrequest.md - docs/models/getv1employeesemployeeidrehirerequest.md - docs/models/getv1employeesemployeeidterminationsrequest.md + - docs/models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md - docs/models/getv1employeesemployeeidworkaddressesrequest.md - docs/models/getv1employeesheaderxgustoapiversion.md - docs/models/getv1employeesrequest.md - docs/models/getv1garnishmentschildsupportrequest.md - docs/models/getv1garnishmentsgarnishmentidrequest.md + - docs/models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md - docs/models/getv1homeaddresseshomeaddressuuidrequest.md - docs/models/getv1jobsjobidcompensationsqueryparaminclude.md - docs/models/getv1jobsjobidcompensationsrequest.md @@ -229,12 +246,16 @@ generatedFiles: - docs/models/getv1tokeninforequest.md - docs/models/getv1tokeninforesponsebody.md - docs/models/getv1tokeninfotype.md + - docs/models/getv1webhookshealthcheckheaderxgustoapiversion.md + - docs/models/getv1webhookshealthcheckrequest.md + - docs/models/getv1webhookshealthchecksecurity.md - docs/models/getv1webhooksubscriptionsrequest.md - docs/models/getv1webhooksubscriptionssecurity.md - docs/models/getv1webhooksubscriptionuuidrequest.md - docs/models/getv1webhooksubscriptionuuidsecurity.md - docs/models/getv1webhooksubscriptionverificationtokenuuidrequest.md - docs/models/getv1webhooksubscriptionverificationtokenuuidsecurity.md + - docs/models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md - docs/models/getv1workaddressesworkaddressuuidrequest.md - docs/models/getversionemployeestimeoffactivitiesrequest.md - docs/models/headerxgustoapiversion.md @@ -242,6 +263,8 @@ generatedFiles: - docs/models/hourly.md - docs/models/hourlycompensations.md - docs/models/include.md + - docs/models/initiator.md + - docs/models/integrationtype.md - docs/models/job.md - docs/models/key.md - docs/models/limitoption.md @@ -252,6 +275,9 @@ generatedFiles: - docs/models/minimumwage.md - docs/models/minimumwages.md - docs/models/name.md + - docs/models/notification.md + - docs/models/notificationentitytype.md + - docs/models/notificationstatus.md - docs/models/offcyclereasontype.md - docs/models/onboardingdocumentsconfig.md - docs/models/onboardingstatus.md @@ -273,19 +299,36 @@ generatedFiles: - docs/models/payrollemployeecompensationstypepaidtimeoff.md - docs/models/payrollemployeecompensationstypepaymentmethod.md - docs/models/payrollfixedcompensationtypestype.md - - docs/models/payrollminimal.md - docs/models/payrollpaymentspeedchangedtype.md - docs/models/payrollpayperiodtype.md - docs/models/payrollpayrollstatusmetatype.md - docs/models/payrollprepared.md + - docs/models/payrollpreparesortby.md - docs/models/payrollprocessingrequest.md - docs/models/payrollprocessingrequeststatus.md + - docs/models/payrollshow.md + - docs/models/payrollshowamounttype.md + - docs/models/payrollshowdeductions.md + - docs/models/payrollshowfixedcompensations.md + - docs/models/payrollshowhourlycompensations.md + - docs/models/payrollshowpaidtimeoff.md + - docs/models/payrollshowpaymentmethod.md + - docs/models/payrollshowreimbursements.md - docs/models/payrollsubmissionblockerstype.md - docs/models/payrollsubmissionblockerstypemetadata.md - docs/models/payrollsubmissionblockerstypestatus.md + - docs/models/payrolltaxestype.md - docs/models/payrolltotalstype.md - docs/models/payrolltype.md - docs/models/payrolltypes.md + - docs/models/payrollupdate.md + - docs/models/payrollupdateamounttype.md + - docs/models/payrollupdatedeductions.md + - docs/models/payrollupdateemployeecompensations.md + - docs/models/payrollupdatefixedcompensations.md + - docs/models/payrollupdatehourlycompensations.md + - docs/models/payrollupdatepaidtimeoff.md + - docs/models/payrollupdatepaymentmethod.md - docs/models/payrollwithholdingpayperiodtype.md - docs/models/payscheduleassignment.md - docs/models/payscheduleassignmentdepartment.md @@ -302,12 +345,12 @@ generatedFiles: - docs/models/postdepartmentsrequestbody.md - docs/models/postemployeeytdbenefitamountsfromdifferentcompany.md - docs/models/postemployeeytdbenefitamountsfromdifferentcompanyrequest.md + - docs/models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md + - docs/models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md + - docs/models/postpayrollspayrolluuidreportsgeneralledgerrequest.md + - docs/models/postpayrollspayrolluuidreportsgeneralledgerrequestbody.md - docs/models/postv1companiescompanyidcompanybenefitsrequest.md - docs/models/postv1companiescompanyidcompanybenefitsrequestbody.md - - docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md - - docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md - - docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md - - docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md - docs/models/postv1companiescompanyidearningtypesrequest.md - docs/models/postv1companiescompanyidearningtypesrequestbody.md - docs/models/postv1companiescompanyidlocationsrequest.md @@ -333,11 +376,13 @@ generatedFiles: - docs/models/postv1employeesemployeeidgarnishmentsgarnishmenttype.md - docs/models/postv1employeesemployeeidgarnishmentsrequest.md - docs/models/postv1employeesemployeeidgarnishmentsrequestbody.md + - docs/models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md - docs/models/postv1employeesemployeeidhomeaddressesrequest.md - docs/models/postv1employeesemployeeidhomeaddressesrequestbody.md - docs/models/postv1employeesemployeeidrehirerequest.md - docs/models/postv1employeesemployeeidterminationsrequest.md - docs/models/postv1employeesemployeeidterminationsrequestbody.md + - docs/models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md - docs/models/postv1employeesemployeeidworkaddressesrequest.md - docs/models/postv1employeesemployeeidworkaddressesrequestbody.md - docs/models/postv1employeesheaderxgustoapiversion.md @@ -375,15 +420,14 @@ generatedFiles: - docs/models/puttimetrackingtimesheetstimesheetuuidrequestbody.md - docs/models/putv1companiescompanyidearningtypesearningtypeuuidrequest.md - docs/models/putv1companiescompanyidearningtypesearningtypeuuidrequestbody.md - - docs/models/putv1companiescompanyidpayrollsfixedcompensations.md - - docs/models/putv1companiescompanyidpayrollshourlycompensations.md - - docs/models/putv1companiescompanyidpayrollspaidtimeoff.md - - docs/models/putv1companiescompanyidpayrollspaymentmethod.md + - docs/models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md - docs/models/putv1companiescompanyidpayrollspayrollidpreparerequest.md + - docs/models/putv1companiescompanyidpayrollspayrollidpreparerequestbody.md - docs/models/putv1companiescompanyidpayrollsrequest.md - - docs/models/putv1companiescompanyidpayrollsrequestbody.md - docs/models/putv1companiesrequest.md - docs/models/putv1companiesrequestbody.md + - docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md + - docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md - docs/models/putv1companybenefitscompanybenefitidemployeebenefitsrequest.md - docs/models/putv1companybenefitscompanybenefitidemployeebenefitsrequestbody.md - docs/models/putv1companybenefitscompanybenefitidrequest.md @@ -407,10 +451,12 @@ generatedFiles: - docs/models/putv1employeesemployeeidrehireemploymentstatus.md - docs/models/putv1employeesemployeeidrehirerequest.md - docs/models/putv1employeesemployeeidrehirerequestbody.md + - docs/models/putv1employeesheaderxgustoapiversion.md - docs/models/putv1employeesrequest.md - docs/models/putv1employeesrequestbody.md - docs/models/putv1garnishmentsgarnishmentidrequest.md - docs/models/putv1garnishmentsgarnishmentidrequestbody.md + - docs/models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md - docs/models/putv1homeaddresseshomeaddressuuidrequest.md - docs/models/putv1homeaddresseshomeaddressuuidrequestbody.md - docs/models/putv1jobsjobidrequest.md @@ -426,23 +472,34 @@ generatedFiles: - docs/models/putv1webhooksubscriptionuuidrequestbody.md - docs/models/putv1webhooksubscriptionuuidsecurity.md - docs/models/putv1webhooksubscriptionuuidsubscriptiontypes.md + - docs/models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md - docs/models/putv1workaddressesworkaddressuuidrequest.md - docs/models/putv1workaddressesworkaddressuuidrequestbody.md - docs/models/queryparaminclude.md + - docs/models/queryparamsortorder.md + - docs/models/queryparamstatus.md - docs/models/refreshaccesstokenrequest.md - docs/models/refreshaccesstokenrequestbody.md - docs/models/rehire.md - docs/models/rehirebody.md - docs/models/rehireemploymentstatus.md + - docs/models/reimbursements.md + - docs/models/report.md + - docs/models/requesttype.md - docs/models/requiredattributes.md - docs/models/resource.md - docs/models/resourceowner.md + - docs/models/resources.md - docs/models/resourcetype.md - docs/models/revokeaccesstokenrequest.md - docs/models/revokeaccesstokenrequestbody.md - docs/models/security.md + - docs/models/showemployees.md + - docs/models/sortby.md - docs/models/sortorder.md - docs/models/source.md + - docs/models/splitby.md + - docs/models/splits.md - docs/models/status.md - docs/models/subscriptiontypes.md - docs/models/supportedbenefit.md @@ -451,6 +508,9 @@ generatedFiles: - docs/models/tier.md - docs/models/tiers.md - docs/models/timeoffactivity.md + - docs/models/timeoffrequest.md + - docs/models/timeoffrequestemployee.md + - docs/models/timeoffrequeststatus.md - docs/models/timeofftype.md - docs/models/timesheet.md - docs/models/timesheetentitytype.md @@ -458,7 +518,6 @@ generatedFiles: - docs/models/timesheetsortorder.md - docs/models/timesheetstatus.md - docs/models/total.md - - docs/models/totals.md - docs/models/two.md - docs/models/type.md - docs/models/unblockoptions.md @@ -471,6 +530,8 @@ generatedFiles: - docs/models/valuetiers.md - docs/models/versionheader.md - docs/models/wagetype.md + - docs/models/webhookshealthcheckstatus.md + - docs/models/webhookshealthcheckstatusstatus.md - docs/models/webhooksubscription.md - docs/models/webhooksubscriptionstatus.md - docs/models/withholdingpayperiod.md @@ -479,7 +540,6 @@ generatedFiles: - docs/sdks/companies/README.md - docs/sdks/companybenefits/README.md - docs/sdks/companylocations/README.md - - docs/sdks/contractorpaymentgroups/README.md - docs/sdks/contractorpayments/README.md - docs/sdks/contractors/README.md - docs/sdks/departments/README.md @@ -490,14 +550,16 @@ generatedFiles: - docs/sdks/employees/README.md - docs/sdks/events/README.md - docs/sdks/garnishments/README.md - - docs/sdks/gustoappintegration/README.md - docs/sdks/introspection/README.md - docs/sdks/jobs/README.md - docs/sdks/jobsandcompensations/README.md - docs/sdks/locations/README.md + - docs/sdks/notifications/README.md - docs/sdks/payrolls/README.md - docs/sdks/payschedules/README.md + - docs/sdks/reports/README.md - docs/sdks/timeoffpolicies/README.md + - docs/sdks/timeoffrequests/README.md - docs/sdks/timetracking/README.md - docs/sdks/webhooks/README.md - poetry.toml @@ -515,7 +577,6 @@ generatedFiles: - src/gusto_app_integration/companies.py - src/gusto_app_integration/companybenefits.py - src/gusto_app_integration/companylocations.py - - src/gusto_app_integration/contractorpaymentgroups.py - src/gusto_app_integration/contractorpayments.py - src/gusto_app_integration/contractors.py - src/gusto_app_integration/departments.py @@ -549,11 +610,11 @@ generatedFiles: - src/gusto_app_integration/models/compensation.py - src/gusto_app_integration/models/contractor.py - src/gusto_app_integration/models/contractor_payment.py - - src/gusto_app_integration/models/contractor_payment_for_group.py - - src/gusto_app_integration/models/contractor_payment_group.py - - src/gusto_app_integration/models/contractor_payment_group_minimal.py + - src/gusto_app_integration/models/contractor_payment_details_list.py - src/gusto_app_integration/models/contractor_payment_summary.py - src/gusto_app_integration/models/contractor_payment_summary_by_dates.py + - src/gusto_app_integration/models/contractors_sort_by.py + - src/gusto_app_integration/models/contribution_exclusion.py - src/gusto_app_integration/models/custom_field_type.py - src/gusto_app_integration/models/delete_departmentop.py - src/gusto_app_integration/models/delete_time_tracking_time_sheets_time_sheet_uuidop.py @@ -576,6 +637,7 @@ generatedFiles: - src/gusto_app_integration/models/employee_benefit.py - src/gusto_app_integration/models/employee_benefit_for_company_benefit.py - src/gusto_app_integration/models/employee_custom_field.py + - src/gusto_app_integration/models/employee_home_address.py - src/gusto_app_integration/models/employee_work_address.py - src/gusto_app_integration/models/employment_history_list.py - src/gusto_app_integration/models/entity_error_object.py @@ -584,11 +646,14 @@ generatedFiles: - src/gusto_app_integration/models/flsa_status_type.py - src/gusto_app_integration/models/garnishment.py - src/gusto_app_integration/models/garnishment_child_support.py + - src/gusto_app_integration/models/general_ledger_report.py - src/gusto_app_integration/models/get_companies_company_uuid_time_tracking_time_sheetsop.py - src/gusto_app_integration/models/get_companies_departmentsop.py + - src/gusto_app_integration/models/get_company_notificationsop.py - src/gusto_app_integration/models/get_departmentop.py - src/gusto_app_integration/models/get_employee_ytd_benefit_amounts_from_different_companyop.py - src/gusto_app_integration/models/get_eventsop.py + - src/gusto_app_integration/models/get_reports_request_uuidop.py - src/gusto_app_integration/models/get_time_tracking_time_sheets_time_sheet_uuidop.py - src/gusto_app_integration/models/get_v1_benefits_benefit_idop.py - src/gusto_app_integration/models/get_v1_benefits_benefits_id_requirementsop.py @@ -597,8 +662,8 @@ generatedFiles: - src/gusto_app_integration/models/get_v1_companies_company_id_adminsop.py - src/gusto_app_integration/models/get_v1_companies_company_id_company_benefitsop.py - src/gusto_app_integration/models/get_v1_companies_company_id_contractor_payment_contractor_paymentop.py - - src/gusto_app_integration/models/get_v1_companies_company_id_contractor_payment_groupsop.py - src/gusto_app_integration/models/get_v1_companies_company_id_contractor_paymentsop.py + - src/gusto_app_integration/models/get_v1_companies_company_id_contractors_payment_detailsop.py - src/gusto_app_integration/models/get_v1_companies_company_id_custom_fieldsop.py - src/gusto_app_integration/models/get_v1_companies_company_id_earning_typesop.py - src/gusto_app_integration/models/get_v1_companies_company_id_employeesop.py @@ -609,13 +674,14 @@ generatedFiles: - src/gusto_app_integration/models/get_v1_companies_company_id_pay_schedulesop.py - src/gusto_app_integration/models/get_v1_companies_company_id_payrolls_payroll_idop.py - src/gusto_app_integration/models/get_v1_companies_company_id_payrollsop.py + - src/gusto_app_integration/models/get_v1_companies_company_id_time_off_requestsop.py - src/gusto_app_integration/models/get_v1_companies_company_id_unprocessed_termination_pay_periodsop.py - src/gusto_app_integration/models/get_v1_companies_company_uuid_contractorsop.py - src/gusto_app_integration/models/get_v1_companiesop.py + - src/gusto_app_integration/models/get_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py - src/gusto_app_integration/models/get_v1_company_benefits_company_benefit_id_employee_benefitsop.py - src/gusto_app_integration/models/get_v1_company_benefits_company_benefit_idop.py - src/gusto_app_integration/models/get_v1_compensations_compensation_idop.py - - src/gusto_app_integration/models/get_v1_contractor_payment_groups_contractor_payment_group_idop.py - src/gusto_app_integration/models/get_v1_contractors_contractor_uuidop.py - src/gusto_app_integration/models/get_v1_employee_benefits_employee_benefit_idop.py - src/gusto_app_integration/models/get_v1_employees_employee_id_custom_fieldsop.py @@ -639,13 +705,17 @@ generatedFiles: - src/gusto_app_integration/models/get_v1_webhook_subscription_uuidop.py - src/gusto_app_integration/models/get_v1_webhook_subscription_verification_token_uuidop.py - src/gusto_app_integration/models/get_v1_webhook_subscriptionsop.py + - src/gusto_app_integration/models/get_v1_webhooks_health_checkop.py - src/gusto_app_integration/models/get_v1_work_addresses_work_address_uuidop.py - src/gusto_app_integration/models/get_version_employees_time_off_activitiesop.py + - src/gusto_app_integration/models/gustoappintegrationerror.py - src/gusto_app_integration/models/job.py - src/gusto_app_integration/models/location.py - src/gusto_app_integration/models/metadata_with_multiple_entities.py - src/gusto_app_integration/models/metadata_with_one_entity.py - src/gusto_app_integration/models/minimum_wage.py + - src/gusto_app_integration/models/no_response_error.py + - src/gusto_app_integration/models/notification.py - src/gusto_app_integration/models/off_cycle_reason_type.py - src/gusto_app_integration/models/paid_time_off.py - src/gusto_app_integration/models/pay_period.py @@ -660,21 +730,24 @@ generatedFiles: - src/gusto_app_integration/models/payroll_credit_blockers_type.py - src/gusto_app_integration/models/payroll_employee_compensations_type.py - src/gusto_app_integration/models/payroll_fixed_compensation_types_type.py - - src/gusto_app_integration/models/payroll_minimal.py - src/gusto_app_integration/models/payroll_pay_period_type.py - src/gusto_app_integration/models/payroll_payment_speed_changed_type.py - src/gusto_app_integration/models/payroll_payroll_status_meta_type.py + - src/gusto_app_integration/models/payroll_prepare_sort_by.py - src/gusto_app_integration/models/payroll_prepared.py - src/gusto_app_integration/models/payroll_processing_request.py + - src/gusto_app_integration/models/payroll_show.py - src/gusto_app_integration/models/payroll_submission_blockers_type.py + - src/gusto_app_integration/models/payroll_taxes_type.py - src/gusto_app_integration/models/payroll_totals_type.py + - src/gusto_app_integration/models/payroll_update.py - src/gusto_app_integration/models/payroll_withholding_pay_period_type.py - src/gusto_app_integration/models/post_companies_company_uuid_time_tracking_time_sheetsop.py - src/gusto_app_integration/models/post_departmentsop.py - src/gusto_app_integration/models/post_employee_ytd_benefit_amounts_from_different_company.py - src/gusto_app_integration/models/post_employee_ytd_benefit_amounts_from_different_companyop.py + - src/gusto_app_integration/models/post_payrolls_payroll_uuid_reports_general_ledgerop.py - src/gusto_app_integration/models/post_v1_companies_company_id_company_benefitsop.py - - src/gusto_app_integration/models/post_v1_companies_company_id_contractor_payment_groups_previewop.py - src/gusto_app_integration/models/post_v1_companies_company_id_earning_typesop.py - src/gusto_app_integration/models/post_v1_companies_company_id_locationsop.py - src/gusto_app_integration/models/post_v1_companies_company_uuid_contractorsop.py @@ -699,6 +772,7 @@ generatedFiles: - src/gusto_app_integration/models/put_v1_companies_company_id_payrolls_payroll_id_prepareop.py - src/gusto_app_integration/models/put_v1_companies_company_id_payrollsop.py - src/gusto_app_integration/models/put_v1_companiesop.py + - src/gusto_app_integration/models/put_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py - src/gusto_app_integration/models/put_v1_company_benefits_company_benefit_id_employee_benefitsop.py - src/gusto_app_integration/models/put_v1_company_benefits_company_benefit_idop.py - src/gusto_app_integration/models/put_v1_compensations_compensation_idop.py @@ -717,13 +791,17 @@ generatedFiles: - src/gusto_app_integration/models/refresh_access_tokenop.py - src/gusto_app_integration/models/rehire.py - src/gusto_app_integration/models/rehire_body.py + - src/gusto_app_integration/models/report.py + - src/gusto_app_integration/models/responsevalidationerror.py - src/gusto_app_integration/models/revoke_access_tokenop.py - src/gusto_app_integration/models/security.py + - src/gusto_app_integration/models/show_employees.py - src/gusto_app_integration/models/sort_order.py - src/gusto_app_integration/models/status.py - src/gusto_app_integration/models/supported_benefit.py - src/gusto_app_integration/models/termination.py - src/gusto_app_integration/models/time_off_activity.py + - src/gusto_app_integration/models/time_off_request.py - src/gusto_app_integration/models/time_sheet.py - src/gusto_app_integration/models/time_sheet_sort_by.py - src/gusto_app_integration/models/time_sheet_sort_order.py @@ -731,12 +809,16 @@ generatedFiles: - src/gusto_app_integration/models/unprocessed_termination_pay_period.py - src/gusto_app_integration/models/versionheader.py - src/gusto_app_integration/models/webhook_subscription.py + - src/gusto_app_integration/models/webhooks_health_check_status.py - src/gusto_app_integration/models/ytd_benefit_amounts_from_different_company.py + - src/gusto_app_integration/notifications.py - src/gusto_app_integration/payrolls.py - src/gusto_app_integration/payschedules.py - src/gusto_app_integration/py.typed + - src/gusto_app_integration/reports.py - src/gusto_app_integration/sdk.py - src/gusto_app_integration/sdkconfiguration.py + - src/gusto_app_integration/time_off_requests.py - src/gusto_app_integration/time_tracking.py - src/gusto_app_integration/timeoffpolicies.py - src/gusto_app_integration/types/__init__.py @@ -755,18 +837,19 @@ generatedFiles: - src/gusto_app_integration/utils/retries.py - src/gusto_app_integration/utils/security.py - src/gusto_app_integration/utils/serializers.py + - src/gusto_app_integration/utils/unmarshal_json_response.py - src/gusto_app_integration/utils/url.py - src/gusto_app_integration/utils/values.py - src/gusto_app_integration/webhooks.py examples: get-v1-token-info: - Example: + speakeasy-default-get-v1-token-info: parameters: header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"scope": "companies:read companies:write employees:read", "resource": {"type": "Company", "uuid": "5eca5127-6048-43ad-91ee-b56a0c34bc85"}, "resource_owner": {"type": "CompanyAdmin", "uuid": "367871c2-3f70-4874-adc9-f1736647e8e1"}} + application/json: {"scope": "", "resource": {"type": "", "uuid": "ee9b2192-c07e-46f4-ac9b-5e81bfdf7346"}, "resource_owner": {"type": "Employee", "uuid": "85b82eed-4e3d-4fac-b07a-d3e80bc73315"}} revoke-access-token: speakeasy-default-revoke-access-token: parameters: @@ -800,13 +883,15 @@ examples: application/json: {"user": {"first_name": "Frank", "last_name": "Ocean", "email": "frank@example.com", "phone": "2345558899"}, "company": {"name": "Frank's Ocean, LLC", "trade_name": "Frank’s Ocean", "ein": "123456789", "states": ["CO", "CA"], "number_employees": 8, "addresses": [{"street_1": "1201 16th Street Mall", "street_2": "Suite 350", "city": "Denver", "zip": "80202", "state": "CO", "phone": "2345678900", "is_primary": "true"}, {"street_1": "525 20th Street", "city": "San Francisco", "zip": "94107", "state": "CA", "phone": "2345678901"}]}} responses: "201": - application/json: {"account_claim_url": "https://app.gusto.com/claim_account/3456789"} + application/json: {} + "422": + application/json: {"errors": [{"error_key": "", "category": ""}]} Basic: parameters: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"user": {"first_name": "Dolly", "last_name": "Ernser", "email": "Mateo_Runolfsdottir@gmail.com"}, "company": {"name": ""}} + application/json: {"user": {"first_name": "Ellis", "last_name": "Jast", "email": "Hazel.Wyman@yahoo.com"}, "company": {"name": ""}} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -815,7 +900,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"user": {"first_name": "Kaitlyn", "last_name": "Wisozk", "email": "Magnus_Howe55@hotmail.com"}, "company": {"name": ""}} + application/json: {"user": {"first_name": "Ellis", "last_name": "Jast", "email": "Hazel.Wyman@yahoo.com"}, "company": {"name": ""}} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -824,10 +909,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"user": {"first_name": "Adele", "last_name": "Jacobson", "email": "Maud_Rau14@gmail.com"}, "company": {"name": ""}} + application/json: {"user": {"first_name": "Ellis", "last_name": "Jast", "email": "Hazel.Wyman@yahoo.com"}, "company": {"name": ""}} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies: Example: parameters: @@ -837,7 +922,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"ein": "00-0000001", "entity_type": "C-Corporation", "contractor_only": false, "tier": "core", "is_suspended": false, "company_status": "Approved", "uuid": "c7a07c73-a703-4462-9343-1b181182b6e0", "name": "Shoppe Studios LLC", "slug": "record-shoppe", "trade_name": "Record Shoppe", "is_partner_managed": false, "pay_schedule_type": "by_department", "join_date": "2023-03-01", "funding_type": "ach", "locations": [{"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true}, {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": true}], "compensations": {"hourly": [{"name": "Overtime", "multiple": 1.5}, {"name": "Double overtime", "multiple": 2}, {"name": "Regular", "multiple": 1}, {"name": "Outstanding vacation", "multiple": 1}, {"name": "Holiday", "multiple": 1}, {"name": "Emergency sick - self care", "multiple": 1}, {"name": "Emergency sick - caring for others", "multiple": 1}, {"name": "FMLA Public Health Emergency Leave", "multiple": 1}, {"name": "Regular Hours", "multiple": 1}], "fixed": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Severance"}, {"name": "Minimum Wage Adjustment"}, {"name": "Reimbursement"}], "paid_time_off": [{"name": "Vacation Hours"}, {"name": "Sick Hours"}, {"name": "Holiday Hours"}]}, "primary_signatory": {"uuid": "8a2ed9c2-9d1e-443a-8e56-a490d8bf73bb", "first_name": "Alda", "middle_initial": "", "last_name": "Carter", "phone": "1-565-710-7558", "email": "louie.hessel7757869450111547@zemlak.biz", "home_address": {"street_1": "524 Roob Divide", "street_2": "Suite 565", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}}, "primary_payroll_admin": {"first_name": "Ian", "last_name": "Labadie", "phone": "1-565-710-7559", "email": "louie.hessel7757869450111547@zemlak.biz"}} + application/json: {"ein": "00-0000001", "entity_type": "C-Corporation", "contractor_only": false, "tier": "core", "is_suspended": false, "company_status": "Approved", "uuid": "c7a07c73-a703-4462-9343-1b181182b6e0", "name": "Shoppe Studios LLC", "slug": "record-shoppe", "trade_name": "Record Shoppe", "is_partner_managed": false, "pay_schedule_type": "by_department", "join_date": "2023-03-01", "funding_type": "ach", "locations": [{"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}, {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA"}], "compensations": {"hourly": [{"name": "Overtime", "multiple": 1.5}, {"name": "Double overtime", "multiple": 2}, {"name": "Regular", "multiple": 1}, {"name": "Outstanding vacation", "multiple": 1}, {"name": "Holiday", "multiple": 1}, {"name": "Emergency sick - self care", "multiple": 1}, {"name": "Emergency sick - caring for others", "multiple": 1}, {"name": "FMLA Public Health Emergency Leave", "multiple": 1}, {"name": "Regular Hours", "multiple": 1}], "fixed": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Severance"}, {"name": "Minimum Wage Adjustment"}, {"name": "Reimbursement"}], "paid_time_off": [{"name": "Vacation Hours"}, {"name": "Sick Hours"}, {"name": "Holiday Hours"}]}, "primary_signatory": {"uuid": "8a2ed9c2-9d1e-443a-8e56-a490d8bf73bb", "first_name": "Alda", "middle_initial": "", "last_name": "Carter", "phone": "1-565-710-7558", "email": "louie.hessel7757869450111547@zemlak.biz", "home_address": {"street_1": "524 Roob Divide", "street_2": "Suite 565", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}}, "primary_payroll_admin": {"first_name": "Ian", "last_name": "Labadie", "phone": "1-565-710-7559", "email": "louie.hessel7757869450111547@zemlak.biz"}} put-v1-companies: Example: parameters: @@ -849,7 +934,7 @@ examples: application/json: {"contractor_only": false} responses: "200": - application/json: {"ein": "00-0000001", "entity_type": "C-Corporation", "contractor_only": false, "tier": "core", "is_suspended": false, "company_status": "Approved", "uuid": "c7a07c73-a703-4462-9343-1b181182b6e0", "name": "Shoppe Studios LLC", "slug": "record-shoppe", "trade_name": "Record Shoppe", "is_partner_managed": false, "pay_schedule_type": "by_department", "join_date": "2023-03-01", "funding_type": "ach", "locations": [{"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true}, {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": true}], "compensations": {"hourly": [{"name": "Overtime", "multiple": 1.5}, {"name": "Double overtime", "multiple": 2}, {"name": "Regular", "multiple": 1}, {"name": "Outstanding vacation", "multiple": 1}, {"name": "Holiday", "multiple": 1}, {"name": "Emergency sick - self care", "multiple": 1}, {"name": "Emergency sick - caring for others", "multiple": 1}, {"name": "FMLA Public Health Emergency Leave", "multiple": 1}, {"name": "Regular Hours", "multiple": 1}], "fixed": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Severance"}, {"name": "Minimum Wage Adjustment"}, {"name": "Reimbursement"}], "paid_time_off": [{"name": "Vacation Hours"}, {"name": "Sick Hours"}, {"name": "Holiday Hours"}]}, "primary_signatory": {"uuid": "8a2ed9c2-9d1e-443a-8e56-a490d8bf73bb", "first_name": "Alda", "middle_initial": "", "last_name": "Carter", "phone": "1-565-710-7558", "email": "louie.hessel7757869450111547@zemlak.biz", "home_address": {"street_1": "524 Roob Divide", "street_2": "Suite 565", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}}, "primary_payroll_admin": {"first_name": "Ian", "last_name": "Labadie", "phone": "1-565-710-7559", "email": "louie.hessel7757869450111547@zemlak.biz"}} + application/json: {"ein": "00-0000001", "entity_type": "C-Corporation", "contractor_only": false, "tier": "core", "is_suspended": false, "company_status": "Approved", "uuid": "c7a07c73-a703-4462-9343-1b181182b6e0", "name": "Shoppe Studios LLC", "slug": "record-shoppe", "trade_name": "Record Shoppe", "is_partner_managed": false, "pay_schedule_type": "by_department", "join_date": "2023-03-01", "funding_type": "ach", "locations": [{"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}, {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA"}], "compensations": {"hourly": [{"name": "Overtime", "multiple": 1.5}, {"name": "Double overtime", "multiple": 2}, {"name": "Regular", "multiple": 1}, {"name": "Outstanding vacation", "multiple": 1}, {"name": "Holiday", "multiple": 1}, {"name": "Emergency sick - self care", "multiple": 1}, {"name": "Emergency sick - caring for others", "multiple": 1}, {"name": "FMLA Public Health Emergency Leave", "multiple": 1}, {"name": "Regular Hours", "multiple": 1}], "fixed": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Severance"}, {"name": "Minimum Wage Adjustment"}, {"name": "Reimbursement"}], "paid_time_off": [{"name": "Vacation Hours"}, {"name": "Sick Hours"}, {"name": "Holiday Hours"}]}, "primary_signatory": {"uuid": "8a2ed9c2-9d1e-443a-8e56-a490d8bf73bb", "first_name": "Alda", "middle_initial": "", "last_name": "Carter", "phone": "1-565-710-7558", "email": "louie.hessel7757869450111547@zemlak.biz", "home_address": {"street_1": "524 Roob Divide", "street_2": "Suite 565", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}}, "primary_payroll_admin": {"first_name": "Ian", "last_name": "Labadie", "phone": "1-565-710-7559", "email": "louie.hessel7757869450111547@zemlak.biz"}} Basic: parameters: path: @@ -857,7 +942,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"contractor_only": false} + application/json: {"contractor_only": true} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -868,7 +953,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"contractor_only": false} + application/json: {"contractor_only": true} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -882,13 +967,12 @@ examples: application/json: {"contractor_only": true} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-admins: Example: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -899,7 +983,6 @@ examples: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -916,7 +999,7 @@ examples: application/json: {"phone_number": "8009360383", "street_1": "425 2nd Street", "street_2": "Suite 602", "city": "San Francisco", "state": "CA", "zip": "94107"} responses: "201": - application/json: {"uuid": "04552eb9-7829-4b18-ae96-6983552948df", "version": "7d9753112507b9dda4fb97910f39b06e", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "5825710808", "street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true, "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00"} + application/json: {"uuid": "04552eb9-7829-4b18-ae96-6983552948df", "version": "7d9753112507b9dda4fb97910f39b06e", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "5825710808", "street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00", "active": true} Basic: parameters: path: @@ -924,7 +1007,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"phone_number": "741.279.0107 x857", "street_1": "", "city": "Grand Island", "state": "Illinois", "zip": "22031"} + application/json: {"phone_number": "841-814-9427 x9355", "street_1": "", "city": "Chynastad", "state": "Wisconsin", "zip": "88336"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -935,7 +1018,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"phone_number": "(263) 266-2050", "street_1": "", "city": "Lubowitzside", "state": "Minnesota", "zip": "27179"} + application/json: {"phone_number": "841-814-9427 x9355", "street_1": "", "city": "Chynastad", "state": "Wisconsin", "zip": "88336"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -946,12 +1029,12 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"phone_number": "824-550-4439 x01255", "street_1": "", "city": "South Barrett", "state": "Georgia", "zip": "80985-0183"} + application/json: {"phone_number": "841-814-9427 x9355", "street_1": "", "city": "Chynastad", "state": "Wisconsin", "zip": "88336"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-locations-location_id: - test_example: + speakeasy-default-get-v1-locations-location-id: parameters: path: location_id: "" @@ -959,38 +1042,25 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "bd6fc55c-1263-4432-aef0-d667b9e0aef7", "version": "2a98f99d7e8e3ede9b04a6494b7f3fcf", "company_uuid": "393b7c66-66a1-4967-ab19-32eca5db9edd", "phone_number": "7425583363", "street_1": "3079 Hackett Landing", "street_2": "Suite 671", "city": "Belmont", "state": "IN", "zip": "47448", "country": "USA", "active": true, "mailing_address": true, "filing_address": false, "created_at": "2025-05-15T08:01:01.000-07:00", "updated_at": "2025-05-15T08:01:01.000-07:00"} + application/json: {"uuid": "42569fb0-7d3c-4045-9023-5b279bee7e9c", "country": "USA"} "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + application/json: {"errors": []} put-v1-locations-location_id: - request_example_1: - parameters: - path: - location_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": "aa2c4db94c2e968aa0cf51f346007c5f", "phone_number": "8009360383", "street_1": "300 3rd Street", "street_2": "Apartment 318", "city": "San Francisco", "zip": "94107", "filing_address": true} - responses: - "200": - application/json: {"uuid": "d95fa7f0-e743-42ce-b47c-b60cc78135dd", "country": "USA"} - "404": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - test_example: + speakeasy-default-put-v1-locations-location-id: parameters: path: location_id: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "phone_number": "8009360383", "street_1": "300 3rd Street", "street_2": "Apartment 318", "city": "San Francisco", "zip": "94107"} responses: "200": - application/json: {"uuid": "a8b2221c-c063-4417-8c72-9b8e535ff7c4", "version": "65aacee259b7169fe6287ddda9fa7d22", "company_uuid": "7692323a-d689-436c-b9f3-df05d4f16f0f", "phone_number": "8009360383", "street_1": "300 3rd Street", "street_2": "Apartment 318", "city": "San Francisco", "state": "MN", "zip": "94107", "country": "USA", "active": true, "mailing_address": true, "filing_address": true, "created_at": "2025-05-15T08:01:03.000-07:00", "updated_at": "2025-05-15T08:01:03.000-07:00"} + application/json: {"uuid": "ced517c9-1c22-4468-88f7-bea752987d03", "country": "USA"} "404": - application/json: {"errors": [{"error_key": "state", "category": "invalid_attribute_value", "message": "State is in the wrong format"}]} + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-locations-location_uuid-minimum_wages: - "": + speakeasy-default-get-v1-locations-location-uuid-minimum-wages: parameters: path: location_uuid: "" @@ -1000,39 +1070,24 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "51a05d45-4150-43d0-817d-ded00b53e08d", "wage": "", "wage_type": "", "effective_date": "2025-07-18", "authority": ""}, {"uuid": "6bcf0983-eca2-4a56-b844-6e8c6e9a7665", "wage": "", "wage_type": "", "effective_date": "2024-05-23", "authority": ""}, {"uuid": "6279a5fa-0ee0-4322-b251-c08f7a91301b", "wage": "", "wage_type": "", "effective_date": "2024-02-09", "authority": ""}] + application/json: [{"uuid": "4e403e89-9737-4a6e-a024-d90811702355", "wage": "", "wage_type": "", "effective_date": "2023-01-11", "authority": ""}] "404": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - test_example: - parameters: - path: - location_uuid: "" - query: - effective_date: "2020-01-31" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "200": - application/json: [{"uuid": "f236d80d-52d2-495e-8538-884162a383f4", "wage": "15.0", "wage_type": "Regular", "effective_date": "2017-01-01", "authority": "City", "notes": "large companies"}, {"uuid": "0f86fd12-a2fd-45b4-b3ab-fb8400b383b2", "wage": "10.5", "wage_type": "Regular", "effective_date": "2017-01-01", "authority": "City", "notes": "large companies"}, {"uuid": "648c12be-857b-4c4e-9667-4e4480ddf794", "wage": "10.5", "wage_type": "Regular", "effective_date": "2017-01-01", "authority": "State", "notes": "large companies"}, {"uuid": "9eb81bb8-2a5f-4cba-ab74-da2e2cd35a5f", "wage": "10.5", "wage_type": "Regular", "effective_date": "2017-01-01", "authority": "Federal", "notes": "large companies"}] - "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + application/json: {"errors": []} get-v1-companies-company_id-locations: Example: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "04552eb9-7829-4b18-ae96-6983552948df", "version": "7d9753112507b9dda4fb97910f39b06e", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "5825710808", "street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true, "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00"}, {"uuid": "fa94a2fd-11a8-4024-87ff-85c587d9d2b4", "version": "15e6b9680e00f3122729e64e3cef3224", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "2866070827", "street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": true, "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00"}] + application/json: [{"uuid": "04552eb9-7829-4b18-ae96-6983552948df", "version": "7d9753112507b9dda4fb97910f39b06e", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "5825710808", "street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00", "active": true}, {"uuid": "fa94a2fd-11a8-4024-87ff-85c587d9d2b4", "version": "15e6b9680e00f3122729e64e3cef3224", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "2866070827", "street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00", "active": true}] get-v1-companies-company_id-pay_schedules: Example: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -1083,79 +1138,55 @@ examples: "200": application/json: {"type": "by_employee", "employees": [{"employee_uuid": "f0238368-f2cf-43e2-9a07-b0265f2cec69", "pay_schedule_uuid": "c277ac52-9871-4a96-a1e6-0c449684602a"}]} get-v1-companies-company_id-employees: - test_example: + speakeasy-default-get-v1-companies-company-id-employees: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "d6d55ac1-802f-403a-bb0a-0543bb5670c3", "first_name": "Boaty", "middle_initial": null, "last_name": "Jenkins", "email": "freda_gaylord@nikolausgottlieb.com", "company_uuid": "278819f0-5bb9-4af8-8981-5ef539471969", "manager_uuid": null, "version": "b252e3ee842587da40dd4c9206dcb650", "department": null, "terminated": false, "two_percent_shareholder": false, "onboarded": true, "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "6e481688-c92b-41ab-ba11-90cd77060846", "version": "7b3c1d34eedab81d57ee2dfe89cec6e1", "employee_uuid": "d6d55ac1-802f-403a-bb0a-0543bb5670c3", "hire_date": "2024-05-15", "title": "", "primary": true, "rate": "80000.00", "payment_unit": "Year", "current_compensation_uuid": "a26f36aa-8255-499e-aabd-7404c40db3c2", "two_percent_shareholder": false, "state_wc_covered": null, "state_wc_class_code": null, "compensations": [{"uuid": "a26f36aa-8255-499e-aabd-7404c40db3c2", "version": "1c5b6d134862dee3598c87e6c6300f51", "job_uuid": "6e481688-c92b-41ab-ba11-90cd77060846", "employee_uuid": "d6d55ac1-802f-403a-bb0a-0543bb5670c3", "rate": "80000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2025-05-15", "adjust_for_minimum_wage": false, "minimum_wages": []}]}], "eligible_paid_time_off": [], "terminations": [], "garnishments": [], "date_of_birth": "2005-05-15", "has_ssn": true, "ssn": "", "phone": null, "preferred_first_name": null, "payment_method": "Direct Deposit", "work_email": null, "current_employment_status": "full_time"}, {"uuid": "40bb57f6-3a64-4ab9-9338-1d1a711db7ed", "first_name": "Cathrine", "middle_initial": null, "last_name": "Jacobson", "email": "hai@morissette.ca", "company_uuid": "278819f0-5bb9-4af8-8981-5ef539471969", "manager_uuid": null, "version": "838143794e09a50eab0207f2e7238520", "department": null, "terminated": false, "two_percent_shareholder": false, "onboarded": true, "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "db9cd327-96e0-4b53-a94d-1546378c647e", "version": "7b3c1d34eedab81d57ee2dfe89cec6e1", "employee_uuid": "40bb57f6-3a64-4ab9-9338-1d1a711db7ed", "hire_date": "2024-05-15", "title": "", "primary": true, "rate": "80000.00", "payment_unit": "Year", "current_compensation_uuid": "8b7dd287-46f1-4bdf-b245-ec4a8ceaef34", "two_percent_shareholder": false, "state_wc_covered": null, "state_wc_class_code": null, "compensations": [{"uuid": "8b7dd287-46f1-4bdf-b245-ec4a8ceaef34", "version": "1c5b6d134862dee3598c87e6c6300f51", "job_uuid": "db9cd327-96e0-4b53-a94d-1546378c647e", "employee_uuid": "40bb57f6-3a64-4ab9-9338-1d1a711db7ed", "rate": "80000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2025-05-15", "adjust_for_minimum_wage": false, "minimum_wages": []}]}], "eligible_paid_time_off": [], "terminations": [], "garnishments": [], "date_of_birth": "2005-05-15", "has_ssn": true, "ssn": "", "phone": null, "preferred_first_name": null, "payment_method": "Direct Deposit", "work_email": null, "current_employment_status": "full_time"}] + application/json: [{"uuid": "4307c952-e601-46fc-91a2-043e6046adf0", "first_name": "Iva", "last_name": "DuBuque-Rice", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check", "current_home_address": {"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true}, "all_home_addresses": [{"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true}]}] "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + application/json: {"errors": [{"error_key": "", "category": ""}]} post-v1-employees: - request_example_1: + speakeasy-default-post-v1-employees: parameters: path: company_id: "" header: X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"first_name": "Karl", "last_name": "The Fog"} responses: "201": - application/json: {"uuid": "7a621cf0-21cd-49cf-8540-3315211a509a", "first_name": "Adrienne", "last_name": "Barrows", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}, {"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} + application/json: {"uuid": "9f634ba6-53c8-4290-8751-3ec38c369860", "first_name": "Lela", "last_name": "Graham", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} "404": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - test_example: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "201": - application/json: {"uuid": "83f84a60-a44c-49dc-8b61-db364d7cfbf4", "first_name": "Karl", "middle_initial": null, "last_name": "The Fog", "email": null, "company_uuid": "085cb0bf-c271-4f33-9d25-4b7ed5534358", "manager_uuid": null, "version": "5211ee9bb08e51634431a18eff0afc64", "department": null, "terminated": false, "two_percent_shareholder": null, "onboarded": false, "onboarding_status": "admin_onboarding_incomplete", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [], "eligible_paid_time_off": [], "terminations": [], "garnishments": [], "date_of_birth": null, "has_ssn": false, "ssn": "", "phone": null, "preferred_first_name": null, "payment_method": "Check", "work_email": null, "current_employment_status": null} - "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-employees: - test_example: + speakeasy-default-get-v1-employees: parameters: path: employee_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "ac151743-4bea-41a3-ac1e-1707d6dcf9b0", "first_name": "Bertram", "middle_initial": null, "last_name": "Fritsch", "email": "talia@stehr.com", "company_uuid": "2f224f94-521b-4ab0-959a-192bb0c00c4d", "version": "56251d892c85d34d80c85b931760161b", "department": "Trivia 1", "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "f2c956af-bc5f-4348-b4aa-7d3ecc2db71b", "employee_uuid": "ac151743-4bea-41a3-ac1e-1707d6dcf9b0", "hire_date": "2024-05-15", "title": "Engineer", "primary": true, "two_percent_shareholder": false}], "date_of_birth": "2005-05-15", "has_ssn": true, "preferred_first_name": null, "payment_method": "Check"} - put-v1-employees: - request_example_1: - parameters: - path: - employee_id: "" - header: {} - requestBody: - application/json: {"version": "f0c06d303aab1fd909b40d4a1ad409ac", "first_name": "Weezy", "middle_initial": "F", "last_name": "Baby", "email": "tunechi@cashmoneyrecords.com", "date_of_birth": "1991-01-31", "ssn": "824920233"} - responses: - "200": - application/json: {"uuid": "d95fa7f0-e743-42ce-b47c-b60cc78135dd", "first_name": "Merlin", "last_name": "Harber", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}, {"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} + application/json: {"uuid": "c069967c-b407-431f-b3ee-0c687b3a2622", "first_name": "Dario", "last_name": "Zulauf", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} "404": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - test_example: + application/json: {"errors": [{"error_key": "", "category": ""}]} + put-v1-employees: + speakeasy-default-put-v1-employees: parameters: path: employee_id: "" - header: {} + header: + X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "first_name": "Weezy", "middle_initial": "F", "last_name": "Baby", "email": "tunechi@cashmoneyrecords.com", "work_email": "new.partner.work@example.com", "date_of_birth": "1991-01-31", "ssn": "824920233"} responses: "200": - application/json: {"uuid": "ce755bcc-c8d7-4dcc-aa1a-365fd9cb18c5", "first_name": "Weezy", "middle_initial": "F", "last_name": "Baby", "email": "tunechi@cashmoneyrecords.com", "company_uuid": "3753e3e8-d20b-4a9e-b83e-4a06f2976666", "version": "4eff5441d8f8ecc08f53a88ded36f13e", "department": null, "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "ad02c425-fa91-436b-b55a-9bd653306dd2", "employee_uuid": "ce755bcc-c8d7-4dcc-aa1a-365fd9cb18c5", "hire_date": "2024-05-15", "title": "", "primary": true, "two_percent_shareholder": false}], "date_of_birth": "1991-01-31", "has_ssn": true, "preferred_first_name": null, "payment_method": "Check"} + application/json: {"uuid": "2953c680-3178-4466-8441-8947dce42145", "first_name": "Pearl", "last_name": "Volkman", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} "404": - application/json: {"errors": [{"error_key": "base", "category": "invalid_resource_version", "message": "You are attempting to update a resource using an out-of-date version."}]} + application/json: {"errors": []} delete-v1-employee: speakeasy-default-delete-v1-employee: parameters: @@ -1164,16 +1195,15 @@ examples: header: X-Gusto-API-Version: "2024-04-01" get-v1-employees-employee_id-custom_fields: - Example: + speakeasy-default-get-v1-employees-employee-id-custom-fields: parameters: path: employee_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"custom_fields": [{"id": "ee515986-f3ca-49da-b576-2691b95262f9", "company_custom_field_id": "ea7e5d57-6abb-47d7-b654-347c142886c0", "name": "employee_level", "type": "text", "description": "Employee Level", "value": "2", "selection_options": null}, {"id": "3796e08d-c2e3-434c-b4de-4ce1893e7b59", "company_custom_field_id": "299650e4-e970-4acf-9bf0-6f05585d20ba", "name": "t-shirt size", "type": "text", "description": "What is your t-shirt size?", "value": "md", "selection_options": null}, {"id": "3796e08d-c2e3-434c-b4de-4ce1893e7b59", "company_custom_field_id": "024ec137-6c92-43a3-b061-14a9720531d6", "name": "favorite fruit", "type": "radio", "description": "Which is your favorite fruit?", "value": "apple", "selection_options": ["apple", "banana", "orange"]}]} + application/json: {} get-version-employees-time_off_activities: example: parameters: @@ -1183,6 +1213,9 @@ examples: time_off_type: "" header: X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: {} get-v1-employees-employee_id-terminations: Example: parameters: @@ -1237,7 +1270,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-companies-departments: Example: parameters: @@ -1302,7 +1335,7 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-department: Basic: parameters: @@ -1330,7 +1363,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-add-people-to-department: Example: parameters: @@ -1399,7 +1432,7 @@ examples: application/json: {"effective_date": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-employees-employee_id-terminations: Example: parameters: @@ -1429,7 +1462,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": ""} responses: "404": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -1440,7 +1473,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": ""} responses: "404": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -1451,10 +1484,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": ""} responses: "404": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-employees-employee_id-rehire: Example: parameters: @@ -1474,7 +1507,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} + application/json: {"effective_date": "", "file_new_hire_report": false, "work_location_uuid": ""} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -1496,10 +1529,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} + application/json: {"effective_date": "", "file_new_hire_report": false, "work_location_uuid": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-v1-employees-employee_id-rehire: Example: parameters: @@ -1519,7 +1552,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} responses: "404": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -1530,7 +1563,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} responses: "404": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -1541,10 +1574,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} responses: "404": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-rehire: Example: parameters: @@ -1568,7 +1601,7 @@ examples: "404": application/json: {"errors": [{"error_key": "employment", "category": "incorrect_state", "message": "The employee's employment is not in the right state."}]} get-v1-employees-employee_id-employment_history: - test_example: + speakeasy-default-get-v1-employees-employee-id-employment-history: parameters: path: employee_id: "" @@ -1576,11 +1609,11 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"hire_date": "2015-05-15", "termination_date": "2025-04-15", "file_new_hire_report": false, "two_percent_shareholder": false, "employment_status": "full_time"}] + application/json: [{}] "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-employees-employee_id-home_addresses: - Example: + speakeasy-default-get-v1-employees-employee-id-home-addresses: parameters: path: employee_id: "" @@ -1588,54 +1621,25 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": false, "uuid": "56260b3d-c375-415c-b77a-75d99f717193", "employee_uuid": "7087a288-8349-4632-b92e-bc94fb79f29e", "effective_date": "2021-01-01", "courtesy_withholding": true}, {"street_1": "100 5th Ave", "street_2": "Suite 555", "city": "New York", "state": "NY", "zip": "10001", "country": "USA", "active": true, "uuid": "d9f74049-8769-4fba-8e0f-eceef2da4e6b", "employee_uuid": "7087a288-8349-4632-b92e-bc94fb79f29e", "effective_date": "2022-03-03", "courtesy_withholding": true}] + application/json: [{"uuid": "7f46c443-0786-4970-81c1-0aa536dc7584", "country": "USA", "version": ""}] + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} post-v1-employees-employee_id-home_addresses: - Example: + speakeasy-default-post-v1-employees-employee-id-home-addresses: parameters: path: employee_id: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"street_1": "300 3rd Street", "street_2": null, "city": "San Francisco", "state": "CA", "zip": "94107", "effective_date": "2021-01-01", "courtesy_withholding": true} + application/json: {"street_1": "300 3rd Street", "city": "San Francisco", "state": "CA", "zip": "94107", "effective_date": "2022-01-31"} responses: "201": - application/json: {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": false, "uuid": "56260b3d-c375-415c-b77a-75d99f717193", "effective_date": "2021-01-01", "courtesy_withholding": true} - Basic: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"uuid": "b552472e-2d5c-4e19-bf31-49aeeb888b6e", "country": "USA", "version": ""} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-home_addresses-home_address_uuid: - Example: + speakeasy-default-get-v1-home-addresses-home-address-uuid: parameters: path: home_address_uuid: "" @@ -1643,82 +1647,32 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": false, "uuid": "56260b3d-c375-415c-b77a-75d99f717193", "effective_date": "2021-01-01", "courtesy_withholding": true} + application/json: {"uuid": "a4f1a0cf-7dc0-4905-a1cf-685935582da3", "country": "USA", "version": ""} + "404": + application/json: {"errors": []} put-v1-home_addresses-home_address_uuid: - Example: + speakeasy-default-put-v1-home-addresses-home-address-uuid: parameters: path: home_address_uuid: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "fe75bd065ff48b91c35fe8ff842f986c", "street_1": "300 3rd Street", "street_2": null, "city": "San Francisco", "state": "CA", "zip": "94107", "effective_date": "2021-01-01", "courtesy_withholding": true} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4"} responses: "200": - application/json: {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": false, "uuid": "56260b3d-c375-415c-b77a-75d99f717193", "effective_date": "2021-01-01", "courtesy_withholding": true} - Basic: - parameters: - path: - home_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - home_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - home_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"uuid": "d9fd058f-e693-4c4a-905f-3b5654a55589", "country": "USA", "version": ""} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} delete-v1-home_addresses-home_address_uuid: - Basic: + speakeasy-default-delete-v1-home-addresses-home-address-uuid: parameters: path: home_address_uuid: "" header: X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - home_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - home_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} get-v1-employees-employee_id-work_addresses: - Example: + speakeasy-default-get-v1-employees-employee-id-work-addresses: parameters: path: employee_id: "" @@ -1726,9 +1680,11 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "fc5b87dc-8d88-400d-b2da-c3587a7e5b15", "effective_date": "2022-01-01", "active": false, "location_uuid": "d9456c94-f561-40d2-afec-919da5f59196", "employee_uuid": "7597f3e3-31d4-4953-83a5-f95be78d2fe2", "version": "139f9769a2e543e6a1259173e1ee3b8d", "street_1": "800 Adolfo Gardens", "street_2": "Suite 419", "city": "Bremen", "state": "AL", "zip": "35033", "country": "USA"}, {"uuid": "be1c2e24-af86-4c36-b34e-3a55dbcdbdab", "effective_date": "2023-01-01", "active": true, "location_uuid": "6a119be7-b4b0-4e27-aaa0-89d5f2524635", "employee_uuid": "7597f3e3-31d4-4953-83a5-f95be78d2fe2", "version": "bbe8d4c741339c6b9e0e2e1c1b120816", "street_1": "2216 Icie Villages", "street_2": "Apt. 798", "city": "Big Delta", "state": "AK", "zip": "99737", "country": "USA"}] + application/json: [{"uuid": "d75effb0-13b9-46bb-96ed-33dad876923d", "version": "", "country": "USA"}] + "404": + application/json: {"errors": []} post-v1-employees-employee_id-work_addresses: - Example: + speakeasy-default-post-v1-employees-employee-id-work-addresses: parameters: path: employee_id: "" @@ -1738,42 +1694,11 @@ examples: application/json: {"location_uuid": "6a119be7-b4b0-4e27-aaa0-89d5f2524635", "effective_date": "2023-05-15"} responses: "201": - application/json: {"uuid": "56260b3d-c375-415c-b77a-75d99f717193", "effective_date": "2021-01-01", "active": false, "location_uuid": "6a27753a-3093-41c1-9f25-ea64f15e8266", "employee_uuid": "7087a288-8349-4632-b92e-bc94fb79f29e", "version": "", "street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA"} - Basic: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"uuid": "e02ec014-1e6b-41a8-ba57-7e102baa2d06", "version": "", "country": "USA"} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-work_addresses-work_address_uuid: - Example: + speakeasy-default-get-v1-work-addresses-work-address-uuid: parameters: path: work_address_uuid: "" @@ -1781,80 +1706,33 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "34925ef7-6234-440d-83b8-788a24d0d69a", "effective_date": "2023-05-15", "active": true, "location_uuid": "aba6d0fd-7294-4997-b1a4-bc9268c45932", "employee_uuid": "2363b9c0-6625-4425-9261-47627fd68783", "version": "6a22da647ed391f184a212e6e83a541d", "street_1": "977 Marks Viaduct", "street_2": null, "city": "Pink Hill", "state": "NC", "zip": "28572", "country": "USA"} + application/json: {"uuid": "8fd06c85-65da-4828-8c26-a27c15ea00ea", "version": "", "country": "USA"} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} put-v1-work_addresses-work_address_uuid: - Example: + speakeasy-default-put-v1-work-addresses-work-address-uuid: parameters: path: work_address_uuid: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"location_uuid": "6a119be7-b4b0-4e27-aaa0-89d5f2524635", "effective_date": "2023-05-15", "version": "e6db1baa29d3df1eb307ff6a12c778da"} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "location_uuid": "6a119be7-b4b0-4e27-aaa0-89d5f2524635", "effective_date": "2023-05-15"} responses: "200": - application/json: {"uuid": "34925ef7-6234-440d-83b8-788a24d0d69a", "effective_date": "2023-05-15", "active": true, "location_uuid": "aba6d0fd-7294-4997-b1a4-bc9268c45932", "employee_uuid": "2363b9c0-6625-4425-9261-47627fd68783", "version": "6a22da647ed391f184a212e6e83a541d", "street_1": "977 Marks Viaduct", "street_2": null, "city": "Pink Hill", "state": "NC", "zip": "28572", "country": "USA"} - Basic: - parameters: - path: - work_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - work_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - work_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"uuid": "27c58f85-7f90-4597-bc74-193b0a8d024d", "version": "", "country": "USA"} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} delete-v1-work_addresses-work_address_uuid: - Basic: + speakeasy-default-delete-v1-work-addresses-work-address-uuid: parameters: path: work_address_uuid: "" header: X-Gusto-API-Version: "2024-04-01" responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - work_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - work_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + "404": + application/json: {"errors": []} post-v1-jobs-job_id: Example: parameters: @@ -1866,7 +1744,7 @@ examples: application/json: {"title": "Regional Manager", "hire_date": "2020-12-21"} responses: "201": - application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": "null,", "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} + application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": true, "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} Basic: parameters: path: @@ -1899,7 +1777,7 @@ examples: application/json: {"title": "", "hire_date": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-compensations-compensation_id: Exempt: parameters: @@ -1930,7 +1808,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"payment_unit": "Paycheck", "flsa_status": "Commission Only Nonexempt"} + application/json: {"payment_unit": "Week", "flsa_status": "Salaried Nonexempt"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -1941,7 +1819,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"payment_unit": "Hour", "flsa_status": "Commission Only Exempt"} + application/json: {"payment_unit": "Week", "flsa_status": "Salaried Nonexempt"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -1952,32 +1830,30 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"payment_unit": "Month", "flsa_status": "Commission Only Exempt"} + application/json: {"payment_unit": "Week", "flsa_status": "Salaried Nonexempt"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-jobs: Example: parameters: path: employee_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "6c0ed1521e8b86eb36bd4455a63a2dac", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Client Support Director", "primary": true, "rate": "70000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": "null,", "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "2cd4b18662395eb53bcf80d5b5447f36", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "70000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]}] + application/json: [{"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "6c0ed1521e8b86eb36bd4455a63a2dac", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Client Support Director", "primary": true, "rate": "70000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": false, "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "2cd4b18662395eb53bcf80d5b5447f36", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "70000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]}] get-v1-jobs-job_id: Example: parameters: path: job_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": "null,", "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} + application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": false, "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} put-v1-jobs-job_id: Example: parameters: @@ -1989,7 +1865,7 @@ examples: application/json: {"version": "gr78930htutrz444kuytr3s5hgxykuveb523fwl8sir", "title": "Regional Manager", "hire_date": "2020-12-21"} responses: "200": - application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": "null,", "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} + application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": false, "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} Basic: parameters: path: @@ -2022,7 +1898,7 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-jobs-job_id: speakeasy-default-delete-v1-jobs-job-id: parameters: @@ -2035,7 +1911,6 @@ examples: parameters: path: job_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -2115,7 +1990,7 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-compensations-compensation_id: speakeasy-default-delete-v1-compensations-compensation-id: parameters: @@ -2167,7 +2042,7 @@ examples: application/json: {"name": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-earning_types: Example: parameters: @@ -2226,7 +2101,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-companies-company_id-earning_types-earning_type_uuid: speakeasy-default-delete-v1-companies-company-id-earning-types-earning-type-uuid: parameters: @@ -2243,12 +2118,12 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-04-01", "self_onboarding": true, "email": "johnson@johnson.com", "first_name": "Johnson", "last_name": "Johnson", "file_new_hire_report": "true,", "work_state": "CA"} + application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-04-01", "self_onboarding": true, "email": "johnson@johnson.com", "first_name": "Johnson", "last_name": "Johnson", "file_new_hire_report": false, "work_state": "CA"} responses: "201": - application/json: {"uuid": "7a621cf0-21cd-49cf-8540-3315211a509a", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "dab2ac34-b5e4-4577-aaf6-ee525de18376", "is_active": true, "hourly_rate": "50.0"} "422": - application/json: {"errors": []} + application/json: {"errors": [{"error_key": "", "category": ""}]} Create a Business contractor: parameters: path: @@ -2259,9 +2134,9 @@ examples: application/json: {"type": "Business", "wage_type": "Fixed", "start_date": "2020-04-01", "self_onboarding": false, "file_new_hire_report": false, "business_name": "Johnson-Johnson Contractors"} responses: "201": - application/json: {"uuid": "80a8e774-c2be-4cc3-8769-1775e0249856", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "dab2ac34-b5e4-4577-aaf6-ee525de18376", "is_active": true, "hourly_rate": "50.0"} "422": - application/json: {"errors": []} + application/json: {"errors": [{"error_key": "", "category": ""}]} Individual Contractor: parameters: path: @@ -2269,7 +2144,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "Individual", "wage_type": "Hourly", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "201": application/json: {"uuid": "c9fc1ad3-c107-4e7b-aa21-2dd4b00a7a07", "company_uuid": "b7457fec-3b76-43bb-9c6e-69cca4688942", "wage_type": "Hourly", "is_active": false, "version": "63859768485e218ccf8a449bb60f14ed", "type": "Individual", "first_name": "Kory", "last_name": "Gottlieb", "middle_initial": "P", "business_name": null, "ein": null, "has_ein": false, "email": "keira.west@mckenzie.org", "start_date": "2022-01-01", "address": null, "hourly_rate": "60.00", "file_new_hire_report": true, "work_state": "FL", "onboarded": true, "onboarding_status": "onboarding_completed", "payment_method": null, "has_ssn": true, "department_uuid": null} @@ -2280,7 +2155,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "Individual", "wage_type": "Hourly", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "201": application/json: {"uuid": "c7c0659c-21a6-4b4e-b74c-9252576fc68c", "company_uuid": "0ec4ae6e-e436-460d-b63c-94a14503d16f", "wage_type": "Fixed", "is_active": true, "version": "8aab307f1e8ed788697f8986346af559", "type": "Business", "first_name": null, "last_name": null, "middle_initial": null, "business_name": "Labadie-Stroman", "ein": "XX-XXX0001", "has_ein": true, "email": "jonatan@kerluke.info", "start_date": "2022-01-01", "address": null, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": false, "onboarding_status": "admin_onboarding_incomplete", "payment_method": null, "has_ssn": false} @@ -2302,7 +2177,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "Individual", "wage_type": "Hourly", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -2313,21 +2188,20 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "Individual", "wage_type": "Hourly", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_uuid-contractors: Example: parameters: path: company_uuid: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "c9fc1ad3-c107-4e7b-aa21-2dd4b00a7a07", "company_uuid": "b7457fec-3b76-43bb-9c6e-69cca4688942", "wage_type": "Fixed", "is_active": false, "version": "63859768485e218ccf8a449bb60f14ed", "type": "Individual", "first_name": "Kory", "last_name": "Gottlieb", "middle_initial": "P", "business_name": null, "ein": null, "has_ein": false, "email": "keira.west@mckenzie.org", "start_date": "2022-01-01", "address": {"street_1": "621 Jast Row", "street_2": "Apt. 281", "city": "Coral Springs", "state": "FL", "zip": "33065", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": true, "department_uuid": "1802465d-4f68-4865-920c-1307ab095f12"}, {"uuid": "183a86f4-a803-4b38-9357-cd9b78e2560c", "company_uuid": "afdd5d98-581b-4fc0-b988-706b7d23b2a5", "wage_type": "Fixed", "is_active": true, "version": "8aab307f1e8ed788697f8986346af559", "type": "Business", "first_name": null, "last_name": null, "middle_initial": null, "business_name": "Labadie-Stroman", "ein": "XX-XXX0001", "has_ein": true, "email": "jonatan@kerluke.info", "start_date": "2022-01-01", "address": {"street_1": "1625 Bednar Center", "street_2": "Apt. 480", "city": "Port Charlotte", "state": "FL", "zip": "33954", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": false}, {"uuid": "ea1c2d65-b622-4899-bcb7-5cd0fe0232aa", "company_uuid": "281c763d-a2ba-4f51-b9e8-b1ed61576d62", "wage_type": "Fixed", "is_active": true, "version": "b48c46abfed1487b873b442334b3c4ff", "type": "Individual", "first_name": "Chanel", "last_name": "Boyle", "middle_initial": "X", "business_name": null, "ein": null, "has_ein": false, "email": "loyal@hettinger.biz", "address": {"street_1": "35913 Darrick Run", "street_2": "Apt. 913", "city": "Cypress", "state": "TX", "zip": "77433", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": true, "work_state": "TX", "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": true}] + application/json: [{"uuid": "c9fc1ad3-c107-4e7b-aa21-2dd4b00a7a07", "company_uuid": "b7457fec-3b76-43bb-9c6e-69cca4688942", "wage_type": "Fixed", "is_active": false, "version": "63859768485e218ccf8a449bb60f14ed", "type": "Individual", "first_name": "Kory", "last_name": "Gottlieb", "middle_initial": "P", "business_name": null, "ein": null, "has_ein": false, "email": "keira.west@mckenzie.org", "start_date": "2022-01-01", "address": {"street_1": "621 Jast Row", "street_2": "Apt. 281", "city": "Coral Springs", "state": "FL", "zip": "33065", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": true, "department": "Backup Dancer", "department_uuid": "1802465d-4f68-4865-920c-1307ab095f12"}, {"uuid": "183a86f4-a803-4b38-9357-cd9b78e2560c", "company_uuid": "afdd5d98-581b-4fc0-b988-706b7d23b2a5", "wage_type": "Fixed", "is_active": true, "version": "8aab307f1e8ed788697f8986346af559", "type": "Business", "first_name": null, "last_name": null, "middle_initial": null, "business_name": "Labadie-Stroman", "ein": "XX-XXX0001", "has_ein": true, "email": "jonatan@kerluke.info", "start_date": "2022-01-01", "address": {"street_1": "1625 Bednar Center", "street_2": "Apt. 480", "city": "Port Charlotte", "state": "FL", "zip": "33954", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": false}, {"uuid": "ea1c2d65-b622-4899-bcb7-5cd0fe0232aa", "company_uuid": "281c763d-a2ba-4f51-b9e8-b1ed61576d62", "wage_type": "Fixed", "is_active": true, "version": "b48c46abfed1487b873b442334b3c4ff", "type": "Individual", "first_name": "Chanel", "last_name": "Boyle", "middle_initial": "X", "business_name": null, "ein": null, "has_ein": false, "email": "loyal@hettinger.biz", "address": {"street_1": "35913 Darrick Run", "street_2": "Apt. 913", "city": "Cypress", "state": "TX", "zip": "77433", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": true, "work_state": "TX", "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": true}] get-v1-contractors-contractor_uuid: Individual Contractor: parameters: @@ -2358,9 +2232,9 @@ examples: application/json: {"version": "b48c46abfed1487b873b442334b3c4ff", "type": "Individual", "wage_type": "Hourly", "start_date": "2021-01-01", "hourly_rate": "20.00", "self_onboarding": false, "first_name": "Chanel", "last_name": "Boyle", "middle_initial": "X", "file_new_hire_report": false, "is_active": true} responses: "200": - application/json: {"uuid": "d95fa7f0-e743-42ce-b47c-b60cc78135dd", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "1c0f975f-b446-4219-b9c7-27da3fb56262", "is_active": true, "hourly_rate": "50.0"} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": []} Update a Business Contractor: parameters: path: @@ -2371,9 +2245,9 @@ examples: application/json: {"version": "b48c46abfed1487b873b442334b3c4ff", "type": "Individual", "wage_type": "Fixed", "start_date": "2020-01-11", "self_onboarding": false, "file_new_hire_report": false, "business_name": "Contracting Solutions", "ein": "991113334", "is_active": false} responses: "200": - application/json: {"uuid": "85898c12-5a19-4071-8c55-62af6646dadb", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "1c0f975f-b446-4219-b9c7-27da3fb56262", "is_active": true, "hourly_rate": "50.0"} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": []} Individual Contractor: parameters: path: @@ -2381,7 +2255,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "200": application/json: {"uuid": "c9fc1ad3-c107-4e7b-aa21-2dd4b00a7a07", "company_uuid": "b7457fec-3b76-43bb-9c6e-69cca4688942", "wage_type": "Hourly", "is_active": false, "version": "63859768485e218ccf8a449bb60f14ed", "type": "Individual", "first_name": "Kory", "last_name": "Gottlieb", "middle_initial": "P", "business_name": null, "ein": null, "has_ein": false, "email": "keira.west@mckenzie.org", "start_date": "2022-01-01", "address": {"street_1": "621 Jast Row", "street_2": "Apt. 281", "city": "Coral Springs", "state": "FL", "zip": "33065", "country": "USA"}, "hourly_rate": "60.00", "file_new_hire_report": true, "work_state": "FL", "onboarded": true, "onboarding_status": "onboarding_completed", "payment_method": "Direct Deposit", "has_ssn": true, "department_uuid": "56260b3d-c375-415c-b77a-75d99f717193"} @@ -2392,7 +2266,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "200": application/json: {"uuid": "c7c0659c-21a6-4b4e-b74c-9252576fc68c", "company_uuid": "0ec4ae6e-e436-460d-b63c-94a14503d16f", "wage_type": "Fixed", "is_active": true, "version": "8aab307f1e8ed788697f8986346af559", "type": "Business", "first_name": null, "last_name": null, "middle_initial": null, "business_name": "Labadie-Stroman", "ein": "XX-XXX0001", "has_ein": true, "email": "jonatan@kerluke.info", "start_date": "2022-01-01", "address": null, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": false, "onboarding_status": "admin_onboarding_incomplete", "payment_method": "Direct Deposit", "has_ssn": false} @@ -2403,7 +2277,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -2414,7 +2288,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -2425,10 +2299,22 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + get-v1-companies-company_id-contractors-payment_details: + speakeasy-default-get-v1-companies-company-id-contractors-payment-details: + parameters: + path: + company_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{}] + "404": + application/json: {"errors": []} post-v1-webhook-subscription: Example: parameters: @@ -2444,7 +2330,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"url": "https://probable-heating.com/", "subscription_types": []} + application/json: {"url": "https://slow-median.com", "subscription_types": ["Location"]} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -2453,7 +2339,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"url": "https://well-documented-cd.biz", "subscription_types": []} + application/json: {"url": "https://slow-median.com", "subscription_types": ["Location"]} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -2462,10 +2348,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"url": "https://substantial-morbidity.net", "subscription_types": ["Employee", "Contractor", "BankAccount"]} + application/json: {"url": "https://slow-median.com", "subscription_types": ["Location"]} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-webhook-subscriptions: Example: parameters: @@ -2493,7 +2379,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"subscription_types": ["Company", "ExternalPayroll", "Payroll"]} + application/json: {"subscription_types": ["Payroll"]} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -2504,7 +2390,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"subscription_types": []} + application/json: {"subscription_types": ["Payroll"]} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -2515,10 +2401,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"subscription_types": ["EmployeeJobCompensation", "Signatory"]} + application/json: {"subscription_types": ["Payroll"]} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-webhook-subscription-uuid: Example: parameters: @@ -2580,7 +2466,7 @@ examples: application/json: {"verification_token": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-webhook-subscription-verification-token-uuid: speakeasy-default-get-v1-webhook-subscription-verification-token-uuid: parameters: @@ -2588,67 +2474,45 @@ examples: webhook_subscription_uuid: "" header: X-Gusto-API-Version: "2024-04-01" - get-v1-companies-company_id-payrolls: - Example: + get-v1-webhooks-health_check: + speakeasy-default-get-v1-webhooks-health-check: parameters: - path: - company_id: "" - query: - sort_order: "asc" header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": true, "processed_date": "2021-02-18", "calculated_at": "2021-02-18T12:00:00Z", "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "totals": {"company_debit": "121747.71", "net_pay_debit": "79283.80", "tax_debit": "42463.91", "reimbursement_debit": "0.00", "child_support_debit": "0.00", "reimbursements": "0.00", "net_pay": "81752.94", "gross_pay": "130635.89", "employee_bonuses": "0.00", "employee_commissions": "18536.37", "employee_cash_tips": "0.00", "employee_paycheck_tips": "0.00", "additional_earnings": "0.00", "owners_draw": "0.00", "check_amount": "2469.14", "employer_taxes": "6917.19", "employee_taxes": "35546.72", "benefits": "0.00", "employee_benefits_deductions": "13336.23", "imputed_pay": "0.00", "deferred_payroll_taxes": "0.00", "other_deductions": "240.00"}, "created_at": "2021-02-01T22:00:00Z", "reversal_payroll_uuids": []}, {"payroll_deadline": "2021-02-28", "check_date": "2021-03-01", "processed": false, "processed_date": "nil", "calculated_at": "nil", "uuid": "01307237-5128-4fcf-b2da-ce8dbbbb0c50", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "external": false, "pay_period": {"start_date": "2021-02-16", "end_date": "2021-03-01", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "created_at": "2022-02-01T22:00:00Z"}] - get-v1-companies-company_id-payrolls-payroll_id: - Unprocessed: + application/json: {} + get-v1-companies-company_id-payrolls: + speakeasy-default-get-v1-companies-company-id-payrolls: parameters: path: company_id: "" - payroll_id: "" - query: {} + query: + start_date: "2020-01-31" + end_date: "2020-01-31" + sort_order: "asc" header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": false, "processed_date": "", "calculated_at": "", "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "created_at": "2022-02-01T22:00:00Z", "submission_blockers": [{"blocker_type": "fast_ach_threshold_exceeded", "blocker_name": "Fast ACH Threshold Exceeded", "unblock_options": [{"unblock_type": "wire_in", "check_date": "2024-06-10T00:00:00Z"}, {"unblock_type": "move_to_four_day", "check_date": "2024-06-12T00:00:00Z", "metadata": {}}], "selected_option": null, "status": "unresolved"}], "processing_request": null} - Processed: + application/json: [{}] + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} + get-v1-companies-company_id-payrolls-payroll_id: + speakeasy-default-get-v1-companies-company-id-payrolls-payroll-id: parameters: path: company_id: "" payroll_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": true, "processed_date": "2021-02-18", "calculated_at": "2021-02-18T12:00:00Z", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": true, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "totals": {"company_debit": "121747.71", "net_pay_debit": "79283.80", "tax_debit": "42463.91", "reimbursement_debit": "0.00", "child_support_debit": "0.00", "reimbursements": "0.00", "net_pay": "81752.94", "gross_pay": "130635.89", "employee_bonuses": "0.00", "employee_commissions": "18536.37", "employee_cash_tips": "0.00", "employee_paycheck_tips": "0.00", "additional_earnings": "0.00", "owners_draw": "0.00", "check_amount": "2469.14", "employer_taxes": "6917.19", "employee_taxes": "35546.72", "benefits": "0.00", "employee_benefits_deductions": "13336.23", "imputed_pay": "0.00", "deferred_payroll_taxes": "0.00", "other_deductions": "240.00"}, "employee_compensations": [{"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7067", "excluded": false, "gross_pay": "2791.25", "net_pay": "1953.31", "check_amount": "1953.31", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242ba5"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909ba"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "15.000", "job_uuid": "9d3760f0-d1f9-4700-8817-0fe2dce5cf23", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "b5eef9a9-4a87-4649-a80d-14878c05f44e", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}, {"name": "Regular Hours", "hours": "40.000", "job_uuid": "332bd171-9efc-432b-abbb-a75c9dba706a", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "5.000", "job_uuid": "ca9b3dc1-57ac-4736-901a-9b1c9634b9d5", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "1bad01e2-140c-49ed-9542-2388ce4a19b3", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": true}, {"name": "401K", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": false}], "deductions": [{"name": "Child Support", "amount": "80.00"}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": "646.69"}, {"name": "Social Security", "employer": true, "amount": "191.25"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7012", "excluded": false, "gross_pay": "2791.25", "net_pay": "1953.31", "check_amount": "1953.31", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242b34"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e90955"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Commission Only Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": true}, {"name": "401K", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": false}], "deductions": [{"name": "Child Support", "amount": "80.00"}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": "646.69"}, {"name": "Social Security", "employer": true, "amount": "191.25"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7781", "excluded": false, "gross_pay": "2791.25", "net_pay": "1953.31", "check_amount": "1953.31", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242bab"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909cd"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": true}, {"name": "401K", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": false}], "deductions": [{"name": "Child Support", "amount": "80.00"}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": "646.69"}, {"name": "Social Security", "employer": true, "amount": "191.25"}]}], "company_taxes": [{"name": "MO Compensation Deduction", "employer": true, "amount": "-0.92"}, {"name": "NY MCTMT", "employer": true, "amount": "5.00"}], "created_at": "2022-02-01T22:00:00Z", "credit_blockers": [{"blocker_type": "waiting_for_wire_in", "blocker_name": "Waiting for Wire In", "unblock_options": [{"unblock_type": "submit_wire", "check_date": "2024-06-10T00:00:00Z"}], "selected_option": "submit_wire", "status": "unresolved"}], "processing_request": {"status": "submit_success", "errors": []}} + application/json: {} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} put-v1-companies-company_id-payrolls: - Example: - parameters: - path: - company_id: "" - payroll_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"employee_compensations": [{}, {}, {}]} - responses: - "200": - application/json: {"payroll_deadline": "2022-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": false, "processed_date": "", "calculated_at": "", "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "off_cycle_reason": null, "auto_pilot": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2022-02-22", "initial_check_date": "2022-02-22", "expected_debit_time": "2022-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2022-02-18T22:00:00Z"}, "employee_compensations": [{"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7067", "excluded": false, "version": "4ba36d23a78c7393b4900ef38019d8ff", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242ba5"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909ba"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "15.000", "job_uuid": "9d3760f0-d1f9-4700-8817-0fe2dce5cf23", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "b5eef9a9-4a87-4649-a80d-14878c05f44e", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}, {"name": "Regular Hours", "hours": "40.000", "job_uuid": "332bd171-9efc-432b-abbb-a75c9dba706a", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "5.000", "job_uuid": "ca9b3dc1-57ac-4736-901a-9b1c9634b9d5", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "1bad01e2-140c-49ed-9542-2388ce4a19b3", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7012", "excluded": false, "version": "ff083257a5583291fb86656ad0df1b42", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242b34"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e90955"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Commission Only Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7781", "excluded": false, "version": "259816479e3729bf855318af9b9adddf", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242bab"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909cd"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}], "created_at": "2022-02-01T22:00:00Z", "fixed_compensation_types": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Anniversary Bonus"}, {"name": "Internet Stipend"}, {"name": "Reimbursement"}], "processing_request": null} - Basic: - parameters: - path: - company_id: "" - payroll_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"employee_compensations": [{}, {}]} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: + speakeasy-default-put-v1-companies-company-id-payrolls: parameters: path: company_id: "" @@ -2658,20 +2522,10 @@ examples: requestBody: application/json: {"employee_compensations": [{}]} responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - company_id: "" - payroll_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"employee_compensations": [{}, {}, {}]} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + "200": + application/json: {} + "404": + application/json: {"errors": []} put-v1-companies-company_id-payrolls-payroll_id-prepare: Example: parameters: @@ -2682,7 +2536,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"payroll_deadline": "2022-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": false, "processed_date": "", "calculated_at": "", "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "off_cycle_reason": null, "auto_pilot": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2022-02-22", "initial_check_date": "2022-02-22", "expected_debit_time": "2022-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2022-02-18T22:00:00Z"}, "employee_compensations": [{"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7067", "excluded": false, "version": "4ba36d23a78c7393b4900ef38019d8ff", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242ba5"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909ba"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "15.000", "job_uuid": "9d3760f0-d1f9-4700-8817-0fe2dce5cf23", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "b5eef9a9-4a87-4649-a80d-14878c05f44e", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}, {"name": "Regular Hours", "hours": "40.000", "job_uuid": "332bd171-9efc-432b-abbb-a75c9dba706a", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "5.000", "job_uuid": "ca9b3dc1-57ac-4736-901a-9b1c9634b9d5", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "1bad01e2-140c-49ed-9542-2388ce4a19b3", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7012", "excluded": false, "version": "ff083257a5583291fb86656ad0df1b42", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242b34"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e90955"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Commission Only Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7781", "excluded": false, "version": "259816479e3729bf855318af9b9adddf", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242bab"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909cd"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}], "created_at": "2022-02-01T22:00:00Z", "fixed_compensation_types": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Anniversary Bonus"}, {"name": "Internet Stipend"}, {"name": "Reimbursement"}], "processing_request": null} + application/json: {"payroll_deadline": "2022-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": false, "processed_date": null, "calculated_at": null, "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "off_cycle_reason": null, "auto_pilot": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2022-02-22", "initial_check_date": "2022-02-22", "expected_debit_time": "2022-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2022-02-18T22:00:00Z"}, "employee_compensations": [{"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7067", "excluded": false, "version": "4ba36d23a78c7393b4900ef38019d8ff", "first_name": "Patricia", "preferred_first_name": "Patricia", "last_name": "Hamil", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242ba5"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909ba"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "15.000", "job_uuid": "9d3760f0-d1f9-4700-8817-0fe2dce5cf23", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "b5eef9a9-4a87-4649-a80d-14878c05f44e", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}, {"name": "Regular Hours", "hours": "40.000", "job_uuid": "332bd171-9efc-432b-abbb-a75c9dba706a", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "5.000", "job_uuid": "ca9b3dc1-57ac-4736-901a-9b1c9634b9d5", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "1bad01e2-140c-49ed-9542-2388ce4a19b3", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7012", "excluded": false, "version": "ff083257a5583291fb86656ad0df1b42", "first_name": "Soren", "preferred_first_name": "Soren", "last_name": "Keck", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242b34"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e90955"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Commission Only Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7781", "excluded": false, "version": "259816479e3729bf855318af9b9adddf", "first_name": "Patty", "preferred_first_name": "Patty", "last_name": "Tam", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242bab"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909cd"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}], "created_at": "2022-02-01T22:00:00Z", "fixed_compensation_types": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Anniversary Bonus"}, {"name": "Internet Stipend"}, {"name": "Reimbursement"}], "processing_request": null} post-v1-payrolls-payroll_id-calculate_accruing_time_off_hours: Example: parameters: @@ -2731,9 +2585,9 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-contractor_payments: - Example: + speakeasy-default-get-v1-companies-company-id-contractor-payments: parameters: path: company_id: "" @@ -2756,74 +2610,61 @@ examples: responses: "200": application/json: {"uuid": "04552eb9-7829-4b18-ae96-6983552948df", "contractor_uuid": "bc57832c-d8bc-43a7-ae99-3a03380ff037", "bonus": "20.0", "date": "2020-10-19", "hours": "40.0", "payment_method": "Direct Deposit", "reimbursement": "100.0", "status": "Unfunded", "hourly_rate": "18.0", "may_cancel": true, "wage": "0.0", "wage_type": "Hourly", "wage_total": "740.00"} - get-v1-companies-company_id-contractor_payment_groups: + post-payrolls-payroll_uuid-reports-general_ledger: Example: parameters: path: - company_id: "" - query: - start_date: "2020-01-01" - end_date: "2020-12-31" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "200": - application/json: [{"uuid": "7f2337f9-9b78-44b9-aeed-be4777b833a8", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-03-15T00:00:00Z", "debit_date": "2024-03-11T00:00:00Z", "status": "Funded", "creation_token": "a51a3500-3200-43af-a738-169d4b66a9db", "totals": {"debit_amount": "740.00", "wage_amount": "720.00", "reimbursement_amount": "20.00"}}, {"uuid": "56260b3d-c375-415c-b77a-75d99f717193", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-05-02T00:00:00Z", "debit_date": "2024-04-26T00:00:00Z", "status": "Unfunded", "creation_token": "45ef81bb-ae24-4ad1-b2c6-6e563a4c30ed", "totals": {"debit_amount": "2365.00", "wage_amount": "2270.00", "reimbursement_amount": "95.00"}}] - post-v1-companies-company_id-contractor_payment_groups-preview: - Example: - parameters: - path: - company_id: "" + payroll_uuid: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": [{"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}]} + application/json: {"aggregation": "default"} responses: "200": - application/json: {"uuid": "nil", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-05-07T00:00:00Z", "debit_date": "2024-05-01T00:00:00Z", "status": "Unfunded", "creation_token": "nil", "totals": {"amount": "2295.0", "debit_amount": "2295.0", "wage_amount": "2220.0", "reimbursement_amount": "75.0"}, "contractor_payments": [{"uuid": "nil", "contractor_uuid": "2e6d0970-31bf-47ce-bdb4-713e4207ecf4", "bonus": "0.0", "hours": "40.0", "payment_method": "Direct Deposit", "reimbursement": "75.0", "status": "Unfunded", "hourly_rate": "18.0", "may_cancel": false, "wage": "0.0", "wage_type": "Hourly", "wage_total": "720.0"}, {"uuid": "nil", "contractor_uuid": "a975fda0-fcf5-469a-a5fd-06e43d1cd99d", "bonus": "0.0", "hours": "0.0", "payment_method": "Check", "reimbursement": "0.0", "status": "Unfunded", "hourly_rate": "0.0", "may_cancel": false, "wage": "1500.0", "wage_type": "Fixed", "wage_total": "1500.0"}]} + application/json: {"payroll_uuid": "a83d0bd8-7d20-43b9-834c-6d514ef6cb20", "aggregation": "integration", "integration_type": "xero", "request_uuid": "p83d0ca8-7d41-42a9-834y-7d218ef6cb20"} Basic: parameters: path: - company_id: "" + payroll_uuid: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": []} + application/json: {"aggregation": "default"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} Resource: parameters: path: - company_id: "" + payroll_uuid: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": [{"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}, {"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}]} + application/json: {"aggregation": "default"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} Nested: parameters: path: - company_id: "" + payroll_uuid: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": [{"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}, {"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}]} + application/json: {"aggregation": "default"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} - get-v1-contractor_payment_groups-contractor_payment_group_id: + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + get-reports-request_uuid: Example: parameters: path: - contractor_payment_group_uuid: "" + request_uuid: "" header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "f693e034-d833-46e3-88d4-2c820c383c57", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-05-07T00:00:00Z", "debit_date": "2024-05-01T00:00:00Z", "status": "Unfunded", "creation_token": "45ef81bb-ae24-4ad1-b2c6-6e563a4c30ed", "totals": {"amount": "2295.0", "debit_amount": "2295.0", "wage_amount": "2220.0", "reimbursement_amount": "75.0"}, "contractor_payments": [{"uuid": "630dc982-f498-4ebc-a6dc-4d76711027ce", "contractor_uuid": "2e6d0970-31bf-47ce-bdb4-713e4207ecf4", "bonus": "0.0", "hours": "40.0", "payment_method": "Direct Deposit", "reimbursement": "75.0", "status": "Unfunded", "hourly_rate": "18.0", "may_cancel": false, "wage": "0.0", "wage_type": "Hourly", "wage_total": "720.0"}, {"uuid": "12f51eba-d653-4357-8c05-1f1f8d0fd5e3", "contractor_uuid": "a975fda0-fcf5-469a-a5fd-06e43d1cd99d", "bonus": "0.0", "hours": "0.0", "payment_method": "Check", "reimbursement": "0.0", "status": "Unfunded", "hourly_rate": "0.0", "may_cancel": false, "wage": "1500.0", "wage_type": "Fixed", "wage_total": "1500.0"}]} + application/json: {"request_uuid": "p83d0ca8-7d41-42a9-834y-7d218ef6cb20", "status": "succeeded", "report_urls": ["https://report.url.com"]} post-v1-companies-company_id-company_benefits: Example: parameters: @@ -2832,7 +2673,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "description": "yuck vice between gee ugh ha"} + application/json: {"active": true, "description": "hm pfft surge beyond"} responses: "201": application/json: {"version": "98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", "company_uuid": "881ce3f2-e3e1-49c9-8ad4-0bcf515f5618", "uuid": "d2cec746-caee-464a-bcaf-00d93f7049c9", "benefit_type": 1, "active": true, "description": "Kaiser Permanente", "source": "external", "partner_name": "XYZ Corp", "deletable": true, "supports_percentage_amounts": true, "responsible_for_employer_taxes": false, "responsible_for_employee_w2": false} @@ -2843,7 +2684,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "description": "bulky electronics through for ick superb nudge embalm simple ouch"} + application/json: {"active": true, "description": "hm pfft surge beyond"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -2854,7 +2695,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "description": "yahoo until planula conceal pfft partially till distant zowie nasalise"} + application/json: {"active": true, "description": "hm pfft surge beyond"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -2865,16 +2706,15 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "description": "down ha who political inside bony procurement funny entwine institute"} + application/json: {"active": true, "description": "hm pfft surge beyond"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-company_benefits: Example: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -2885,7 +2725,6 @@ examples: parameters: path: company_benefit_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -2935,9 +2774,9 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-company_benefits-company_benefit_id: - Example: + speakeasy-default-delete-v1-company-benefits-company-benefit-id: parameters: path: company_benefit_id: "" @@ -2945,7 +2784,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": {"base": [{"type": "error type", "message": "This is an error message", "full_message": "This is a more descriptive error message"}]}} + application/json: {} get-v1-benefits: Supported Benefits: parameters: @@ -2976,13 +2815,12 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"start_date": "2022-01-01", "end_date": "2022-12-31", "description": "Simple IRA", "company_benefit_deduction": "60.0", "company_benefit_contribution": "30.0"} + application/json: {"start_date": "2022-01-01", "end_date": "2022-12-31", "description": "Simple IRA", "company_benefit_deduction": "60.0", "company_benefit_contribution": "30.0", "employees": {}} get-v1-company_benefits-company_benefit_id-employee_benefits: Example: parameters: path: company_benefit_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -3007,7 +2845,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"employee_benefits": []} + application/json: {"employee_benefits": [{"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}]} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -3018,7 +2856,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"employee_benefits": [{"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}, {"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}, {"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}]} + application/json: {"employee_benefits": [{"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}]} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -3029,10 +2867,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"employee_benefits": []} + application/json: {"employee_benefits": [{"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}]} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-benefits-benefits_id-requirements: Example: parameters: @@ -3042,7 +2880,62 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"employee_deduction": {"required": true, "editable": true, "choices": [""]}, "contribution": {"required": true, "editable": true, "default_value": {"value": "2", "type": "percentage"}, "choices": ["percentage"]}, "deduct_as_percentage": {"required": true, "editable": true, "choices": ["", "", ""]}, "catch_up": {"required": true, "editable": true, "choices": [""]}, "limit_option": {"required": false, "editable": false, "choices": [""]}, "company_contribution_annual_maximum": {"required": false, "editable": false, "choices": ["", ""]}, "coverage_salary_multiplier": {"required": false, "editable": false, "choices": ["", ""]}, "coverage_amount": {"required": false, "editable": false, "choices": ["", "", ""]}} + application/json: {"employee_deduction": {"required": true, "editable": true, "default_value": {}, "choices": ["", ""]}, "contribution": {"required": true, "editable": true, "default_value": {"value": "2", "type": "percentage"}, "choices": ["percentage"]}, "deduct_as_percentage": {"required": true, "editable": true, "default_value": {}, "choices": ["", ""]}, "catch_up": {"required": true, "editable": true, "default_value": {}, "choices": ["", ""]}, "limit_option": {"required": false, "editable": false, "default_value": {}, "choices": [""]}, "company_contribution_annual_maximum": {"required": false, "editable": false, "default_value": {}, "choices": [""]}, "coverage_salary_multiplier": {"required": false, "editable": false, "default_value": {}, "choices": ["", ""]}, "coverage_amount": {"required": false, "editable": false, "default_value": {}, "choices": ["", ""]}} + get-v1-company_benefits-company_benefit_id-contribution_exclusions: + Example: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{"contribution_uuid": "b82e35c5-d7c6-4705-9e16-9f87499ade18", "contribution_type": "Bonus", "excluded": false}, {"contribution_uuid": "f5618c94-ed7d-4366-b2c4-ff05e430064f", "contribution_type": "Cash Tips", "excluded": false}, {"contribution_uuid": "60191999-004a-49d9-b163-630574433653", "contribution_type": "Commission", "excluded": false}, {"contribution_uuid": "75a7a827-1f2d-4d6f-94f2-514c1fc32b13", "contribution_type": "Regular", "excluded": false}, {"contribution_uuid": "eead3c7c-7964-4e3c-b609-670456127b09", "contribution_type": "Life insurance imputed benefit", "excluded": true}] + put-v1-company_benefits-company_benefit_id-contribution_exclusions: + Example: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "082dfd3e-5b55-11f0-bb42-ab7136ba04e2", "contribution_type": "Bonus", "excluded": true}, {"contribution_uuid": "082e034c-5b55-11f0-bb42-ab7136ba04e2", "contribution_type": "Commission", "excluded": false}, {"contribution_uuid": "082e1f6c-5b55-11f0-bb42-ab7136ba04e2", "contribution_type": "Regular", "excluded": true}]} + responses: + "200": + application/json: [{"contribution_uuid": "b82e35c5-d7c6-4705-9e16-9f87499ade18", "contribution_type": "Bonus", "excluded": false}, {"contribution_uuid": "f5618c94-ed7d-4366-b2c4-ff05e430064f", "contribution_type": "Cash Tips", "excluded": false}, {"contribution_uuid": "60191999-004a-49d9-b163-630574433653", "contribution_type": "Commission", "excluded": false}, {"contribution_uuid": "75a7a827-1f2d-4d6f-94f2-514c1fc32b13", "contribution_type": "Regular", "excluded": false}, {"contribution_uuid": "eead3c7c-7964-4e3c-b609-670456127b09", "contribution_type": "Life insurance imputed benefit", "excluded": true}] + Basic: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "", "contribution_type": "", "excluded": true}]} + responses: + "422": + application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} + Resource: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "", "contribution_type": "", "excluded": true}]} + responses: + "422": + application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} + Nested: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "", "contribution_type": "", "excluded": true}]} + responses: + "422": + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-employees-employee_id-employee_benefits: Example: parameters: @@ -3098,13 +2991,12 @@ examples: application/json: {"company_benefit_uuid": "", "active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-employee_benefits: Example: parameters: path: employee_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -3184,7 +3076,7 @@ examples: application/json: {"version": "", "employee_deduction": "0.00", "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-employee_benefits-employee_benefit_id: speakeasy-default-delete-v1-employee-benefits-employee-benefit-id: parameters: @@ -3212,7 +3104,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"tax_year": 5621.31, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} + application/json: {"tax_year": 1828.56, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -3223,7 +3115,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"tax_year": 2733.34, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} + application/json: {"tax_year": 1828.56, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -3234,10 +3126,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"tax_year": 9236.96, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} + application/json: {"tax_year": 1828.56, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-employees-employee_id-garnishments: Example: parameters: @@ -3268,7 +3160,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "amount": "", "court_ordered": true, "times": null, "recurring": false, "annual_maximum": null, "pay_period_maximum": null, "deduct_as_percentage": false} + application/json: {"active": true, "amount": "", "court_ordered": false, "times": null, "recurring": false, "annual_maximum": null, "pay_period_maximum": null, "deduct_as_percentage": false} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -3290,16 +3182,15 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "amount": "", "court_ordered": true, "times": null, "recurring": false, "annual_maximum": null, "pay_period_maximum": null, "deduct_as_percentage": false} + application/json: {"active": true, "amount": "", "court_ordered": false, "times": null, "recurring": false, "annual_maximum": null, "pay_period_maximum": null, "deduct_as_percentage": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-garnishments: Example: parameters: path: employee_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -3379,7 +3270,7 @@ examples: application/json: {"active": true, "times": null, "recurring": false, "annual_maximum": null, "pay_period_maximum": null, "deduct_as_percentage": false, "version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-garnishments-child_support: Example: parameters: @@ -3403,12 +3294,11 @@ examples: parameters: path: company_uuid: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "status": "approved", "company_uuid": "123e4567-e89b-12d3-a456-426655440000", "time_zone": "America/Los_Angeles", "entity_type": "Employee", "entity_uuid": "123e4567-e89b-12d3-a456-426655440000", "version": "72deb67e16f7b92713c00d3582fa6c68", "job_uuid": "123e4567-e89b-12d3-a456-426655440000", "shift_started_at": "2025-03-04T13:07:10Z", "shift_ended_at": "2025-03-04T16:07:10Z", "created_at": "2025-04-29T16:08:53Z", "updated_at": "2025-04-29T16:08:53Z", "entries": [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Regular"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Overtime"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Double overtime"}]}] + application/json: [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "status": "approved", "company_uuid": "123e4567-e89b-12d3-a456-426655440000", "time_zone": "America/Los_Angeles", "entity_type": "Employee", "entity_uuid": "123e4567-e89b-12d3-a456-426655440000", "version": "72deb67e16f7b92713c00d3582fa6c68", "job_uuid": "123e4567-e89b-12d3-a456-426655440000", "shift_started_at": "2025-03-04T13:07:10Z", "shift_ended_at": "2025-03-04T16:07:10Z", "created_at": "2025-04-29T16:08:53Z", "updated_at": "2025-04-29T16:08:53Z", "metadata": {}, "entries": [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Regular"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Overtime"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Double overtime"}]}] post-companies-company_uuid-time_tracking-time_sheets: Example: parameters: @@ -3419,6 +3309,8 @@ examples: requestBody: application/json: {"entity_uuid": "123e4567-e89b-12d3-a456-426614174000", "entity_type": "Employee", "job_uuid": "123e4567-e89b-12d3-a456-426614174000", "time_zone": "America/New_York", "shift_started_at": "2024-06-10T09:00:00Z", "shift_ended_at": "2024-06-10T17:00:00Z", "metadata": {"custom_field": "custom value"}, "entries": [{"hours_worked": 1.5, "pay_classification": "Regular"}]} responses: + "201": + application/json: {} "422": application/json: {"errors": []} example: @@ -3429,7 +3321,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "201": - application/json: {"uuid": "123e4567-e89b-12d3-a456-426655440000", "status": "approved", "company_uuid": "123e4567-e89b-12d3-a456-426655440000", "time_zone": "America/Los_Angeles", "entity_type": "Employee", "entity_uuid": "123e4567-e89b-12d3-a456-426655440000", "version": "72deb67e16f7b92713c00d3582fa6c68", "job_uuid": "123e4567-e89b-12d3-a456-426655440000", "shift_started_at": "2025-03-04T13:07:10Z", "shift_ended_at": "2025-03-04T16:07:10Z", "created_at": "2025-04-29T16:08:53Z", "updated_at": "2025-04-29T16:08:53Z", "entries": [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Regular"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Overtime"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Double overtime"}]} + application/json: {"uuid": "123e4567-e89b-12d3-a456-426655440000", "status": "approved", "company_uuid": "123e4567-e89b-12d3-a456-426655440000", "time_zone": "America/Los_Angeles", "entity_type": "Employee", "entity_uuid": "123e4567-e89b-12d3-a456-426655440000", "version": "72deb67e16f7b92713c00d3582fa6c68", "job_uuid": "123e4567-e89b-12d3-a456-426655440000", "shift_started_at": "2025-03-04T13:07:10Z", "shift_ended_at": "2025-03-04T16:07:10Z", "created_at": "2025-04-29T16:08:53Z", "updated_at": "2025-04-29T16:08:53Z", "metadata": {}, "entries": [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Regular"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Overtime"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Double overtime"}]} Basic: parameters: path: @@ -3456,7 +3348,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-time_tracking-time_sheets-time_sheet_uuid: example: parameters: @@ -3466,7 +3358,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "123e4567-e89b-12d3-a456-426655440000", "status": "approved", "company_uuid": "123e4567-e89b-12d3-a456-426655440000", "time_zone": "America/Los_Angeles", "entity_type": "Employee", "entity_uuid": "123e4567-e89b-12d3-a456-426655440000", "version": "72deb67e16f7b92713c00d3582fa6c68", "job_uuid": "123e4567-e89b-12d3-a456-426655440000", "shift_started_at": "2025-03-04T13:07:10Z", "shift_ended_at": "2025-03-04T16:07:10Z", "created_at": "2025-04-29T16:08:53Z", "updated_at": "2025-04-29T16:08:53Z", "entries": [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Regular"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Overtime"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Double overtime"}]} + application/json: {"uuid": "123e4567-e89b-12d3-a456-426655440000", "status": "approved", "company_uuid": "123e4567-e89b-12d3-a456-426655440000", "time_zone": "America/Los_Angeles", "entity_type": "Employee", "entity_uuid": "123e4567-e89b-12d3-a456-426655440000", "version": "72deb67e16f7b92713c00d3582fa6c68", "job_uuid": "123e4567-e89b-12d3-a456-426655440000", "shift_started_at": "2025-03-04T13:07:10Z", "shift_ended_at": "2025-03-04T16:07:10Z", "created_at": "2025-04-29T16:08:53Z", "updated_at": "2025-04-29T16:08:53Z", "metadata": {}, "entries": [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Regular"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Overtime"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Double overtime"}]} put-time_tracking-time_sheets-time_sheet_uuid: Example: parameters: @@ -3477,23 +3369,29 @@ examples: requestBody: application/json: {"version": "72deb67e16f7b92713c00d3582fa6c68", "entity_uuid": "123e4567-e89b-12d3-a456-426614174000", "entity_type": "Employee", "job_uuid": "123e4567-e89b-12d3-a456-426614174000", "time_zone": "America/New_York", "shift_started_at": "2024-06-10T09:00:00Z", "shift_ended_at": "2024-06-10T17:00:00Z", "metadata": {"custom_field": "custom value"}, "entries": [{"uuid": "123e4567-e89b-12d3-a456-426614174000", "hours_worked": 1.5}]} responses: + "200": + application/json: {} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": []} example: parameters: path: time_sheet_uuid: "" header: X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4"} responses: "200": - application/json: {"uuid": "123e4567-e89b-12d3-a456-426655440000", "status": "approved", "company_uuid": "123e4567-e89b-12d3-a456-426655440000", "time_zone": "America/Los_Angeles", "entity_type": "Employee", "entity_uuid": "123e4567-e89b-12d3-a456-426655440000", "version": "72deb67e16f7b92713c00d3582fa6c68", "job_uuid": "123e4567-e89b-12d3-a456-426655440000", "shift_started_at": "2025-03-04T13:07:10Z", "shift_ended_at": "2025-03-04T16:07:10Z", "created_at": "2025-04-29T16:08:53Z", "updated_at": "2025-04-29T16:08:53Z", "entries": [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Regular"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Overtime"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Double overtime"}]} + application/json: {"uuid": "123e4567-e89b-12d3-a456-426655440000", "status": "approved", "company_uuid": "123e4567-e89b-12d3-a456-426655440000", "time_zone": "America/Los_Angeles", "entity_type": "Employee", "entity_uuid": "123e4567-e89b-12d3-a456-426655440000", "version": "72deb67e16f7b92713c00d3582fa6c68", "job_uuid": "123e4567-e89b-12d3-a456-426655440000", "shift_started_at": "2025-03-04T13:07:10Z", "shift_ended_at": "2025-03-04T16:07:10Z", "created_at": "2025-04-29T16:08:53Z", "updated_at": "2025-04-29T16:08:53Z", "metadata": {}, "entries": [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Regular"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Overtime"}, {"uuid": "123e4567-e89b-12d3-a456-426655440000", "hours_worked": "1.000", "pay_classification": "Double overtime"}]} Basic: parameters: path: time_sheet_uuid: "" header: X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -3503,6 +3401,8 @@ examples: time_sheet_uuid: "" header: X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -3512,9 +3412,11 @@ examples: time_sheet_uuid: "" header: X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-time_tracking-time_sheets-time_sheet_uuid: Basic: parameters: @@ -3548,6 +3450,27 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} -examplesVersion: 1.0.1 + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + get-company-notifications: + speakeasy-default-get-company-notifications: + parameters: + path: + company_uuid: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{"uuid": "8ad92898-591b-4d89-a22e-81f1cfdbf03e", "company_uuid": "", "title": "", "message": "", "status": "resolved", "category": "", "actionable": false, "can_block_payroll": false, "published_at": "", "due_at": null, "resources": []}] + get-v1-companies-company_id-time_off_requests: + speakeasy-default-get-v1-companies-company-id-time-off-requests: + parameters: + path: + company_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{}] +examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Python SDK Changes Detected:\n* `gusto_app_integration.contractors.get()`: \n * `request.sort_by` **Added**\n * `response.[]` **Changed** **Breaking** :warning:\n* `gusto_app_integration.company_benefits.get_employee_benefits()`: `response.[]` **Changed** **Breaking** :warning:\n* `gusto_app_integration.employee_benefits.update()`: `response` **Changed** **Breaking** :warning:\n* `gusto_app_integration.employee_benefits.get()`: `response` **Changed** **Breaking** :warning:\n* `gusto_app_integration.employee_benefits.get_all()`: `response.[]` **Changed** **Breaking** :warning:\n* `gusto_app_integration.employee_benefits.create()`: `response` **Changed** **Breaking** :warning:\n* `gusto_app_integration.company_benefits.bulk_update_employee_benefits()`: \n * `request.employee_benefits.[]` **Changed**\n * `response.[]` **Changed** **Breaking** :warning:\n* `gusto_app_integration.payrolls.prepare()`: \n * `request` **Changed**\n * `response` **Changed** **Breaking** :warning:\n* `gusto_app_integration.payrolls.update()`: \n * `request` **Changed**\n * `response` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto_app_integration.employee_addresses.delete_home_address()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[422]` **Removed** **Breaking** :warning:\n* `gusto_app_integration.payrolls.get()`: \n * `request` **Changed**\n * `response` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto_app_integration.companies.get()`: `response.locations.[]` **Changed** **Breaking** :warning:\n* `gusto_app_integration.companies.update()`: `response.locations.[]` **Changed** **Breaking** :warning:\n* `gusto_app_integration.companies.get_custom_fields()`: `response.custom_fields.[].description` **Changed** **Breaking** :warning:\n* `gusto_app_integration.payrolls.get_for_company()`: \n * `request` **Changed**\n * `response.[]` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto_app_integration.contractors.update()`: `response` **Changed** **Breaking** :warning:\n* `gusto_app_integration.contractors.get_by_id()`: `response` **Changed** **Breaking** :warning:\n* `gusto_app_integration.contractors.create()`: `response` **Changed** **Breaking** :warning:\n* `gusto_app_integration.pay_schedules.get_assignments()`: `response.employees.[].pay_schedule_uuid` **Changed** **Breaking** :warning:\n* `gusto_app_integration.employees.get()`: \n * `request` **Changed**\n * `response.[]` **Changed** **Breaking** :warning:\n* `gusto_app_integration.employees.create()`: \n * `request.work_email` **Added**\n * `response` **Changed** **Breaking** :warning:\n* `gusto_app_integration.employees.get_by_id()`: \n * `request.include` **Changed**\n * `response` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto_app_integration.employees.update()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n* `gusto_app_integration.employee_employments.get_history()`: `response.[].termination_date` **Changed** **Breaking** :warning:\n* `gusto_app_integration.locations.create()`: `response.inactive` **Added**\n* `gusto_app_integration.contractors.get-v1-companies-company_id-contractors-payment_details()`: **Added**\n* `gusto_app_integration.webhooks.get-v1-webhooks-health_check()`: **Added**\n* `gusto_app_integration.employee_addresses.list_home_addresses()`: \n * `request.x-gusto-api-version` **Changed**\n * `response.[]` **Changed**\n * `error.status[404]` **Added**\n* `gusto_app_integration.contractor_payment_groups.preview()`: **Deleted** **Breaking** :warning:\n* `gusto_app_integration.employee_addresses.get_work_addresses()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto_app_integration.employee_addresses.create_work_address()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto_app_integration.employee_addresses.get_work_address()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto_app_integration.employee_addresses.update_work_address()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto_app_integration.employee_addresses.delete_work_address()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto_app_integration.jobs.create()`: `response` **Changed**\n* `gusto_app_integration.jobs_and_compensations.get_jobs()`: `response.[]` **Changed**\n* `gusto_app_integration.jobs_and_compensations.get()`: `response` **Changed**\n* `gusto_app_integration.jobs_and_compensations.update_job()`: `response` **Changed**\n* `gusto_app_integration.company_locations.list()`: `response.[].inactive` **Added**\n* `gusto_app_integration.employee_addresses.create()`: \n * `request` **Changed**\n * `response` **Changed**\n * `error.status[404]` **Added**\n* `gusto_app_integration.locations.update()`: `response.inactive` **Added**\n* `gusto_app_integration.locations.get()`: `response.inactive` **Added**\n* `gusto_app_integration.employee_addresses.get()`: \n * `request.x-gusto-api-version` **Changed**\n * `response` **Changed**\n * `error.status[404]` **Added**\n* `gusto_app_integration.contractor_payment_groups.fetch()`: **Deleted** **Breaking** :warning:\n* `gusto_app_integration.contractor_payment_groups.get()`: **Deleted** **Breaking** :warning:\n* `gusto_app_integration.time_off_requests.get-v1-companies-company_id-time_off_requests()`: **Added**\n* `gusto_app_integration.company_benefits.list_supported()`: `response.[].writable_by_application` **Added**\n* `gusto_app_integration.company_benefits.get()`: `response.writable_by_application` **Added**\n* `gusto_app_integration.employee_addresses.update()`: \n * `request` **Changed**\n * `response` **Changed**\n * `error.status[404]` **Added**\n* `gusto_app_integration.notifications.get-company-notifications()`: **Added**\n* `gusto_app_integration.company_benefits.put-v1-company_benefits-company_benefit_id-contribution_exclusions()`: **Added**\n* `gusto_app_integration.company_benefits.get-v1-company_benefits-company_benefit_id-contribution_exclusions()`: **Added**\n* `gusto_app_integration.reports.get-reports-request_uuid()`: **Added**\n* `gusto_app_integration.reports.post-payrolls-payroll_uuid-reports-general_ledger()`: **Added**\n" diff --git a/gusto_app_int/.speakeasy/gen.yaml b/gusto_app_int/.speakeasy/gen.yaml index 8eff4a06..2a995f80 100644 --- a/gusto_app_int/.speakeasy/gen.yaml +++ b/gusto_app_int/.speakeasy/gen.yaml @@ -4,6 +4,7 @@ generation: maintainOpenAPIOrder: true usageSnippets: optionalPropertyRendering: withExample + sdkInitStyle: constructor useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true @@ -15,13 +16,25 @@ generation: auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true + hoistGlobalSecurity: true + schemas: + allOfMergeStrategy: shallowMerge + tests: + generateTests: true + generateNewTests: false + skipResponseBodyAssertions: false python: - version: 0.3.0 + version: 0.4.0 additionalDependencies: dev: {} main: {} + allowedRedefinedBuiltins: + - id + - object + asyncMode: both authors: - Speakeasy + baseErrorName: GustoAppIntegrationError clientServerStatusCodesAsErrors: true defaultErrorName: APIError description: Python Client SDK Generated by Speakeasy. @@ -41,10 +54,15 @@ python: shared: "" webhooks: "" inputModelSuffix: input + legacyPyright: true maxMethodParams: 999 methodArguments: infer-optional-args + moduleName: "" outputModelSuffix: output + packageManager: poetry packageName: gusto_app_integration + pytestFilterWarnings: [] pytestTimeout: 0 responseFormat: flat + sseFlatResponse: false templateVersion: v2 diff --git a/gusto_app_int/README-PYPI.md b/gusto_app_int/README-PYPI.md index f54ce982..bc35dd90 100644 --- a/gusto_app_int/README-PYPI.md +++ b/gusto_app_int/README-PYPI.md @@ -23,21 +23,21 @@ Gusto API: Welcome to Gusto's Embedded Payroll API documentation! ## Table of Contents -* [gusto_app_integration](https://github.com/Gusto/gusto-python-client/blob/master/#gustoappintegration) - * [SDK Installation](https://github.com/Gusto/gusto-python-client/blob/master/#sdk-installation) - * [IDE Support](https://github.com/Gusto/gusto-python-client/blob/master/#ide-support) - * [SDK Example Usage](https://github.com/Gusto/gusto-python-client/blob/master/#sdk-example-usage) - * [Authentication](https://github.com/Gusto/gusto-python-client/blob/master/#authentication) - * [Available Resources and Operations](https://github.com/Gusto/gusto-python-client/blob/master/#available-resources-and-operations) - * [Retries](https://github.com/Gusto/gusto-python-client/blob/master/#retries) - * [Error Handling](https://github.com/Gusto/gusto-python-client/blob/master/#error-handling) - * [Server Selection](https://github.com/Gusto/gusto-python-client/blob/master/#server-selection) - * [Custom HTTP Client](https://github.com/Gusto/gusto-python-client/blob/master/#custom-http-client) - * [Resource Management](https://github.com/Gusto/gusto-python-client/blob/master/#resource-management) - * [Debugging](https://github.com/Gusto/gusto-python-client/blob/master/#debugging) -* [Development](https://github.com/Gusto/gusto-python-client/blob/master/#development) - * [Maturity](https://github.com/Gusto/gusto-python-client/blob/master/#maturity) - * [Contributions](https://github.com/Gusto/gusto-python-client/blob/master/#contributions) +* [gusto_app_integration](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#gustoappintegration) + * [SDK Installation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#sdk-installation) + * [IDE Support](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#ide-support) + * [SDK Example Usage](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#sdk-example-usage) + * [Authentication](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#authentication) + * [Available Resources and Operations](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#available-resources-and-operations) + * [Retries](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#retries) + * [Error Handling](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#error-handling) + * [Server Selection](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#server-selection) + * [Custom HTTP Client](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#custom-http-client) + * [Resource Management](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#resource-management) + * [Debugging](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#debugging) +* [Development](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#development) + * [Maturity](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#maturity) + * [Contributions](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#contributions) @@ -49,7 +49,15 @@ Gusto API: Welcome to Gusto's Embedded Payroll API documentation! > > Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated. -The SDK can be installed with either *pip* or *poetry* package managers. +The SDK can be installed with *uv*, *pip*, or *poetry* package managers. + +### uv + +*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities. + +```bash +uv add gusto_app_integration +``` ### PIP @@ -116,6 +124,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u ```python # Synchronous Example +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -123,7 +132,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -131,10 +140,12 @@ with GustoAppIntegration(
-The same SDK client can also be used to make asychronous requests by importing asyncio. +The same SDK client can also be used to make asynchronous requests by importing asyncio. + ```python # Asynchronous Example import asyncio +import gusto_app_integration from gusto_app_integration import GustoAppIntegration async def main(): @@ -143,7 +154,7 @@ async def main(): company_access_auth="", ) as gai_client: - res = await gai_client.introspection.get_token_info_async() + res = await gai_client.introspection.get_token_info_async(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -165,6 +176,7 @@ This SDK supports the following security scheme globally: To authenticate with the API the `company_access_auth` parameter must be set when initializing the SDK client instance. For example: ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -172,7 +184,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -191,7 +203,7 @@ with GustoAppIntegration() as gai_client: gai_client.introspection.disconnect_app_integration(security=gusto_app_integration.PostV1DisconnectAppIntegrationSecurity( system_access_auth="", - ), company_id="") + ), company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -204,191 +216,201 @@ with GustoAppIntegration() as gai_client:
Available methods -### [companies](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md) - -* [provision](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#provision) - Create a company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#get) - Get a company -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#update) - Update a company -* [get_admins](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#get_admins) - Get all the admins at a company -* [get_custom_fields](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#get_custom_fields) - Get the custom fields of a company - -### [company_benefits](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md) +### [companies](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companies/README.md) + +* [provision](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companies/README.md#provision) - Create a company +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companies/README.md#get) - Get a company +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companies/README.md#update) - Update a company +* [get_admins](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companies/README.md#get_admins) - Get all the admins at a company +* [get_custom_fields](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companies/README.md#get_custom_fields) - Get the custom fields of a company + +### [company_benefits](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md) + +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#create) - Create a company benefit +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#list) - Get benefits for a company +* [get_by_id](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#get_by_id) - Get a company benefit +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#update) - Update a company benefit +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#delete) - Delete a company benefit +* [list_supported](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#list_supported) - Get all benefits supported by Gusto +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#get) - Get a supported benefit by ID +* [get_summary](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#get_summary) - Get company benefit summary by company benefit id. +* [get_employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#get_employee_benefits) - Get all employee benefits for a company benefit +* [bulk_update_employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#bulk_update_employee_benefits) - Bulk update employee benefits for a company benefit +* [get_requirements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#get_requirements) - Get benefit fields requirements by ID +* [get_v1_company_benefits_company_benefit_id_contribution_exclusions](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#get_v1_company_benefits_company_benefit_id_contribution_exclusions) - Get contribution exclusions for a company benefit +* [put_v1_company_benefits_company_benefit_id_contribution_exclusions](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companybenefits/README.md#put_v1_company_benefits_company_benefit_id_contribution_exclusions) - Update contribution exclusions for a company benefit + +### [company_locations](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companylocations/README.md) + +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/companylocations/README.md#list) - Get company locations + +### [contractor_payments](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/contractorpayments/README.md) -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#create) - Create a company benefit -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#list) - Get benefits for a company -* [get_by_id](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#get_by_id) - Get a company benefit -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#update) - Update a company benefit -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#delete) - Delete a company benefit -* [list_supported](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#list_supported) - Get all benefits supported by Gusto -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#get) - Get a supported benefit by ID -* [get_summary](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#get_summary) - Get company benefit summary by company benefit id. -* [get_employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#get_employee_benefits) - Get all employee benefits for a company benefit -* [bulk_update_employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#bulk_update_employee_benefits) - Bulk update employee benefits for a company benefit -* [get_requirements](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#get_requirements) - Get benefit fields requirements by ID +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/contractorpayments/README.md#get) - Get contractor payments for a company +* [get_by_id](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/contractorpayments/README.md#get_by_id) - Get a single contractor payment + +### [contractors](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/contractors/README.md) + +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/contractors/README.md#create) - Create a contractor +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/contractors/README.md#get) - Get contractors of a company +* [get_by_id](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/contractors/README.md#get_by_id) - Get a contractor +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/contractors/README.md#update) - Update a contractor +* [get_v1_companies_company_id_contractors_payment_details](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/contractors/README.md#get_v1_companies_company_id_contractors_payment_details) - List contractor payment details + +### [departments](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/departments/README.md) + +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/departments/README.md#create) - Create a department +* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/departments/README.md#get_all) - Get all departments of a company +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/departments/README.md#get) - Get a department +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/departments/README.md#update) - Update a department +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/departments/README.md#delete) - Delete a department +* [add_people](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/departments/README.md#add_people) - Add people to a department +* [remove_people](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/departments/README.md#remove_people) - Remove people from a department -### [company_locations](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companylocations/README.md) +### [earning_types](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/earningtypes/README.md) -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companylocations/README.md#list) - Get company locations +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/earningtypes/README.md#create) - Create a custom earning type +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/earningtypes/README.md#get) - Get all earning types for a company +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/earningtypes/README.md#update) - Update an earning type +* [deactivate](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/earningtypes/README.md#deactivate) - Deactivate an earning type -### [contractor_payment_groups](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentgroups/README.md) +### [employee_addresses](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeaddresses/README.md) -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentgroups/README.md#get) - Get contractor payment groups for a company -* [preview](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentgroups/README.md#preview) - Preview a contractor payment group -* [fetch](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentgroups/README.md#fetch) - Fetch a contractor payment group +* [list_home_addresses](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeaddresses/README.md#list_home_addresses) - Get an employee's home addresses +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeaddresses/README.md#create) - Create an employee's home address +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeaddresses/README.md#get) - Get an employee's home address +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeaddresses/README.md#update) - Update an employee's home address +* [delete_home_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeaddresses/README.md#delete_home_address) - Delete an employee's home address +* [get_work_addresses](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeaddresses/README.md#get_work_addresses) - Get an employee's work addresses +* [create_work_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeaddresses/README.md#create_work_address) - Create an employee work address +* [get_work_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeaddresses/README.md#get_work_address) - Get an employee work address +* [update_work_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeaddresses/README.md#update_work_address) - Update an employee work address +* [delete_work_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeaddresses/README.md#delete_work_address) - Delete an employee's work address -### [contractor_payments](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpayments/README.md) +### [employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeebenefits/README.md) -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpayments/README.md#get) - Get contractor payments for a company -* [get_by_id](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpayments/README.md#get_by_id) - Get a single contractor payment +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeebenefits/README.md#create) - Create an employee benefit +* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeebenefits/README.md#get_all) - Get all benefits for an employee +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeebenefits/README.md#get) - Get an employee benefit +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeebenefits/README.md#update) - Update an employee benefit +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeebenefits/README.md#delete) - Delete an employee benefit +* [get_ytd_benefit_amounts_from_different_company](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeebenefits/README.md#get_ytd_benefit_amounts_from_different_company) - Get year-to-date benefit amounts from a different company +* [create_ytd_benefit_amounts_from_different_company](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeebenefits/README.md#create_ytd_benefit_amounts_from_different_company) - Create year-to-date benefit amounts from a different company -### [contractors](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md) +### [employee_employments](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeemployments/README.md) -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#create) - Create a contractor -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#get) - Get contractors of a company -* [get_by_id](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#get_by_id) - Get a contractor -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#update) - Update a contractor +* [create_termination](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeemployments/README.md#create_termination) - Create an employee termination +* [delete_termination](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeemployments/README.md#delete_termination) - Delete an employee termination +* [update_termination](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeemployments/README.md#update_termination) - Update an employee termination +* [create_rehire](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeemployments/README.md#create_rehire) - Create an employee rehire +* [update_rehire](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeemployments/README.md#update_rehire) - Update an employee rehire +* [get_rehire](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeemployments/README.md#get_rehire) - Get an employee rehire +* [delete_rehire](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeemployments/README.md#delete_rehire) - Delete an employee rehire +* [get_history](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employeeemployments/README.md#get_history) - Get employment history for an employee -### [departments](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md) +### [employees](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employees/README.md) -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#create) - Create a department -* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#get_all) - Get all departments of a company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#get) - Get a department -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#update) - Update a department -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#delete) - Delete a department -* [add_people](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#add_people) - Add people to a department -* [remove_people](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#remove_people) - Remove people from a department +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employees/README.md#get) - Get employees of a company +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employees/README.md#create) - Create an employee +* [get_by_id](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employees/README.md#get_by_id) - Get an employee +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employees/README.md#update) - Update an employee. +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employees/README.md#delete) - Delete an onboarding employee +* [get_custom_fields](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employees/README.md#get_custom_fields) - Get an employee's custom fields +* [get_time_off_activities](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employees/README.md#get_time_off_activities) - Get employee time off activities +* [get_terminations](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/employees/README.md#get_terminations) - Get terminations for an employee -### [earning_types](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/earningtypes/README.md) +### [events](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/events/README.md) -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/earningtypes/README.md#create) - Create a custom earning type -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/earningtypes/README.md#get) - Get all earning types for a company -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/earningtypes/README.md#update) - Update an earning type -* [deactivate](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/earningtypes/README.md#deactivate) - Deactivate an earning type +* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/events/README.md#get_all) - Get all events -### [employee_addresses](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md) +### [garnishments](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/garnishments/README.md) -* [list_home_addresses](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#list_home_addresses) - Get an employee's home addresses -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#create) - Create an employee's home address -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#get) - Get an employee's home address -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#update) - Update an employee's home address -* [delete_home_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#delete_home_address) - Delete an employee's home address -* [get_work_addresses](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#get_work_addresses) - Get an employee's work addresses -* [create_work_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#create_work_address) - Create an employee work address -* [get_work_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#get_work_address) - Get an employee work address -* [update_work_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#update_work_address) - Update an employee work address -* [delete_work_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#delete_work_address) - Delete an employee's work address +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/garnishments/README.md#create) - Create a garnishment +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/garnishments/README.md#get) - Get garnishments for an employee +* [get_by_id](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/garnishments/README.md#get_by_id) - Get a garnishment +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/garnishments/README.md#update) - Update a garnishment +* [get_child_support](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/garnishments/README.md#get_child_support) - Get child support garnishment data -### [employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md) +### [introspection](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/introspection/README.md) -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#create) - Create an employee benefit -* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#get_all) - Get all benefits for an employee -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#get) - Get an employee benefit -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#update) - Update an employee benefit -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#delete) - Delete an employee benefit -* [get_ytd_benefit_amounts_from_different_company](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#get_ytd_benefit_amounts_from_different_company) - Get year-to-date benefit amounts from a different company -* [create_ytd_benefit_amounts_from_different_company](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#create_ytd_benefit_amounts_from_different_company) - Create year-to-date benefit amounts from a different company +* [get_token_info](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/introspection/README.md#get_token_info) - Get info about the current access token +* [revoke](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/introspection/README.md#revoke) - Revoke access token +* [refresh_access_token](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/introspection/README.md#refresh_access_token) - Refresh access token +* [disconnect_app_integration](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/introspection/README.md#disconnect_app_integration) - Disconnect an app integration -### [employee_employments](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md) +### [jobs](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobs/README.md) -* [create_termination](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#create_termination) - Create an employee termination -* [delete_termination](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#delete_termination) - Delete an employee termination -* [update_termination](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#update_termination) - Update an employee termination -* [create_rehire](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#create_rehire) - Create an employee rehire -* [update_rehire](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#update_rehire) - Update an employee rehire -* [get_rehire](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#get_rehire) - Get an employee rehire -* [delete_rehire](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#delete_rehire) - Delete an employee rehire -* [get_history](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#get_history) - Get employment history for an employee +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobs/README.md#create) - Create a job +* [create_compensation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobs/README.md#create_compensation) - Create a compensation -### [employees](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md) +### [jobs_and_compensations](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobsandcompensations/README.md) -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#get) - Get employees of a company -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#create) - Create an employee -* [get_by_id](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#get_by_id) - Get an employee -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#update) - Update an employee. -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#delete) - Delete an onboarding employee -* [get_custom_fields](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#get_custom_fields) - Get an employee's custom fields -* [get_time_off_activities](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#get_time_off_activities) - Get employee time off activities -* [get_terminations](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#get_terminations) - Get terminations for an employee +* [get_jobs](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobsandcompensations/README.md#get_jobs) - Get jobs for an employee +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobsandcompensations/README.md#get) - Get a job +* [update_job](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobsandcompensations/README.md#update_job) - Update a job +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobsandcompensations/README.md#delete) - Delete an individual job +* [get_compensations_for_job](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobsandcompensations/README.md#get_compensations_for_job) - Get compensations for a job +* [get_compensation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobsandcompensations/README.md#get_compensation) - Get a compensation +* [update_compensation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobsandcompensations/README.md#update_compensation) - Update a compensation +* [delete_compensation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/jobsandcompensations/README.md#delete_compensation) - Delete a compensation -### [events](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/events/README.md) +### [locations](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/locations/README.md) -* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/events/README.md#get_all) - Get all events +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/locations/README.md#create) - Create a company location +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/locations/README.md#get) - Get a location +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/locations/README.md#update) - Update a location +* [get_minimum_wages](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/locations/README.md#get_minimum_wages) - Get minimum wages for a location -### [garnishments](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md) +### [notifications](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/notifications/README.md) -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md#create) - Create a garnishment -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md#get) - Get garnishments for an employee -* [get_by_id](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md#get_by_id) - Get a garnishment -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md#update) - Update a garnishment -* [get_child_support](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md#get_child_support) - Get child support garnishment data +* [get_company_notifications](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/notifications/README.md#get_company_notifications) - Get notifications for company +### [pay_schedules](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/payschedules/README.md) -### [introspection](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/introspection/README.md) +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/payschedules/README.md#list) - Get the pay schedules for a company +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/payschedules/README.md#get) - Get a pay schedule +* [get_pay_periods](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/payschedules/README.md#get_pay_periods) - Get pay periods for a company +* [get_unprocessed_termination_pay_periods](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/payschedules/README.md#get_unprocessed_termination_pay_periods) - Get termination pay periods for a company +* [get_assignments](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/payschedules/README.md#get_assignments) - Get pay schedule assignments for a company -* [get_token_info](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/introspection/README.md#get_token_info) - Get info about the current access token -* [revoke](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/introspection/README.md#revoke) - Revoke access token -* [refresh_access_token](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/introspection/README.md#refresh_access_token) - Refresh access token -* [disconnect_app_integration](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/introspection/README.md#disconnect_app_integration) - Disconnect an app integration +### [payrolls](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/payrolls/README.md) -### [jobs](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobs/README.md) +* [get_for_company](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/payrolls/README.md#get_for_company) - Get all payrolls for a company +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/payrolls/README.md#get) - Get a single payroll +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/payrolls/README.md#update) - Update a payroll by ID +* [prepare](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/payrolls/README.md#prepare) - Prepare a payroll for update -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobs/README.md#create) - Create a job -* [create_compensation](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobs/README.md#create_compensation) - Create a compensation +### [reports](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/reports/README.md) -### [jobs_and_compensations](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md) +* [post_payrolls_payroll_uuid_reports_general_ledger](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/reports/README.md#post_payrolls_payroll_uuid_reports_general_ledger) - Create a general ledger report +* [get_reports_request_uuid](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/reports/README.md#get_reports_request_uuid) - Get a report -* [get_jobs](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#get_jobs) - Get jobs for an employee -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#get) - Get a job -* [update_job](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#update_job) - Update a job -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#delete) - Delete an individual job -* [get_compensations_for_job](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#get_compensations_for_job) - Get compensations for a job -* [get_compensation](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#get_compensation) - Get a compensation -* [update_compensation](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#update_compensation) - Update a compensation -* [delete_compensation](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#delete_compensation) - Delete a compensation +### [time_off_policies](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/timeoffpolicies/README.md) -### [locations](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/locations/README.md) +* [calculate_accruing_time_off_hours](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/timeoffpolicies/README.md#calculate_accruing_time_off_hours) - Calculate accruing time off hours -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/locations/README.md#create) - Create a company location -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/locations/README.md#get) - Get a location -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/locations/README.md#update) - Update a location -* [get_minimum_wages](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/locations/README.md#get_minimum_wages) - Get minimum wages for a location +### [time_off_requests](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/timeoffrequests/README.md) -### [pay_schedules](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md) +* [get_v1_companies_company_id_time_off_requests](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/timeoffrequests/README.md#get_v1_companies_company_id_time_off_requests) - Get time off requests for a company -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#list) - Get the pay schedules for a company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#get) - Get a pay schedule -* [get_pay_periods](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#get_pay_periods) - Get pay periods for a company -* [get_unprocessed_termination_pay_periods](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#get_unprocessed_termination_pay_periods) - Get termination pay periods for a company -* [get_assignments](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#get_assignments) - Get pay schedule assignments for a company +### [time_tracking](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/timetracking/README.md) -### [payrolls](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md) +* [get_companies_company_uuid_time_tracking_time_sheets](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/timetracking/README.md#get_companies_company_uuid_time_tracking_time_sheets) - Get all time sheets for a company +* [post_companies_company_uuid_time_tracking_time_sheets](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/timetracking/README.md#post_companies_company_uuid_time_tracking_time_sheets) - Create a time sheet +* [get_time_tracking_time_sheets_time_sheet_uuid](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/timetracking/README.md#get_time_tracking_time_sheets_time_sheet_uuid) - Get a time sheet +* [put_time_tracking_time_sheets_time_sheet_uuid](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/timetracking/README.md#put_time_tracking_time_sheets_time_sheet_uuid) - Update a time sheet +* [delete_time_tracking_time_sheets_time_sheet_uuid](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/timetracking/README.md#delete_time_tracking_time_sheets_time_sheet_uuid) - Delete a time sheet -* [get_for_company](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#get_for_company) - Get all payrolls for a company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#get) - Get a single payroll -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#update) - Update a payroll by ID -* [prepare](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#prepare) - Prepare a payroll for update +### [webhooks](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/webhooks/README.md) -### [time_off_policies](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md) - -* [calculate_accruing_time_off_hours](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md#calculate_accruing_time_off_hours) - Calculate accruing time off hours - -### [time_tracking](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timetracking/README.md) - -* [get_companies_company_uuid_time_tracking_time_sheets](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timetracking/README.md#get_companies_company_uuid_time_tracking_time_sheets) - Get all time sheets for a company -* [post_companies_company_uuid_time_tracking_time_sheets](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timetracking/README.md#post_companies_company_uuid_time_tracking_time_sheets) - Create a time sheet -* [get_time_tracking_time_sheets_time_sheet_uuid](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timetracking/README.md#get_time_tracking_time_sheets_time_sheet_uuid) - Get a time sheet -* [put_time_tracking_time_sheets_time_sheet_uuid](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timetracking/README.md#put_time_tracking_time_sheets_time_sheet_uuid) - Update a time sheet -* [delete_time_tracking_time_sheets_time_sheet_uuid](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timetracking/README.md#delete_time_tracking_time_sheets_time_sheet_uuid) - Delete a time sheet - -### [webhooks](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md) - -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#create) - Create a webhook subscription -* [list_subscriptions](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#list_subscriptions) - List webhook subscriptions -* [update_subscription](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#update_subscription) - Update a webhook subscription -* [get_subscription](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#get_subscription) - Get a webhook subscription -* [delete_subscription](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#delete_subscription) - Delete a webhook subscription -* [verify](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#verify) - Verify the webhook subscription -* [request_verification_token](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#request_verification_token) - Request the webhook subscription verification_token +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/webhooks/README.md#create) - Create a webhook subscription +* [list_subscriptions](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/webhooks/README.md#list_subscriptions) - List webhook subscriptions +* [update_subscription](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/webhooks/README.md#update_subscription) - Update a webhook subscription +* [get_subscription](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/webhooks/README.md#get_subscription) - Get a webhook subscription +* [delete_subscription](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/webhooks/README.md#delete_subscription) - Delete a webhook subscription +* [verify](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/webhooks/README.md#verify) - Verify the webhook subscription +* [request_verification_token](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/webhooks/README.md#request_verification_token) - Request the webhook subscription verification_token +* [get_v1_webhooks_health_check](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/docs/sdks/webhooks/README.md#get_v1_webhooks_health_check) - Get the webhooks health status
@@ -400,6 +422,7 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call: ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration from gusto_app_integration.utils import BackoffStrategy, RetryConfig @@ -408,7 +431,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info(, + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) # Handle response @@ -418,6 +441,7 @@ with GustoAppIntegration( If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK: ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration from gusto_app_integration.utils import BackoffStrategy, RetryConfig @@ -427,7 +451,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -438,26 +462,18 @@ with GustoAppIntegration( ## Error Handling -Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception. - -By default, an API error will raise a models.APIError exception, which has the following properties: +[`GustoAppIntegrationError`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/./src/gusto_app_integration/models/gustoappintegrationerror.py) is the base class for all HTTP error responses. It has the following properties: -| Property | Type | Description | -|-----------------|------------------|-----------------------| -| `.status_code` | *int* | The HTTP status code | -| `.message` | *str* | The error message | -| `.raw_response` | *httpx.Response* | The raw HTTP response | -| `.body` | *str* | The response content | - -When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `provision_async` method may raise the following exceptions: - -| Error Type | Status Code | Content Type | -| ------------------------------------- | ----------- | ---------------- | -| models.UnprocessableEntityErrorObject | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Property | Type | Description | +| ------------------ | ---------------- | --------------------------------------------------------------------------------------- | +| `err.message` | `str` | Error message | +| `err.status_code` | `int` | HTTP response status code eg `404` | +| `err.headers` | `httpx.Headers` | HTTP response headers | +| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. | +| `err.raw_response` | `httpx.Response` | Raw HTTP response | +| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#error-classes). | ### Example - ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration, models @@ -501,18 +517,47 @@ with GustoAppIntegration() as gai_client: "phone": "2345678901", }, ], - }) + }, x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) - except models.UnprocessableEntityErrorObject as e: - # handle e.data: models.UnprocessableEntityErrorObjectData - raise(e) - except models.APIError as e: - # handle exception - raise(e) + + except models.GustoAppIntegrationError as e: + # The base class for HTTP error responses + print(e.message) + print(e.status_code) + print(e.body) + print(e.headers) + print(e.raw_response) + + # Depending on the method different errors may be thrown + if isinstance(e, models.UnprocessableEntityErrorObject): + print(e.data.errors) # List[gusto_app_integration.EntityErrorObject] ``` + +### Error Classes +**Primary error:** +* [`GustoAppIntegrationError`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/./src/gusto_app_integration/models/gustoappintegrationerror.py): The base class for HTTP error responses. + +
Less common errors (7) + +
+ +**Network errors:** +* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors. + * [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server. + * [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out. + + +**Inherit from [`GustoAppIntegrationError`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/./src/gusto_app_integration/models/gustoappintegrationerror.py)**: +* [`UnprocessableEntityErrorObject`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/./src/gusto_app_integration/models/unprocessableentityerrorobject.py): Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. Applicable to 59 of 121 methods.* +* [`DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/./src/gusto_app_integration/models/deletev1companybenefitscompanybenefitidresponsebody.py): Unprocessable Entity. Status code `422`. Applicable to 1 of 121 methods.* +* [`ResponseValidationError`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/./src/gusto_app_integration/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. + +
+ +\* Check [the method documentation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_app_int/#available-resources-and-operations) to see if the error is applicable. @@ -530,6 +575,7 @@ You can override the default server globally by passing a server name to the `se #### Example ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -538,7 +584,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -549,6 +595,7 @@ with GustoAppIntegration( The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example: ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -557,7 +604,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/README.md b/gusto_app_int/README.md index f0f78a9a..c0526230 100644 --- a/gusto_app_int/README.md +++ b/gusto_app_int/README.md @@ -49,7 +49,15 @@ Gusto API: Welcome to Gusto's Embedded Payroll API documentation! > > Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated. -The SDK can be installed with either *pip* or *poetry* package managers. +The SDK can be installed with *uv*, *pip*, or *poetry* package managers. + +### uv + +*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities. + +```bash +uv add gusto_app_integration +``` ### PIP @@ -116,6 +124,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u ```python # Synchronous Example +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -123,7 +132,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -131,10 +140,12 @@ with GustoAppIntegration(
-The same SDK client can also be used to make asychronous requests by importing asyncio. +The same SDK client can also be used to make asynchronous requests by importing asyncio. + ```python # Asynchronous Example import asyncio +import gusto_app_integration from gusto_app_integration import GustoAppIntegration async def main(): @@ -143,7 +154,7 @@ async def main(): company_access_auth="", ) as gai_client: - res = await gai_client.introspection.get_token_info_async() + res = await gai_client.introspection.get_token_info_async(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -165,6 +176,7 @@ This SDK supports the following security scheme globally: To authenticate with the API the `company_access_auth` parameter must be set when initializing the SDK client instance. For example: ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -172,7 +184,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -191,7 +203,7 @@ with GustoAppIntegration() as gai_client: gai_client.introspection.disconnect_app_integration(security=gusto_app_integration.PostV1DisconnectAppIntegrationSecurity( system_access_auth="", - ), company_id="") + ), company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -225,17 +237,13 @@ with GustoAppIntegration() as gai_client: * [get_employee_benefits](docs/sdks/companybenefits/README.md#get_employee_benefits) - Get all employee benefits for a company benefit * [bulk_update_employee_benefits](docs/sdks/companybenefits/README.md#bulk_update_employee_benefits) - Bulk update employee benefits for a company benefit * [get_requirements](docs/sdks/companybenefits/README.md#get_requirements) - Get benefit fields requirements by ID +* [get_v1_company_benefits_company_benefit_id_contribution_exclusions](docs/sdks/companybenefits/README.md#get_v1_company_benefits_company_benefit_id_contribution_exclusions) - Get contribution exclusions for a company benefit +* [put_v1_company_benefits_company_benefit_id_contribution_exclusions](docs/sdks/companybenefits/README.md#put_v1_company_benefits_company_benefit_id_contribution_exclusions) - Update contribution exclusions for a company benefit ### [company_locations](docs/sdks/companylocations/README.md) * [list](docs/sdks/companylocations/README.md#list) - Get company locations -### [contractor_payment_groups](docs/sdks/contractorpaymentgroups/README.md) - -* [get](docs/sdks/contractorpaymentgroups/README.md#get) - Get contractor payment groups for a company -* [preview](docs/sdks/contractorpaymentgroups/README.md#preview) - Preview a contractor payment group -* [fetch](docs/sdks/contractorpaymentgroups/README.md#fetch) - Fetch a contractor payment group - ### [contractor_payments](docs/sdks/contractorpayments/README.md) * [get](docs/sdks/contractorpayments/README.md#get) - Get contractor payments for a company @@ -247,6 +255,7 @@ with GustoAppIntegration() as gai_client: * [get](docs/sdks/contractors/README.md#get) - Get contractors of a company * [get_by_id](docs/sdks/contractors/README.md#get_by_id) - Get a contractor * [update](docs/sdks/contractors/README.md#update) - Update a contractor +* [get_v1_companies_company_id_contractors_payment_details](docs/sdks/contractors/README.md#get_v1_companies_company_id_contractors_payment_details) - List contractor payment details ### [departments](docs/sdks/departments/README.md) @@ -322,7 +331,6 @@ with GustoAppIntegration() as gai_client: * [update](docs/sdks/garnishments/README.md#update) - Update a garnishment * [get_child_support](docs/sdks/garnishments/README.md#get_child_support) - Get child support garnishment data - ### [introspection](docs/sdks/introspection/README.md) * [get_token_info](docs/sdks/introspection/README.md#get_token_info) - Get info about the current access token @@ -353,6 +361,10 @@ with GustoAppIntegration() as gai_client: * [update](docs/sdks/locations/README.md#update) - Update a location * [get_minimum_wages](docs/sdks/locations/README.md#get_minimum_wages) - Get minimum wages for a location +### [notifications](docs/sdks/notifications/README.md) + +* [get_company_notifications](docs/sdks/notifications/README.md#get_company_notifications) - Get notifications for company + ### [pay_schedules](docs/sdks/payschedules/README.md) * [list](docs/sdks/payschedules/README.md#list) - Get the pay schedules for a company @@ -368,10 +380,19 @@ with GustoAppIntegration() as gai_client: * [update](docs/sdks/payrolls/README.md#update) - Update a payroll by ID * [prepare](docs/sdks/payrolls/README.md#prepare) - Prepare a payroll for update +### [reports](docs/sdks/reports/README.md) + +* [post_payrolls_payroll_uuid_reports_general_ledger](docs/sdks/reports/README.md#post_payrolls_payroll_uuid_reports_general_ledger) - Create a general ledger report +* [get_reports_request_uuid](docs/sdks/reports/README.md#get_reports_request_uuid) - Get a report + ### [time_off_policies](docs/sdks/timeoffpolicies/README.md) * [calculate_accruing_time_off_hours](docs/sdks/timeoffpolicies/README.md#calculate_accruing_time_off_hours) - Calculate accruing time off hours +### [time_off_requests](docs/sdks/timeoffrequests/README.md) + +* [get_v1_companies_company_id_time_off_requests](docs/sdks/timeoffrequests/README.md#get_v1_companies_company_id_time_off_requests) - Get time off requests for a company + ### [time_tracking](docs/sdks/timetracking/README.md) * [get_companies_company_uuid_time_tracking_time_sheets](docs/sdks/timetracking/README.md#get_companies_company_uuid_time_tracking_time_sheets) - Get all time sheets for a company @@ -389,6 +410,7 @@ with GustoAppIntegration() as gai_client: * [delete_subscription](docs/sdks/webhooks/README.md#delete_subscription) - Delete a webhook subscription * [verify](docs/sdks/webhooks/README.md#verify) - Verify the webhook subscription * [request_verification_token](docs/sdks/webhooks/README.md#request_verification_token) - Request the webhook subscription verification_token +* [get_v1_webhooks_health_check](docs/sdks/webhooks/README.md#get_v1_webhooks_health_check) - Get the webhooks health status @@ -400,6 +422,7 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call: ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration from gusto_app_integration.utils import BackoffStrategy, RetryConfig @@ -408,7 +431,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info(, + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) # Handle response @@ -418,6 +441,7 @@ with GustoAppIntegration( If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK: ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration from gusto_app_integration.utils import BackoffStrategy, RetryConfig @@ -427,7 +451,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -438,26 +462,18 @@ with GustoAppIntegration( ## Error Handling -Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception. - -By default, an API error will raise a models.APIError exception, which has the following properties: - -| Property | Type | Description | -|-----------------|------------------|-----------------------| -| `.status_code` | *int* | The HTTP status code | -| `.message` | *str* | The error message | -| `.raw_response` | *httpx.Response* | The raw HTTP response | -| `.body` | *str* | The response content | +[`GustoAppIntegrationError`](./src/gusto_app_integration/models/gustoappintegrationerror.py) is the base class for all HTTP error responses. It has the following properties: -When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `provision_async` method may raise the following exceptions: - -| Error Type | Status Code | Content Type | -| ------------------------------------- | ----------- | ---------------- | -| models.UnprocessableEntityErrorObject | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Property | Type | Description | +| ------------------ | ---------------- | --------------------------------------------------------------------------------------- | +| `err.message` | `str` | Error message | +| `err.status_code` | `int` | HTTP response status code eg `404` | +| `err.headers` | `httpx.Headers` | HTTP response headers | +| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. | +| `err.raw_response` | `httpx.Response` | Raw HTTP response | +| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). | ### Example - ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration, models @@ -501,18 +517,47 @@ with GustoAppIntegration() as gai_client: "phone": "2345678901", }, ], - }) + }, x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) - except models.UnprocessableEntityErrorObject as e: - # handle e.data: models.UnprocessableEntityErrorObjectData - raise(e) - except models.APIError as e: - # handle exception - raise(e) + + except models.GustoAppIntegrationError as e: + # The base class for HTTP error responses + print(e.message) + print(e.status_code) + print(e.body) + print(e.headers) + print(e.raw_response) + + # Depending on the method different errors may be thrown + if isinstance(e, models.UnprocessableEntityErrorObject): + print(e.data.errors) # List[gusto_app_integration.EntityErrorObject] ``` + +### Error Classes +**Primary error:** +* [`GustoAppIntegrationError`](./src/gusto_app_integration/models/gustoappintegrationerror.py): The base class for HTTP error responses. + +
Less common errors (7) + +
+ +**Network errors:** +* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors. + * [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server. + * [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out. + + +**Inherit from [`GustoAppIntegrationError`](./src/gusto_app_integration/models/gustoappintegrationerror.py)**: +* [`UnprocessableEntityErrorObject`](./src/gusto_app_integration/models/unprocessableentityerrorobject.py): Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. Applicable to 59 of 121 methods.* +* [`DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody`](./src/gusto_app_integration/models/deletev1companybenefitscompanybenefitidresponsebody.py): Unprocessable Entity. Status code `422`. Applicable to 1 of 121 methods.* +* [`ResponseValidationError`](./src/gusto_app_integration/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. + +
+ +\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable. @@ -530,6 +575,7 @@ You can override the default server globally by passing a server name to the `se #### Example ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -538,7 +584,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -549,6 +595,7 @@ with GustoAppIntegration( The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example: ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -557,7 +604,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/USAGE.md b/gusto_app_int/USAGE.md index 4702b54b..e5be637c 100644 --- a/gusto_app_int/USAGE.md +++ b/gusto_app_int/USAGE.md @@ -1,6 +1,7 @@ ```python # Synchronous Example +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -8,7 +9,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -16,10 +17,12 @@ with GustoAppIntegration(
-The same SDK client can also be used to make asychronous requests by importing asyncio. +The same SDK client can also be used to make asynchronous requests by importing asyncio. + ```python # Asynchronous Example import asyncio +import gusto_app_integration from gusto_app_integration import GustoAppIntegration async def main(): @@ -28,7 +31,7 @@ async def main(): company_access_auth="", ) as gai_client: - res = await gai_client.introspection.get_token_info_async() + res = await gai_client.introspection.get_token_info_async(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/docs/models/admin.md b/gusto_app_int/docs/models/admin.md index cab88339..b2e6e882 100644 --- a/gusto_app_int/docs/models/admin.md +++ b/gusto_app_int/docs/models/admin.md @@ -5,9 +5,9 @@ The representation of an admin user in Gusto. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *str* | :heavy_check_mark: | The unique id of the admin. | -| `email` | *Optional[str]* | :heavy_minus_sign: | The email of the admin for Gusto's system. If the email matches an existing user, this will create an admin account for them. | -| `first_name` | *Optional[str]* | :heavy_minus_sign: | The first name of the admin. | -| `last_name` | *Optional[str]* | :heavy_minus_sign: | The last name of the admin. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `uuid` | *str* | :heavy_check_mark: | The unique id of the admin. | +| `email` | *Optional[str]* | :heavy_minus_sign: | The email of the admin for Gusto's system. | +| `first_name` | *Optional[str]* | :heavy_minus_sign: | The first name of the admin. | +| `last_name` | *Optional[str]* | :heavy_minus_sign: | The last name of the admin. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/aggregation.md b/gusto_app_int/docs/models/aggregation.md new file mode 100644 index 00000000..6eb639eb --- /dev/null +++ b/gusto_app_int/docs/models/aggregation.md @@ -0,0 +1,13 @@ +# Aggregation + +The breakdown level used for the report + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `DEFAULT` | default | +| `JOB` | job | +| `DEPARTMENT` | department | +| `INTEGRATION` | integration | \ No newline at end of file diff --git a/gusto_app_int/docs/models/amounttype.md b/gusto_app_int/docs/models/amounttype.md new file mode 100644 index 00000000..bbb815ff --- /dev/null +++ b/gusto_app_int/docs/models/amounttype.md @@ -0,0 +1,11 @@ +# AmountType + +The amount type of the deduction for the pay period. + + +## Values + +| Name | Value | +| --------- | --------- | +| `FIXED` | fixed | +| `PERCENT` | percent | \ No newline at end of file diff --git a/gusto_app_int/docs/models/approver.md b/gusto_app_int/docs/models/approver.md new file mode 100644 index 00000000..96834502 --- /dev/null +++ b/gusto_app_int/docs/models/approver.md @@ -0,0 +1,11 @@ +# Approver + +This value will be null if the request has not been approved. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee who approved the time off request. | +| `full_name` | *Optional[str]* | :heavy_minus_sign: | The full name of the employee who approved the time off request. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/companyaddress.md b/gusto_app_int/docs/models/companyaddress.md index 86233715..e5eaf35f 100644 --- a/gusto_app_int/docs/models/companyaddress.md +++ b/gusto_app_int/docs/models/companyaddress.md @@ -13,4 +13,4 @@ The representation of a company's address in Gusto. | `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | `zip` | *Optional[str]* | :heavy_minus_sign: | N/A | | `country` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `active` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | \ No newline at end of file +| `inactive` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/companybenefitwithemployeebenefitsvaluetiers.md b/gusto_app_int/docs/models/companybenefitwithemployeebenefitsvaluetiers.md index 4d245e5e..9a746ef4 100644 --- a/gusto_app_int/docs/models/companybenefitwithemployeebenefitsvaluetiers.md +++ b/gusto_app_int/docs/models/companybenefitwithemployeebenefitsvaluetiers.md @@ -5,8 +5,8 @@ A single tier of a tiered matching scheme. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | -| `threshold` | *Optional[str]* | :heavy_minus_sign: | The percentage threshold at which this tier ends (inclusive).

For example, a value of "5" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll.

If this is the first tier, a value of "5" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. | -| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | +| `threshold` | *Optional[str]* | :heavy_minus_sign: | Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to.

Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards.

For example:

If the first tier has a threshold of "3", and `rate` of "100", the company will match 100% of employee contributions from 0% up to and including 3% of payroll.

If the next tier has a threshold of "5" and a rate of "50", the company will match 50% of contributions from above 3% up to and including 5% of payroll. | +| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/companycustomfield.md b/gusto_app_int/docs/models/companycustomfield.md index 1a670af3..905db155 100644 --- a/gusto_app_int/docs/models/companycustomfield.md +++ b/gusto_app_int/docs/models/companycustomfield.md @@ -10,5 +10,5 @@ A custom field on a company | `uuid` | *str* | :heavy_check_mark: | UUID of the company custom field | | `name` | *str* | :heavy_check_mark: | Name of the company custom field | | `type` | [models.CustomFieldType](../models/customfieldtype.md) | :heavy_check_mark: | Input type for the custom field. | -| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the company custom field | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the company custom field | | `selection_options` | List[*str*] | :heavy_minus_sign: | An array of options for fields of type radio. Otherwise, null. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/contractor.md b/gusto_app_int/docs/models/contractor.md index de1ab986..bafab87b 100644 --- a/gusto_app_int/docs/models/contractor.md +++ b/gusto_app_int/docs/models/contractor.md @@ -23,10 +23,12 @@ The representation of a contractor (individual or business) in Gusto. | `start_date` | *Optional[str]* | :heavy_minus_sign: | The contractor's start date. | | | `address` | [OptionalNullable[models.Address]](../models/address.md) | :heavy_minus_sign: | The contractor’s home address. | | | `hourly_rate` | *Optional[str]* | :heavy_minus_sign: | The contractor’s hourly rate. This attribute is required if the wage_type is “Hourly”. | 50.0 | -| `file_new_hire_report` | *Optional[bool]* | :heavy_minus_sign: | The boolean flag indicating whether Gusto will file a new hire report for the contractor | | +| `file_new_hire_report` | *OptionalNullable[bool]* | :heavy_minus_sign: | The boolean flag indicating whether Gusto will file a new hire report for the contractor | | | `work_state` | *OptionalNullable[str]* | :heavy_minus_sign: | State where the contractor will be conducting the majority of their work for the company.
This value is used when generating the new hire report. | | | `onboarded` | *Optional[bool]* | :heavy_minus_sign: | The updated onboarding status for the contractor | | | `onboarding_status` | [Optional[models.ContractorOnboardingStatus]](../models/contractoronboardingstatus.md) | :heavy_minus_sign: | One of the "onboarding_status" enum values. | | | `payment_method` | [OptionalNullable[models.ContractorPaymentMethod]](../models/contractorpaymentmethod.md) | :heavy_minus_sign: | The contractor's payment method. | | | `has_ssn` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the contractor has an SSN in Gusto. | | +| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | The contractor's department in the company. | | +| `dismissal_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The contractor's dismissal date. | | | `department_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the department the contractor is under | | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md b/gusto_app_int/docs/models/contractorpaymentdetailslist.md similarity index 58% rename from gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md rename to gusto_app_int/docs/models/contractorpaymentdetailslist.md index 786ab057..91a868e0 100644 --- a/gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md +++ b/gusto_app_int/docs/models/contractorpaymentdetailslist.md @@ -1,13 +1,13 @@ -# PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments +# ContractorPaymentDetailsList ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | The contractor receiving the payment | | -| `payment_method` | [Optional[models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod]](../models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md) | :heavy_minus_sign: | N/A | | -| `wage` | *Optional[float]* | :heavy_minus_sign: | If the contractor is on a fixed wage, this is the fixed wage payment for the contractor, regardless of hours worked | 5000 | -| `hours` | *Optional[float]* | :heavy_minus_sign: | If the contractor is on an hourly wage, this is the number of hours that the contractor worked for the payment | 40 | -| `bonus` | *Optional[float]* | :heavy_minus_sign: | If the contractor is on an hourly wage, this is the bonus the contractor earned | 500 | -| `reimbursement` | *Optional[float]* | :heavy_minus_sign: | Reimbursed wages for the contractor | 20 | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `payment_method` | [Optional[models.ContractorPaymentDetailsListPaymentMethod]](../models/contractorpaymentdetailslistpaymentmethod.md) | :heavy_minus_sign: | N/A | +| `first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `last_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `split_by` | [OptionalNullable[models.SplitBy]](../models/splitby.md) | :heavy_minus_sign: | Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. | +| `splits` | List[[models.Splits](../models/splits.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/contractorpaymentdetailslistpaymentmethod.md b/gusto_app_int/docs/models/contractorpaymentdetailslistpaymentmethod.md new file mode 100644 index 00000000..958d1027 --- /dev/null +++ b/gusto_app_int/docs/models/contractorpaymentdetailslistpaymentmethod.md @@ -0,0 +1,9 @@ +# ContractorPaymentDetailsListPaymentMethod + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_app_int/docs/models/contractorpaymentgroupstatus.md b/gusto_app_int/docs/models/contractorpaymentgroupstatus.md deleted file mode 100644 index f432b08d..00000000 --- a/gusto_app_int/docs/models/contractorpaymentgroupstatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContractorPaymentGroupStatus - -The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `UNFUNDED` | Unfunded | -| `FUNDED` | Funded | \ No newline at end of file diff --git a/gusto_app_int/docs/models/contractorssortby.md b/gusto_app_int/docs/models/contractorssortby.md new file mode 100644 index 00000000..dda6aba4 --- /dev/null +++ b/gusto_app_int/docs/models/contractorssortby.md @@ -0,0 +1,11 @@ +# ContractorsSortBy + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `TYPE` | type | +| `ONBOARDING_STATUS` | onboarding_status | +| `NAME` | name | +| `CREATED_AT` | created_at | \ No newline at end of file diff --git a/gusto_app_int/docs/models/contributionexclusion.md b/gusto_app_int/docs/models/contributionexclusion.md new file mode 100644 index 00000000..913c7410 --- /dev/null +++ b/gusto_app_int/docs/models/contributionexclusion.md @@ -0,0 +1,12 @@ +# ContributionExclusion + +The representation of a contribution exclusion for a company benefit. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `contribution_uuid` | *str* | :heavy_check_mark: | The UUID of the contribution type. | +| `contribution_type` | *str* | :heavy_check_mark: | The name of the contribution type. | +| `excluded` | *bool* | :heavy_check_mark: | Whether this contribution type is excluded from the benefit. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/days.md b/gusto_app_int/docs/models/days.md new file mode 100644 index 00000000..d9df1f68 --- /dev/null +++ b/gusto_app_int/docs/models/days.md @@ -0,0 +1,9 @@ +# Days + +An object that represents the days in the time off request. The keys of the object are the dates, formatted as a YYYY-MM-DD string. The values of the object are the number of hours requested off for each day, formatted as a string representation of a numeric decimal to the thousands place. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/gusto_app_int/docs/models/deductions.md b/gusto_app_int/docs/models/deductions.md index 9921610e..aa44e12a 100644 --- a/gusto_app_int/docs/models/deductions.md +++ b/gusto_app_int/docs/models/deductions.md @@ -1,9 +1,13 @@ # Deductions +An array of deductions for the employee. + ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `amount` | *Optional[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the deduction. | +| `amount` | *Optional[float]* | :heavy_minus_sign: | The amount of the deduction for the pay period. | +| `amount_type` | [Optional[models.AmountType]](../models/amounttype.md) | :heavy_minus_sign: | The amount type of the deduction for the pay period. | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md b/gusto_app_int/docs/models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..dac31c10 --- /dev/null +++ b/gusto_app_int/docs/models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/deletev1homeaddresseshomeaddressuuidrequest.md b/gusto_app_int/docs/models/deletev1homeaddresseshomeaddressuuidrequest.md index da12b601..c8af993c 100644 --- a/gusto_app_int/docs/models/deletev1homeaddresseshomeaddressuuidrequest.md +++ b/gusto_app_int/docs/models/deletev1homeaddresseshomeaddressuuidrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | \ No newline at end of file diff --git a/gusto_app_int/docs/models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md b/gusto_app_int/docs/models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..b88408d6 --- /dev/null +++ b/gusto_app_int/docs/models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/deletev1workaddressesworkaddressuuidrequest.md b/gusto_app_int/docs/models/deletev1workaddressesworkaddressuuidrequest.md index 85071fb8..e21c51ef 100644 --- a/gusto_app_int/docs/models/deletev1workaddressesworkaddressuuidrequest.md +++ b/gusto_app_int/docs/models/deletev1workaddressesworkaddressuuidrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/employee.md b/gusto_app_int/docs/models/employee.md index fc978105..0e5fa93b 100644 --- a/gusto_app_int/docs/models/employee.md +++ b/gusto_app_int/docs/models/employee.md @@ -5,32 +5,40 @@ The representation of an employee in Gusto. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *str* | :heavy_check_mark: | The UUID of the employee in Gusto. | -| `first_name` | *str* | :heavy_check_mark: | N/A | -| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `last_name` | *str* | :heavy_check_mark: | N/A | -| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | The personal email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | -| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company the employee is employed by. | -| `manager_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the employee's manager. | -| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the employee. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee's department in the company. | -| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is terminated. | -| `two_percent_shareholder` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | -| `onboarded` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee has completed onboarding. | -| `onboarding_status` | [OptionalNullable[models.OnboardingStatus]](../models/onboardingstatus.md) | :heavy_minus_sign: | The current onboarding status of the employee | -| `onboarding_documents_config` | [Optional[models.OnboardingDocumentsConfig]](../models/onboardingdocumentsconfig.md) | :heavy_minus_sign: | Configuration for an employee onboarding documents during onboarding | -| `jobs` | List[[models.Job](../models/job.md)] | :heavy_minus_sign: | N/A | -| `eligible_paid_time_off` | List[[models.PaidTimeOff](../models/paidtimeoff.md)] | :heavy_minus_sign: | N/A | -| `terminations` | List[[models.Termination](../models/termination.md)] | :heavy_minus_sign: | N/A | -| `garnishments` | List[[models.Garnishment](../models/garnishment.md)] | :heavy_minus_sign: | N/A | -| `custom_fields` | List[[models.EmployeeCustomField](../models/employeecustomfield.md)] | :heavy_minus_sign: | Custom fields are only included for the employee if the include param has the custom_fields value set | -| `date_of_birth` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `has_ssn` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the employee has an SSN in Gusto. | -| `ssn` | *Optional[str]* | :heavy_minus_sign: | Deprecated. This field always returns an empty string. | -| `phone` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `payment_method` | [Optional[models.PaymentMethod]](../models/paymentmethod.md) | :heavy_minus_sign: | The employee's payment method | -| `work_email` | *OptionalNullable[str]* | :heavy_minus_sign: | The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | -| `current_employment_status` | [OptionalNullable[models.CurrentEmploymentStatus]](../models/currentemploymentstatus.md) | :heavy_minus_sign: | The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the employee in Gusto. | +| `first_name` | *str* | :heavy_check_mark: | N/A | +| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `last_name` | *str* | :heavy_check_mark: | N/A | +| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | The personal email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | +| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company the employee is employed by. | +| `manager_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the employee's manager. | +| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the employee. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee's department in the company. | +| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is terminated. | +| `two_percent_shareholder` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | +| `work_email` | *OptionalNullable[str]* | :heavy_minus_sign: | The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | +| `onboarded` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee has completed onboarding. | +| `onboarding_status` | [OptionalNullable[models.EmployeeOnboardingStatus]](../models/employeeonboardingstatus.md) | :heavy_minus_sign: | The current onboarding status of the employee | +| `onboarding_documents_config` | [Optional[models.EmployeeOnboardingDocumentsConfig]](../models/employeeonboardingdocumentsconfig.md) | :heavy_minus_sign: | Configuration for an employee onboarding documents during onboarding | +| `jobs` | List[[models.Job](../models/job.md)] | :heavy_minus_sign: | N/A | +| `eligible_paid_time_off` | List[[models.PaidTimeOff](../models/paidtimeoff.md)] | :heavy_minus_sign: | N/A | +| `terminations` | List[[models.Termination](../models/termination.md)] | :heavy_minus_sign: | N/A | +| `garnishments` | List[[models.Garnishment](../models/garnishment.md)] | :heavy_minus_sign: | N/A | +| `custom_fields` | List[[models.EmployeeCustomField](../models/employeecustomfield.md)] | :heavy_minus_sign: | Custom fields are only included for the employee if the include param has the custom_fields value set | +| `date_of_birth` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `has_ssn` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the employee has an SSN in Gusto. | +| `ssn` | *Optional[str]* | :heavy_minus_sign: | Deprecated. This field always returns an empty string. | +| `phone` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `payment_method` | [Optional[models.EmployeePaymentMethod]](../models/employeepaymentmethod.md) | :heavy_minus_sign: | The employee's payment method | +| `current_employment_status` | [OptionalNullable[models.EmployeeCurrentEmploymentStatus]](../models/employeecurrentemploymentstatus.md) | :heavy_minus_sign: | The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less. | +| `historical` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `employee_code` | *Optional[str]* | :heavy_minus_sign: | The short format code of the employee | +| `department_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the department the employee is under | +| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `hired_at` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date when the employee was hired to the company | +| `hidden_ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `flsa_status` | [Optional[models.FlsaStatusType]](../models/flsastatustype.md) | :heavy_minus_sign: | The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company. | +| `applicable_tax_ids` | List[*float*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/employeeaddress.md b/gusto_app_int/docs/models/employeeaddress.md index e2410685..0d6dddef 100644 --- a/gusto_app_int/docs/models/employeeaddress.md +++ b/gusto_app_int/docs/models/employeeaddress.md @@ -5,7 +5,10 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the employee address | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee started living at the address. | +| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | Determines if home taxes should be withheld and paid for employee. | | `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | | `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `city` | *Optional[str]* | :heavy_minus_sign: | N/A | @@ -13,7 +16,4 @@ | `zip` | *Optional[str]* | :heavy_minus_sign: | N/A | | `country` | *Optional[str]* | :heavy_minus_sign: | N/A | | `active` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | -| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee address | -| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee started living at the address. | -| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | Determines if home taxes should be withheld and paid for employee. | \ No newline at end of file +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/employeebenefit.md b/gusto_app_int/docs/models/employeebenefit.md index 4a1997f9..c2482f54 100644 --- a/gusto_app_int/docs/models/employeebenefit.md +++ b/gusto_app_int/docs/models/employeebenefit.md @@ -16,11 +16,11 @@ The representation of an employee benefit. | `elective` | *Optional[bool]* | :heavy_minus_sign: | Whether the company contribution is elective (aka matching). For "tiered" contribution types, this is always true. | | `company_contribution_annual_maximum` | *OptionalNullable[str]* | :heavy_minus_sign: | The maximum company contribution amount per year. A null value signifies no limit. | | `limit_option` | *OptionalNullable[str]* | :heavy_minus_sign: | Some benefits require additional information to determine their limit.

`Family` and `Individual` are applicable to HSA benefit.

`Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. | -| `catch_up` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee should use a benefit’s "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | +| `catch_up` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee should use a benefit's "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | | `retirement_loan_identifier` | *Optional[str]* | :heavy_minus_sign: | Identifier for a 401(k) loan assigned by the 401(k) provider | | `coverage_amount` | *OptionalNullable[str]* | :heavy_minus_sign: | The amount that the employee is insured for. Note: company contribution cannot be present if coverage amount is set. | | `deduction_reduces_taxable_income` | [OptionalNullable[models.DeductionReducesTaxableIncome]](../models/deductionreducestaxableincome.md) | :heavy_minus_sign: | Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not "unset", coverage amount and coverage salary multiplier are ignored. | -| `coverage_salary_multiplier` | *Optional[str]* | :heavy_minus_sign: | The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | +| `coverage_salary_multiplier` | *OptionalNullable[str]* | :heavy_minus_sign: | The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | | ~~`company_contribution`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types. | | ~~`contribute_as_percentage`~~ | *Optional[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Whether the company_contribution value should be treated as a percentage to be added to each payroll. This field will not appear for tiered contribution types. | | `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee to which the benefit belongs. | diff --git a/gusto_app_int/docs/models/employeebenefitforcompanybenefit.md b/gusto_app_int/docs/models/employeebenefitforcompanybenefit.md index e045015e..b7ea3500 100644 --- a/gusto_app_int/docs/models/employeebenefitforcompanybenefit.md +++ b/gusto_app_int/docs/models/employeebenefitforcompanybenefit.md @@ -16,11 +16,11 @@ The representation of an employee benefit for a company benefit. | `elective` | *Optional[bool]* | :heavy_minus_sign: | Whether the company contribution is elective (aka matching). For "tiered" contribution types, this is always true. | | `company_contribution_annual_maximum` | *OptionalNullable[str]* | :heavy_minus_sign: | The maximum company contribution amount per year. A null value signifies no limit. | | `limit_option` | *OptionalNullable[str]* | :heavy_minus_sign: | Some benefits require additional information to determine their limit.

`Family` and `Individual` are applicable to HSA benefit.

`Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. | -| `catch_up` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee should use a benefit’s "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | +| `catch_up` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee should use a benefit's "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | | `retirement_loan_identifier` | *Optional[str]* | :heavy_minus_sign: | Identifier for a 401(k) loan assigned by the 401(k) provider | | `coverage_amount` | *OptionalNullable[str]* | :heavy_minus_sign: | The amount that the employee is insured for. Note: company contribution cannot be present if coverage amount is set. | | `deduction_reduces_taxable_income` | [OptionalNullable[models.EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome]](../models/employeebenefitforcompanybenefitdeductionreducestaxableincome.md) | :heavy_minus_sign: | Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not "unset", coverage amount and coverage salary multiplier are ignored. | -| `coverage_salary_multiplier` | *Optional[str]* | :heavy_minus_sign: | The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | +| `coverage_salary_multiplier` | *OptionalNullable[str]* | :heavy_minus_sign: | The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | | ~~`company_contribution`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types. | | ~~`contribute_as_percentage`~~ | *Optional[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Whether the company_contribution value should be treated as a percentage to be added to each payroll. This field will not appear for tiered contribution types. | | `employee_uuid` | *str* | :heavy_check_mark: | The UUID of the employee to which the benefit belongs. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/employeecompensations.md b/gusto_app_int/docs/models/employeecompensations.md index 488f4da3..48b4861f 100644 --- a/gusto_app_int/docs/models/employeecompensations.md +++ b/gusto_app_int/docs/models/employeecompensations.md @@ -3,13 +3,23 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | -| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `excluded` | *Optional[bool]* | :heavy_minus_sign: | This employee will be excluded from payroll calculation and will not be paid for the payroll. | -| `payment_method` | [Optional[models.PutV1CompaniesCompanyIDPayrollsPaymentMethod]](../models/putv1companiescompanyidpayrollspaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. Invalid values will be ignored. | -| `memo` | *Optional[str]* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | -| `fixed_compensations` | List[[models.PutV1CompaniesCompanyIDPayrollsFixedCompensations](../models/putv1companiescompanyidpayrollsfixedcompensations.md)] | :heavy_minus_sign: | N/A | -| `hourly_compensations` | List[[models.PutV1CompaniesCompanyIDPayrollsHourlyCompensations](../models/putv1companiescompanyidpayrollshourlycompensations.md)] | :heavy_minus_sign: | N/A | -| `paid_time_off` | List[[models.PutV1CompaniesCompanyIDPayrollsPaidTimeOff](../models/putv1companiescompanyidpayrollspaidtimeoff.md)] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | +| `excluded` | *Optional[bool]* | :heavy_minus_sign: | This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false. | +| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the employee. Requires `employees:read` scope. | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The preferred first name of the employee. Requires `employees:read` scope. | +| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the employee. Requires `employees:read` scope. | +| `gross_pay` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls. | +| `net_pay` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's net pay, equal to gross_pay - employee taxes - employee deductions or garnishments - cash tips. This value is only available for processed payrolls. | +| `check_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls. | +| `payment_method` | [OptionalNullable[models.PayrollShowPaymentMethod]](../models/payrollshowpaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. | +| `memo` | *OptionalNullable[str]* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | +| `fixed_compensations` | List[[models.PayrollShowFixedCompensations](../models/payrollshowfixedcompensations.md)] | :heavy_minus_sign: | An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned. | +| `hourly_compensations` | List[[models.PayrollShowHourlyCompensations](../models/payrollshowhourlycompensations.md)] | :heavy_minus_sign: | An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned. | +| `paid_time_off` | List[[models.PayrollShowPaidTimeOff](../models/payrollshowpaidtimeoff.md)] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. | +| `deductions` | List[[models.PayrollShowDeductions](../models/payrollshowdeductions.md)] | :heavy_minus_sign: | An array of employee deductions for the pay period. | +| `reimbursements` | List[[models.PayrollShowReimbursements](../models/payrollshowreimbursements.md)] | :heavy_minus_sign: | An array of reimbursements for the employee. | +| `taxes` | List[[models.Taxes](../models/taxes.md)] | :heavy_minus_sign: | An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | +| `benefits` | List[[models.Benefits](../models/benefits.md)] | :heavy_minus_sign: | An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/employeecurrentemploymentstatus.md b/gusto_app_int/docs/models/employeecurrentemploymentstatus.md new file mode 100644 index 00000000..46aa3991 --- /dev/null +++ b/gusto_app_int/docs/models/employeecurrentemploymentstatus.md @@ -0,0 +1,14 @@ +# EmployeeCurrentEmploymentStatus + +The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less. + + +## Values + +| Name | Value | +| ------------------------------ | ------------------------------ | +| `FULL_TIME` | full_time | +| `PART_TIME_UNDER_TWENTY_HOURS` | part_time_under_twenty_hours | +| `PART_TIME_TWENTY_PLUS_HOURS` | part_time_twenty_plus_hours | +| `VARIABLE` | variable | +| `SEASONAL` | seasonal | \ No newline at end of file diff --git a/gusto_app_int/docs/models/employeehomeaddress.md b/gusto_app_int/docs/models/employeehomeaddress.md new file mode 100644 index 00000000..7d9d67f1 --- /dev/null +++ b/gusto_app_int/docs/models/employeehomeaddress.md @@ -0,0 +1,15 @@ +# EmployeeHomeAddress + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `street_1` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `city` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `state` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `zip` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `active` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for this address. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/employeeonboardingdocumentsconfig.md b/gusto_app_int/docs/models/employeeonboardingdocumentsconfig.md new file mode 100644 index 00000000..d36fa7de --- /dev/null +++ b/gusto_app_int/docs/models/employeeonboardingdocumentsconfig.md @@ -0,0 +1,11 @@ +# EmployeeOnboardingDocumentsConfig + +Configuration for an employee onboarding documents during onboarding + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the onboarding documents config | +| `i9_document` | *Optional[bool]* | :heavy_minus_sign: | Whether to include Form I-9 for an employee during onboarding | \ No newline at end of file diff --git a/gusto_app_int/docs/models/employeeonboardingstatus.md b/gusto_app_int/docs/models/employeeonboardingstatus.md new file mode 100644 index 00000000..c40290a5 --- /dev/null +++ b/gusto_app_int/docs/models/employeeonboardingstatus.md @@ -0,0 +1,17 @@ +# EmployeeOnboardingStatus + +The current onboarding status of the employee + + +## Values + +| Name | Value | +| --------------------------------------- | --------------------------------------- | +| `ONBOARDING_COMPLETED` | onboarding_completed | +| `ADMIN_ONBOARDING_INCOMPLETE` | admin_onboarding_incomplete | +| `SELF_ONBOARDING_PENDING_INVITE` | self_onboarding_pending_invite | +| `SELF_ONBOARDING_INVITED` | self_onboarding_invited | +| `SELF_ONBOARDING_INVITED_STARTED` | self_onboarding_invited_started | +| `SELF_ONBOARDING_INVITED_OVERDUE` | self_onboarding_invited_overdue | +| `SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE` | self_onboarding_completed_by_employee | +| `SELF_ONBOARDING_AWAITING_ADMIN_REVIEW` | self_onboarding_awaiting_admin_review | \ No newline at end of file diff --git a/gusto_app_int/docs/models/employeepaymentmethod.md b/gusto_app_int/docs/models/employeepaymentmethod.md new file mode 100644 index 00000000..02867328 --- /dev/null +++ b/gusto_app_int/docs/models/employeepaymentmethod.md @@ -0,0 +1,11 @@ +# EmployeePaymentMethod + +The employee's payment method + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_app_int/docs/models/employeeworkaddress.md b/gusto_app_int/docs/models/employeeworkaddress.md index 14bde25a..5e7cd8da 100644 --- a/gusto_app_int/docs/models/employeeworkaddress.md +++ b/gusto_app_int/docs/models/employeeworkaddress.md @@ -1,7 +1,5 @@ # EmployeeWorkAddress -List of employee work addresses - ## Fields diff --git a/gusto_app_int/docs/models/employmenthistorylist.md b/gusto_app_int/docs/models/employmenthistorylist.md index c69bf2fe..86ee96b1 100644 --- a/gusto_app_int/docs/models/employmenthistorylist.md +++ b/gusto_app_int/docs/models/employmenthistorylist.md @@ -8,7 +8,7 @@ The representation of an employee's individual employements. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `hire_date` | *Optional[str]* | :heavy_minus_sign: | The employee's start day of work for an employment. | -| `termination_date` | *Optional[str]* | :heavy_minus_sign: | The employee's last day of work for an employment. | +| `termination_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee's last day of work for an employment. | | `file_new_hire_report` | *Optional[bool]* | :heavy_minus_sign: | The boolean flag indicating whether Gusto will file a new hire report for the employee. | | `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | `employment_status` | [Optional[models.EmploymentHistoryListEmploymentStatus]](../models/employmenthistorylistemploymentstatus.md) | :heavy_minus_sign: | The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/generalledgerreport.md b/gusto_app_int/docs/models/generalledgerreport.md new file mode 100644 index 00000000..f682be30 --- /dev/null +++ b/gusto_app_int/docs/models/generalledgerreport.md @@ -0,0 +1,13 @@ +# GeneralLedgerReport + +Successful response for general ledger report generation + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll record for which the report was generated | +| `aggregation` | [Optional[models.Aggregation]](../models/aggregation.md) | :heavy_minus_sign: | The breakdown level used for the report | +| `integration_type` | [OptionalNullable[models.IntegrationType]](../models/integrationtype.md) | :heavy_minus_sign: | The `integration_type` used for the report, if `aggregation` was 'integration.' Otherwise, this will be null. | +| `request_uuid` | *Optional[str]* | :heavy_minus_sign: | UUID to use for polling the report status | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getcompaniescompanyuuidtimetrackingtimesheetsrequest.md b/gusto_app_int/docs/models/getcompaniescompanyuuidtimetrackingtimesheetsrequest.md index 884112e2..3f9f6fe4 100644 --- a/gusto_app_int/docs/models/getcompaniescompanyuuidtimetrackingtimesheetsrequest.md +++ b/gusto_app_int/docs/models/getcompaniescompanyuuidtimetrackingtimesheetsrequest.md @@ -10,7 +10,7 @@ | `entity_type` | [Optional[models.EntityType]](../models/entitytype.md) | :heavy_minus_sign: | Type of entities to filter. One of: "Employee", "Contractor" | | `status` | [Optional[models.Status]](../models/status.md) | :heavy_minus_sign: | Status of time sheets. One of: "approved", "pending", "rejected" | | `sort_by` | [Optional[models.TimeSheetSortBy]](../models/timesheetsortby.md) | :heavy_minus_sign: | Field to sort by. One of: "created_at", "updated_at", "shift_started_at", "shift_ended_at" | -| `sort_order` | [Optional[models.TimeSheetSortOrder]](../models/timesheetsortorder.md) | :heavy_minus_sign: | Sortinng order. One of: "asc", "desc" | +| `sort_order` | [Optional[models.TimeSheetSortOrder]](../models/timesheetsortorder.md) | :heavy_minus_sign: | Sorting order. One of: "asc", "desc" | | `before` | *Optional[str]* | :heavy_minus_sign: | time sheets that were created before ISO 8601 timestamp. Filtering by "created_at" | | `after` | *Optional[str]* | :heavy_minus_sign: | time sheets that were created before ISO 8601 timestamp. Filtering by "created_at" | | `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | diff --git a/gusto_app_int/docs/models/getcompanynotificationsheaderxgustoapiversion.md b/gusto_app_int/docs/models/getcompanynotificationsheaderxgustoapiversion.md new file mode 100644 index 00000000..a479c0fc --- /dev/null +++ b/gusto_app_int/docs/models/getcompanynotificationsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetCompanyNotificationsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getcompanynotificationsrequest.md b/gusto_app_int/docs/models/getcompanynotificationsrequest.md new file mode 100644 index 00000000..637a1ff0 --- /dev/null +++ b/gusto_app_int/docs/models/getcompanynotificationsrequest.md @@ -0,0 +1,12 @@ +# GetCompanyNotificationsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company for which you would like to return notifications | +| `status` | [Optional[models.QueryParamStatus]](../models/queryparamstatus.md) | :heavy_minus_sign: | N/A | +| `x_gusto_api_version` | [Optional[models.GetCompanyNotificationsHeaderXGustoAPIVersion]](../models/getcompanynotificationsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getreportsrequestuuidrequest.md b/gusto_app_int/docs/models/getreportsrequestuuidrequest.md new file mode 100644 index 00000000..3cd358e0 --- /dev/null +++ b/gusto_app_int/docs/models/getreportsrequestuuidrequest.md @@ -0,0 +1,9 @@ +# GetReportsRequestUUIDRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `request_uuid` | *str* | :heavy_check_mark: | The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint. | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md b/gusto_app_int/docs/models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md new file mode 100644 index 00000000..22f14cd7 --- /dev/null +++ b/gusto_app_int/docs/models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidcontractorspaymentdetailsrequest.md b/gusto_app_int/docs/models/getv1companiescompanyidcontractorspaymentdetailsrequest.md new file mode 100644 index 00000000..0d986047 --- /dev/null +++ b/gusto_app_int/docs/models/getv1companiescompanyidcontractorspaymentdetailsrequest.md @@ -0,0 +1,11 @@ +# GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company. This identifies the company whose contractor payment details you want to retrieve. | +| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor. | +| `contractor_payment_group_uuid` | *Optional[str]* | :heavy_minus_sign: | Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group. | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion]](../models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidemployeesrequest.md b/gusto_app_int/docs/models/getv1companiescompanyidemployeesrequest.md index ea7eb735..b99cf41e 100644 --- a/gusto_app_int/docs/models/getv1companiescompanyidemployeesrequest.md +++ b/gusto_app_int/docs/models/getv1companiescompanyidemployeesrequest.md @@ -3,12 +3,19 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion]](../models/getv1companiescompanyidemployeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | -| `include` | List[[models.Include](../models/include.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options:
- all_compensations: Include all effective dated compensations for each job instead of only the current compensation
- custom_fields: Include employees' custom fields
| -| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by the provided boolean | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | -| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion]](../models/getv1companiescompanyidemployeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Filter employees by a specific primary work location | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | Filter employees by a specific payroll | +| `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | +| `sort_by` | *Optional[str]* | :heavy_minus_sign: | Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status | +| `include` | List[[models.Include](../models/include.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response. Multiple options are comma separated. | +| `onboarded` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have completed onboarding | +| `onboarded_active` | *Optional[bool]* | :heavy_minus_sign: | Filters employees who are ready to work (onboarded AND active today) | +| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have been or are scheduled to be terminated | +| `terminated_today` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated) | +| `uuids` | List[*str*] | :heavy_minus_sign: | Optional subset of employees to fetch. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md b/gusto_app_int/docs/models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md new file mode 100644 index 00000000..b5b72dc8 --- /dev/null +++ b/gusto_app_int/docs/models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md b/gusto_app_int/docs/models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md new file mode 100644 index 00000000..e1bfc227 --- /dev/null +++ b/gusto_app_int/docs/models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md b/gusto_app_int/docs/models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md index 011e6a4d..d07fadaa 100644 --- a/gusto_app_int/docs/models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md +++ b/gusto_app_int/docs/models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md @@ -8,4 +8,8 @@ | `BENEFITS` | benefits | | `DEDUCTIONS` | deductions | | `TAXES` | taxes | -| `PAYROLL_STATUS_META` | payroll_status_meta | \ No newline at end of file +| `PAYROLL_STATUS_META` | payroll_status_meta | +| `TOTALS` | totals | +| `RISK_BLOCKERS` | risk_blockers | +| `REVERSALS` | reversals | +| `PAYROLL_TAXES` | payroll_taxes | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidpayrollspayrollidrequest.md b/gusto_app_int/docs/models/getv1companiescompanyidpayrollspayrollidrequest.md index b3cacb14..76524668 100644 --- a/gusto_app_int/docs/models/getv1companiescompanyidpayrollspayrollidrequest.md +++ b/gusto_app_int/docs/models/getv1companiescompanyidpayrollspayrollidrequest.md @@ -7,5 +7,8 @@ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion]](../models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `include` | List[[models.GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude](../models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `sort_by` | [Optional[models.SortBy]](../models/sortby.md) | :heavy_minus_sign: | Field to sort employee compensations by | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidpayrollsqueryparaminclude.md b/gusto_app_int/docs/models/getv1companiescompanyidpayrollsqueryparaminclude.md index a33c2e1c..3027acaa 100644 --- a/gusto_app_int/docs/models/getv1companiescompanyidpayrollsqueryparaminclude.md +++ b/gusto_app_int/docs/models/getv1companiescompanyidpayrollsqueryparaminclude.md @@ -5,7 +5,8 @@ | Name | Value | | --------------------- | --------------------- | -| `TOTALS` | totals | +| `TAXES` | taxes | | `PAYROLL_STATUS_META` | payroll_status_meta | +| `TOTALS` | totals | | `RISK_BLOCKERS` | risk_blockers | | `REVERSALS` | reversals | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidpayrollsrequest.md b/gusto_app_int/docs/models/getv1companiescompanyidpayrollsrequest.md index bafb9fcf..a9dcfe9d 100644 --- a/gusto_app_int/docs/models/getv1companiescompanyidpayrollsrequest.md +++ b/gusto_app_int/docs/models/getv1companiescompanyidpayrollsrequest.md @@ -3,15 +3,17 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | -| `processing_statuses` | List[[models.ProcessingStatuses](../models/processingstatuses.md)] | :heavy_minus_sign: | Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` | | -| `payroll_types` | List[[models.PayrollTypes](../models/payrolltypes.md)] | :heavy_minus_sign: | Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` | | -| `include` | List[[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude](../models/getv1companiescompanyidpayrollsqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta` | | -| `start_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is after the start date | | -| `end_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. | | -| `sort_order` | [Optional[models.SortOrder]](../models/sortorder.md) | :heavy_minus_sign: | A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. | asc | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | -| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `processing_statuses` | List[[models.ProcessingStatuses](../models/processingstatuses.md)] | :heavy_minus_sign: | Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` | | +| `payroll_types` | List[[models.PayrollTypes](../models/payrolltypes.md)] | :heavy_minus_sign: | Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` | | +| `processed` | *Optional[bool]* | :heavy_minus_sign: | Whether to return processed or unprocessed payrolls | | +| `include_off_cycle` | *Optional[bool]* | :heavy_minus_sign: | Whether to include off cycle payrolls in the response | | +| `include` | List[[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude](../models/getv1companiescompanyidpayrollsqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` | | +| `start_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is after the start date | 2020-01-31 | +| `end_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. | 2020-01-31 | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | +| `sort_order` | [Optional[models.QueryParamSortOrder]](../models/queryparamsortorder.md) | :heavy_minus_sign: | A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. | asc | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidtimeoffrequestsheaderxgustoapiversion.md b/gusto_app_int/docs/models/getv1companiescompanyidtimeoffrequestsheaderxgustoapiversion.md new file mode 100644 index 00000000..2da43118 --- /dev/null +++ b/gusto_app_int/docs/models/getv1companiescompanyidtimeoffrequestsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidtimeoffrequestsrequest.md b/gusto_app_int/docs/models/getv1companiescompanyidtimeoffrequestsrequest.md new file mode 100644 index 00000000..781d40e2 --- /dev/null +++ b/gusto_app_int/docs/models/getv1companiescompanyidtimeoffrequestsrequest.md @@ -0,0 +1,11 @@ +# GetV1CompaniesCompanyIDTimeOffRequestsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion]](../models/getv1companiescompanyidtimeoffrequestsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `company_id` | *str* | :heavy_check_mark: | The company UUID | +| `start_date` | *Optional[str]* | :heavy_minus_sign: | Filter time off requests starting on or after this date | +| `end_date` | *Optional[str]* | :heavy_minus_sign: | Filter time off requests ending on or before this date | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyuuidcontractorsrequest.md b/gusto_app_int/docs/models/getv1companiescompanyuuidcontractorsrequest.md index 13d619bf..41df2dc9 100644 --- a/gusto_app_int/docs/models/getv1companiescompanyuuidcontractorsrequest.md +++ b/gusto_app_int/docs/models/getv1companiescompanyuuidcontractorsrequest.md @@ -9,4 +9,5 @@ | `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | +| `sort_by` | [Optional[models.ContractorsSortBy]](../models/contractorssortby.md) | :heavy_minus_sign: | Sort contractors. Options: type, onboarding_status, name, created_at | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getreportsreportuuidrequest.md b/gusto_app_int/docs/models/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md similarity index 94% rename from gusto_embedded/docs/models/getreportsreportuuidrequest.md rename to gusto_app_int/docs/models/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md index 4a3e7de4..61bb9efb 100644 --- a/gusto_embedded/docs/models/getreportsreportuuidrequest.md +++ b/gusto_app_int/docs/models/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md @@ -1,9 +1,9 @@ -# GetReportsReportUUIDRequest +# GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest ## Fields | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `report_uuid` | *str* | :heavy_check_mark: | The UUID of the report request | +| `company_benefit_id` | *str* | :heavy_check_mark: | The UUID of the company benefit | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md b/gusto_app_int/docs/models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md new file mode 100644 index 00000000..5112b545 --- /dev/null +++ b/gusto_app_int/docs/models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1employeesemployeeidhomeaddressesrequest.md b/gusto_app_int/docs/models/getv1employeesemployeeidhomeaddressesrequest.md index 2ff4c4f1..25bcddc3 100644 --- a/gusto_app_int/docs/models/getv1employeesemployeeidhomeaddressesrequest.md +++ b/gusto_app_int/docs/models/getv1employeesemployeeidhomeaddressesrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion]](../models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md b/gusto_app_int/docs/models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md new file mode 100644 index 00000000..89fe3aff --- /dev/null +++ b/gusto_app_int/docs/models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1employeesemployeeidworkaddressesrequest.md b/gusto_app_int/docs/models/getv1employeesemployeeidworkaddressesrequest.md index 9b2ab972..00b143d5 100644 --- a/gusto_app_int/docs/models/getv1employeesemployeeidworkaddressesrequest.md +++ b/gusto_app_int/docs/models/getv1employeesemployeeidworkaddressesrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion]](../models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1employeesrequest.md b/gusto_app_int/docs/models/getv1employeesrequest.md index 96d55258..dfe81991 100644 --- a/gusto_app_int/docs/models/getv1employeesrequest.md +++ b/gusto_app_int/docs/models/getv1employeesrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `x_gusto_api_version` | [Optional[models.GetV1EmployeesHeaderXGustoAPIVersion]](../models/getv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `include` | List[[models.QueryParamInclude](../models/queryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options:
- all_compensations: Include all effective dated compensations for each job instead of only the current compensation
- custom_fields: Include employees' custom fields
| \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesHeaderXGustoAPIVersion]](../models/getv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `include` | List[[models.QueryParamInclude](../models/queryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response. Multiple options are comma separated. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md b/gusto_app_int/docs/models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..15d62271 --- /dev/null +++ b/gusto_app_int/docs/models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1homeaddresseshomeaddressuuidrequest.md b/gusto_app_int/docs/models/getv1homeaddresseshomeaddressuuidrequest.md index 273f19de..654451d4 100644 --- a/gusto_app_int/docs/models/getv1homeaddresseshomeaddressuuidrequest.md +++ b/gusto_app_int/docs/models/getv1homeaddresseshomeaddressuuidrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1webhookshealthcheckheaderxgustoapiversion.md b/gusto_app_int/docs/models/getv1webhookshealthcheckheaderxgustoapiversion.md new file mode 100644 index 00000000..b31b7f0b --- /dev/null +++ b/gusto_app_int/docs/models/getv1webhookshealthcheckheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1WebhooksHealthCheckHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1webhookshealthcheckrequest.md b/gusto_app_int/docs/models/getv1webhookshealthcheckrequest.md new file mode 100644 index 00000000..0cfc5bc5 --- /dev/null +++ b/gusto_app_int/docs/models/getv1webhookshealthcheckrequest.md @@ -0,0 +1,8 @@ +# GetV1WebhooksHealthCheckRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion]](../models/getv1webhookshealthcheckheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1webhookshealthchecksecurity.md b/gusto_app_int/docs/models/getv1webhookshealthchecksecurity.md new file mode 100644 index 00000000..1bad80f5 --- /dev/null +++ b/gusto_app_int/docs/models/getv1webhookshealthchecksecurity.md @@ -0,0 +1,8 @@ +# GetV1WebhooksHealthCheckSecurity + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `system_access_auth` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md b/gusto_app_int/docs/models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..45769422 --- /dev/null +++ b/gusto_app_int/docs/models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1workaddressesworkaddressuuidrequest.md b/gusto_app_int/docs/models/getv1workaddressesworkaddressuuidrequest.md index bc62296e..7888f203 100644 --- a/gusto_app_int/docs/models/getv1workaddressesworkaddressuuidrequest.md +++ b/gusto_app_int/docs/models/getv1workaddressesworkaddressuuidrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/include.md b/gusto_app_int/docs/models/include.md index 40441b91..b553da44 100644 --- a/gusto_app_int/docs/models/include.md +++ b/gusto_app_int/docs/models/include.md @@ -3,8 +3,11 @@ ## Values -| Name | Value | -| ------------------- | ------------------- | -| `CUSTOM_FIELDS` | custom_fields | -| `ALL_COMPENSATIONS` | all_compensations | -| `COMPANY_NAME` | company_name | \ No newline at end of file +| Name | Value | +| ---------------------- | ---------------------- | +| `ALL_COMPENSATIONS` | all_compensations | +| `ALL_HOME_ADDRESSES` | all_home_addresses | +| `COMPANY_NAME` | company_name | +| `CURRENT_HOME_ADDRESS` | current_home_address | +| `CUSTOM_FIELDS` | custom_fields | +| `PORTAL_INVITATIONS` | portal_invitations | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollreceipttaxes.md b/gusto_app_int/docs/models/initiator.md similarity index 72% rename from gusto_embedded/docs/models/payrollreceipttaxes.md rename to gusto_app_int/docs/models/initiator.md index 33ea8808..cbf07133 100644 --- a/gusto_embedded/docs/models/payrollreceipttaxes.md +++ b/gusto_app_int/docs/models/initiator.md @@ -1,9 +1,9 @@ -# PayrollReceiptTaxes +# Initiator ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `name` | *Optional[str]* | :heavy_minus_sign: | The amount paid for this tax. | -| `amount` | *Optional[str]* | :heavy_minus_sign: | The total amount paid by both employer and employee for this tax. | \ No newline at end of file +| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee who initiated the time off request. | +| `full_name` | *Optional[str]* | :heavy_minus_sign: | The full name of the employee who initiated the time off request. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/integrationtype.md b/gusto_app_int/docs/models/integrationtype.md new file mode 100644 index 00000000..84e9b113 --- /dev/null +++ b/gusto_app_int/docs/models/integrationtype.md @@ -0,0 +1,11 @@ +# IntegrationType + +The `integration_type` used for the report, if `aggregation` was 'integration.' Otherwise, this will be null. + + +## Values + +| Name | Value | +| ------ | ------ | +| `XERO` | xero | +| `QBO` | qbo | \ No newline at end of file diff --git a/gusto_app_int/docs/models/job.md b/gusto_app_int/docs/models/job.md index 834f7f84..626f482f 100644 --- a/gusto_app_int/docs/models/job.md +++ b/gusto_app_int/docs/models/job.md @@ -19,4 +19,6 @@ The representation of a job in Gusto. | `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee owns at least 2% of the company. | | `state_wc_covered` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether this job is eligible for workers' compensation coverage in the state of Washington (WA). | | `state_wc_class_code` | *OptionalNullable[str]* | :heavy_minus_sign: | The risk class code for workers' compensation in Washington state. Please visit [Washington state's Risk Class page](https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/) to learn more. | -| `compensations` | List[[models.Compensation](../models/compensation.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `compensations` | List[[models.Compensation](../models/compensation.md)] | :heavy_minus_sign: | N/A | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | The uuid of the employee's work location. | +| `location` | [Optional[models.Location]](../models/location.md) | :heavy_minus_sign: | The representation of an address in Gusto. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/location.md b/gusto_app_int/docs/models/location.md index 485dff73..ec5b2c55 100644 --- a/gusto_app_int/docs/models/location.md +++ b/gusto_app_int/docs/models/location.md @@ -17,8 +17,9 @@ The representation of an address in Gusto. | `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | `zip` | *Optional[str]* | :heavy_minus_sign: | N/A | | `country` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `active` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | | `mailing_address` | *Optional[bool]* | :heavy_minus_sign: | Specifies if the location is the company's mailing address. Only included if the location belongs to a company. | | `filing_address` | *Optional[bool]* | :heavy_minus_sign: | Specifies if the location is the company's filing address. Only included if the location belongs to a company. | | `created_at` | *Optional[str]* | :heavy_minus_sign: | Datetime for when location is created | -| `updated_at` | *Optional[str]* | :heavy_minus_sign: | Datetime for when location is updated | \ No newline at end of file +| `updated_at` | *Optional[str]* | :heavy_minus_sign: | Datetime for when location is updated | +| `active` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | +| `inactive` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/notification.md b/gusto_app_int/docs/models/notification.md new file mode 100644 index 00000000..5c7dd0c0 --- /dev/null +++ b/gusto_app_int/docs/models/notification.md @@ -0,0 +1,19 @@ +# Notification + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | Unique identifier of a notification. | +| `company_uuid` | *str* | :heavy_check_mark: | Unique identifier of the company to which the notification belongs. | +| `title` | *str* | :heavy_check_mark: | The title of the notification. This highlights the actionable component of the notification. | +| `message` | *str* | :heavy_check_mark: | The message of the notification. This provides additional context for the user and recommends a specific action to resolve the notification. | +| `status` | [models.NotificationStatus](../models/notificationstatus.md) | :heavy_check_mark: | Represents the notification's status as managed by our system. It is updated based on observable system events and internal business logic, and does not reflect resolution steps taken outside our system. This field is read-only and cannot be modified via the API. | +| `category` | *str* | :heavy_check_mark: | The notification's category. | +| `actionable` | *bool* | :heavy_check_mark: | Indicates whether a notification requires action or not. If false, the notification provides critical information only. | +| `can_block_payroll` | *bool* | :heavy_check_mark: | Indicates whether a notification may block ability to run payroll. If true, we suggest that these notifications are prioritized to your end users. | +| `published_at` | *str* | :heavy_check_mark: | Timestamp of when the notification was published. | +| `due_at` | *Nullable[str]* | :heavy_check_mark: | Timestamp of when the notification is due. If the notification has no due date, this field will be null. | +| `template_variables` | Dict[str, *str*] | :heavy_minus_sign: | An object containing template variables used to render the notification. The structure of this object depends on the notification category. Each category defines a fixed set of variable names (keys), which are always present. The values of these variables can vary depending on the specific notification instance. | +| `resources` | List[[models.Resources](../models/resources.md)] | :heavy_check_mark: | An array of entities relevant to the notification | \ No newline at end of file diff --git a/gusto_app_int/docs/models/notificationentitytype.md b/gusto_app_int/docs/models/notificationentitytype.md new file mode 100644 index 00000000..cbe4b65f --- /dev/null +++ b/gusto_app_int/docs/models/notificationentitytype.md @@ -0,0 +1,18 @@ +# NotificationEntityType + +The type of entity being described. + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `BANK_ACCOUNT` | BankAccount | +| `CONTRACTOR` | Contractor | +| `CONTRACTOR_PAYMENT` | ContractorPayment | +| `EMPLOYEE` | Employee | +| `PAYROLL` | Payroll | +| `PAY_SCHEDULE` | PaySchedule | +| `RECOVERY_CASE` | RecoveryCase | +| `SIGNATORY` | Signatory | +| `WIRE_IN_REQUEST` | Wire In Request | \ No newline at end of file diff --git a/gusto_app_int/docs/models/notificationstatus.md b/gusto_app_int/docs/models/notificationstatus.md new file mode 100644 index 00000000..4f9d3eaa --- /dev/null +++ b/gusto_app_int/docs/models/notificationstatus.md @@ -0,0 +1,12 @@ +# NotificationStatus + +Represents the notification's status as managed by our system. It is updated based on observable system events and internal business logic, and does not reflect resolution steps taken outside our system. This field is read-only and cannot be modified via the API. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `OPEN` | open | +| `RESOLVED` | resolved | +| `EXPIRED` | expired | \ No newline at end of file diff --git a/gusto_app_int/docs/models/paidtimeoff.md b/gusto_app_int/docs/models/paidtimeoff.md index 75e44127..b8deedb3 100644 --- a/gusto_app_int/docs/models/paidtimeoff.md +++ b/gusto_app_int/docs/models/paidtimeoff.md @@ -7,13 +7,13 @@ The representation of paid time off in Gusto. | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `name` | [Optional[models.Name]](../models/name.md) | :heavy_minus_sign: | The name of the paid time off type. | | -| `policy_name` | *Optional[str]* | :heavy_minus_sign: | The name of the time off policy. | | -| `policy_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the time off policy. | | -| `accrual_unit` | *Optional[str]* | :heavy_minus_sign: | The unit the PTO type is accrued in. | Hour | -| `accrual_rate` | *Optional[str]* | :heavy_minus_sign: | The number of accrual units accrued per accrual period. | | -| `accrual_method` | *Optional[str]* | :heavy_minus_sign: | The accrual method of the time off policy | unlimited | -| `accrual_period` | *Optional[str]* | :heavy_minus_sign: | The frequency at which the PTO type is accrued. | Year | -| `accrual_balance` | *Optional[str]* | :heavy_minus_sign: | The number of accrual units accrued. | | +| `name` | [OptionalNullable[models.Name]](../models/name.md) | :heavy_minus_sign: | The name of the paid time off type. | | +| `policy_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the time off policy. | | +| `policy_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the time off policy. | | +| `accrual_unit` | *OptionalNullable[str]* | :heavy_minus_sign: | The unit the PTO type is accrued in. | Hour | +| `accrual_rate` | *OptionalNullable[str]* | :heavy_minus_sign: | The number of accrual units accrued per accrual period. | | +| `accrual_method` | *OptionalNullable[str]* | :heavy_minus_sign: | The accrual method of the time off policy | unlimited | +| `accrual_period` | *OptionalNullable[str]* | :heavy_minus_sign: | The frequency at which the PTO type is accrued. | Year | +| `accrual_balance` | *OptionalNullable[str]* | :heavy_minus_sign: | The number of accrual units accrued. | | | `maximum_accrual_balance` | *OptionalNullable[str]* | :heavy_minus_sign: | The maximum number of accrual units allowed. A null value signifies no maximum. | | | `paid_at_termination` | *Optional[bool]* | :heavy_minus_sign: | Whether the accrual balance is paid to the employee upon termination. | | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payroll.md b/gusto_app_int/docs/models/payroll.md index 3b6201cc..f53ba827 100644 --- a/gusto_app_int/docs/models/payroll.md +++ b/gusto_app_int/docs/models/payroll.md @@ -1,7 +1,5 @@ # Payroll -Example response - ## Fields @@ -10,8 +8,8 @@ Example response | `payroll_deadline` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | | `check_date` | *Optional[str]* | :heavy_minus_sign: | The date on which employees will be paid for the payroll. | | `processed` | *Optional[bool]* | :heavy_minus_sign: | Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline. | -| `processed_date` | *Optional[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | -| `calculated_at` | *Optional[str]* | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | +| `processed_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | +| `calculated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | | `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | | `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | | `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company for the payroll. | @@ -26,10 +24,11 @@ Example response | `pay_period` | [Optional[models.PayrollPayPeriodType]](../models/payrollpayperiodtype.md) | :heavy_minus_sign: | N/A | | `payroll_status_meta` | [Optional[models.PayrollPayrollStatusMetaType]](../models/payrollpayrollstatusmetatype.md) | :heavy_minus_sign: | Information about the payroll's status and expected dates | | `totals` | [Optional[models.PayrollTotalsType]](../models/payrolltotalstype.md) | :heavy_minus_sign: | The subtotals for the payroll. | -| `employee_compensations` | List[[models.PayrollEmployeeCompensationsType](../models/payrollemployeecompensationstype.md)] | :heavy_minus_sign: | N/A | | `company_taxes` | List[[models.PayrollCompanyTaxesType](../models/payrollcompanytaxestype.md)] | :heavy_minus_sign: | An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | +| `payroll_taxes` | List[[models.PayrollTaxesType](../models/payrolltaxestype.md)] | :heavy_minus_sign: | An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter. | | `payment_speed_changed` | [Optional[models.PayrollPaymentSpeedChangedType]](../models/payrollpaymentspeedchangedtype.md) | :heavy_minus_sign: | Only applicable when a payroll is moved to four day processing instead of fast ach. | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Datetime for when the resource was created. | | `submission_blockers` | List[[models.PayrollSubmissionBlockersType](../models/payrollsubmissionblockerstype.md)] | :heavy_minus_sign: | Only included for processed or calculated payrolls | | `credit_blockers` | List[[models.PayrollCreditBlockersType](../models/payrollcreditblockerstype.md)] | :heavy_minus_sign: | Only included for processed payrolls | -| `processing_request` | [OptionalNullable[models.PayrollProcessingRequest]](../models/payrollprocessingrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `processing_request` | [OptionalNullable[models.PayrollProcessingRequest]](../models/payrollprocessingrequest.md) | :heavy_minus_sign: | N/A | +| `partner_owned_disbursement` | *OptionalNullable[bool]* | :heavy_minus_sign: | Will money movement for the payroll be performed by the partner rather than by Gusto? | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollemployeecompensationstype.md b/gusto_app_int/docs/models/payrollemployeecompensationstype.md index 7ad71fd7..dfe03a60 100644 --- a/gusto_app_int/docs/models/payrollemployeecompensationstype.md +++ b/gusto_app_int/docs/models/payrollemployeecompensationstype.md @@ -8,14 +8,16 @@ | `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | | `excluded` | *Optional[bool]* | :heavy_minus_sign: | This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false. | | `version` | *Optional[str]* | :heavy_minus_sign: | The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the employee. Requires `employees:read` scope. | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The preferred first name of the employee. Requires `employees:read` scope. | +| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the employee. Requires `employees:read` scope. | | `gross_pay` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls. | | `net_pay` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's net pay, equal to gross_pay - employee taxes - employee deductions or garnishments - cash tips. This value is only available for processed payrolls. | | `check_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls. | -| `payment_method` | [OptionalNullable[models.PayrollEmployeeCompensationsTypePaymentMethod]](../models/payrollemployeecompensationstypepaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. | +| `payment_method` | [OptionalNullable[models.PayrollEmployeeCompensationsTypePaymentMethod]](../models/payrollemployeecompensationstypepaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. | | `memo` | *OptionalNullable[str]* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | | `fixed_compensations` | List[[models.FixedCompensations](../models/fixedcompensations.md)] | :heavy_minus_sign: | An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned. | | `hourly_compensations` | List[[models.HourlyCompensations](../models/hourlycompensations.md)] | :heavy_minus_sign: | An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned. | | `paid_time_off` | List[[models.PayrollEmployeeCompensationsTypePaidTimeOff](../models/payrollemployeecompensationstypepaidtimeoff.md)] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. | -| `benefits` | List[[models.Benefits](../models/benefits.md)] | :heavy_minus_sign: | An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present. | -| `deductions` | List[[models.Deductions](../models/deductions.md)] | :heavy_minus_sign: | An array of employee deductions for the pay period. Deductions are only included for processed payroll when the include parameter is present. | -| `taxes` | List[[models.Taxes](../models/taxes.md)] | :heavy_minus_sign: | An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | \ No newline at end of file +| `deductions` | List[[models.Deductions](../models/deductions.md)] | :heavy_minus_sign: | N/A | +| `reimbursements` | List[[models.Reimbursements](../models/reimbursements.md)] | :heavy_minus_sign: | An array of reimbursements for the employee. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollemployeecompensationstypepaymentmethod.md b/gusto_app_int/docs/models/payrollemployeecompensationstypepaymentmethod.md index 8bcc6b5e..c9f57963 100644 --- a/gusto_app_int/docs/models/payrollemployeecompensationstypepaymentmethod.md +++ b/gusto_app_int/docs/models/payrollemployeecompensationstypepaymentmethod.md @@ -1,11 +1,12 @@ # PayrollEmployeeCompensationsTypePaymentMethod -The employee's compensation payment method. +The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. ## Values | Name | Value | | ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | | `CHECK` | Check | -| `DIRECT_DEPOSIT` | Direct Deposit | \ No newline at end of file +| `HISTORICAL` | Historical | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollprepared.md b/gusto_app_int/docs/models/payrollprepared.md index 80f2221c..3eea4e2a 100644 --- a/gusto_app_int/docs/models/payrollprepared.md +++ b/gusto_app_int/docs/models/payrollprepared.md @@ -1,7 +1,5 @@ # PayrollPrepared -A prepared payroll - ## Fields @@ -10,8 +8,8 @@ A prepared payroll | `payroll_deadline` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | | `check_date` | *Optional[str]* | :heavy_minus_sign: | The date on which employees will be paid for the payroll. | | `processed` | *Optional[bool]* | :heavy_minus_sign: | Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline. | -| `processed_date` | *Optional[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | -| `calculated_at` | *Optional[str]* | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | +| `processed_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | +| `calculated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | | `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | | `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | | `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company for the payroll. | @@ -29,4 +27,5 @@ A prepared payroll | `payment_speed_changed` | [Optional[models.PayrollPaymentSpeedChangedType]](../models/payrollpaymentspeedchangedtype.md) | :heavy_minus_sign: | Only applicable when a payroll is moved to four day processing instead of fast ach. | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Datetime for when the resource was created. | | `fixed_compensation_types` | List[[models.PayrollFixedCompensationTypesType](../models/payrollfixedcompensationtypestype.md)] | :heavy_minus_sign: | N/A | -| `processing_request` | [OptionalNullable[models.PayrollProcessingRequest]](../models/payrollprocessingrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `processing_request` | [OptionalNullable[models.PayrollProcessingRequest]](../models/payrollprocessingrequest.md) | :heavy_minus_sign: | N/A | +| `partner_owned_disbursement` | *OptionalNullable[bool]* | :heavy_minus_sign: | Will money movement for the payroll be performed by the partner rather than by Gusto? | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollpreparesortby.md b/gusto_app_int/docs/models/payrollpreparesortby.md new file mode 100644 index 00000000..6f5e9867 --- /dev/null +++ b/gusto_app_int/docs/models/payrollpreparesortby.md @@ -0,0 +1,9 @@ +# PayrollPrepareSortBy + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `FIRST_NAME` | first_name | +| `LAST_NAME` | last_name | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollminimal.md b/gusto_app_int/docs/models/payrollshow.md similarity index 84% rename from gusto_app_int/docs/models/payrollminimal.md rename to gusto_app_int/docs/models/payrollshow.md index 81c61162..50f57376 100644 --- a/gusto_app_int/docs/models/payrollminimal.md +++ b/gusto_app_int/docs/models/payrollshow.md @@ -1,6 +1,4 @@ -# PayrollMinimal - -Example response +# PayrollShow ## Fields @@ -9,12 +7,12 @@ Example response | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `payroll_deadline` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | | `check_date` | *Optional[str]* | :heavy_minus_sign: | The date on which employees will be paid for the payroll. | -| `processed` | *bool* | :heavy_check_mark: | Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline. | -| `processed_date` | *Optional[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | -| `calculated_at` | *Optional[str]* | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | -| `uuid` | *str* | :heavy_check_mark: | The UUID of the payroll. | -| `payroll_uuid` | *str* | :heavy_check_mark: | The UUID of the payroll. | -| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company for the payroll. | +| `processed` | *Optional[bool]* | :heavy_minus_sign: | Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline. | +| `processed_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | +| `calculated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | +| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company for the payroll. | | `off_cycle` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the payroll is an off-cycle payroll | | `off_cycle_reason` | [OptionalNullable[models.OffCycleReasonType]](../models/offcyclereasontype.md) | :heavy_minus_sign: | The off-cycle reason. Only included for off-cycle payrolls. | | `auto_pilot` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the payroll is an auto pilot payroll | @@ -26,8 +24,12 @@ Example response | `pay_period` | [Optional[models.PayrollPayPeriodType]](../models/payrollpayperiodtype.md) | :heavy_minus_sign: | N/A | | `payroll_status_meta` | [Optional[models.PayrollPayrollStatusMetaType]](../models/payrollpayrollstatusmetatype.md) | :heavy_minus_sign: | Information about the payroll's status and expected dates | | `totals` | [Optional[models.PayrollTotalsType]](../models/payrolltotalstype.md) | :heavy_minus_sign: | The subtotals for the payroll. | +| `company_taxes` | List[[models.PayrollCompanyTaxesType](../models/payrollcompanytaxestype.md)] | :heavy_minus_sign: | An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | +| `payroll_taxes` | List[[models.PayrollTaxesType](../models/payrolltaxestype.md)] | :heavy_minus_sign: | An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter. | | `payment_speed_changed` | [Optional[models.PayrollPaymentSpeedChangedType]](../models/payrollpaymentspeedchangedtype.md) | :heavy_minus_sign: | Only applicable when a payroll is moved to four day processing instead of fast ach. | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Datetime for when the resource was created. | | `submission_blockers` | List[[models.PayrollSubmissionBlockersType](../models/payrollsubmissionblockerstype.md)] | :heavy_minus_sign: | Only included for processed or calculated payrolls | | `credit_blockers` | List[[models.PayrollCreditBlockersType](../models/payrollcreditblockerstype.md)] | :heavy_minus_sign: | Only included for processed payrolls | -| `reversal_payroll_uuids` | List[*str*] | :heavy_minus_sign: | Array of reversal payroll UUIDs, if applicable. | \ No newline at end of file +| `processing_request` | [OptionalNullable[models.PayrollProcessingRequest]](../models/payrollprocessingrequest.md) | :heavy_minus_sign: | N/A | +| `partner_owned_disbursement` | *OptionalNullable[bool]* | :heavy_minus_sign: | Will money movement for the payroll be performed by the partner rather than by Gusto? | +| `employee_compensations` | List[[models.EmployeeCompensations](../models/employeecompensations.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollshowamounttype.md b/gusto_app_int/docs/models/payrollshowamounttype.md new file mode 100644 index 00000000..bb3e1575 --- /dev/null +++ b/gusto_app_int/docs/models/payrollshowamounttype.md @@ -0,0 +1,9 @@ +# PayrollShowAmountType + + +## Values + +| Name | Value | +| --------- | --------- | +| `FIXED` | fixed | +| `PERCENT` | percent | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollshowdeductions.md b/gusto_app_int/docs/models/payrollshowdeductions.md new file mode 100644 index 00000000..bffed4ac --- /dev/null +++ b/gusto_app_int/docs/models/payrollshowdeductions.md @@ -0,0 +1,11 @@ +# PayrollShowDeductions + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `amount` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `amount_type` | [Optional[models.PayrollShowAmountType]](../models/payrollshowamounttype.md) | :heavy_minus_sign: | N/A | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollshowfixedcompensations.md b/gusto_app_int/docs/models/payrollshowfixedcompensations.md new file mode 100644 index 00000000..2adaf86a --- /dev/null +++ b/gusto_app_int/docs/models/payrollshowfixedcompensations.md @@ -0,0 +1,10 @@ +# PayrollShowFixedCompensations + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the compensation. This also serves as the unique, immutable identifier for this compensation. | +| `amount` | *Optional[str]* | :heavy_minus_sign: | The amount of the compensation for the pay period. | +| `job_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the job for the compensation. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollshowhourlycompensations.md b/gusto_app_int/docs/models/payrollshowhourlycompensations.md new file mode 100644 index 00000000..0ac2b0f8 --- /dev/null +++ b/gusto_app_int/docs/models/payrollshowhourlycompensations.md @@ -0,0 +1,13 @@ +# PayrollShowHourlyCompensations + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the compensation. This also serves as the unique, immutable identifier for this compensation. | +| `hours` | *Optional[str]* | :heavy_minus_sign: | The number of hours to be compensated for this pay period. | +| `amount` | *Optional[str]* | :heavy_minus_sign: | The amount of the compensation. This field is only available after the payroll is calculated and cannot be used for updating hourly compensations. | +| `job_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the job for the compensation. | +| `compensation_multiplier` | *Optional[float]* | :heavy_minus_sign: | The amount multiplied by the base rate to calculate total compensation per hour worked. | +| `flsa_status` | *Optional[str]* | :heavy_minus_sign: | The FLSA Status of the employee's primary job compensation | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollshowpaidtimeoff.md b/gusto_app_int/docs/models/payrollshowpaidtimeoff.md new file mode 100644 index 00000000..2a87dafa --- /dev/null +++ b/gusto_app_int/docs/models/payrollshowpaidtimeoff.md @@ -0,0 +1,10 @@ +# PayrollShowPaidTimeOff + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the PTO. This also serves as the unique, immutable identifier for the PTO. | +| `hours` | *Optional[str]* | :heavy_minus_sign: | The hours of this PTO taken during the pay period. | +| `final_payout_unused_hours_input` | *Optional[str]* | :heavy_minus_sign: | The outstanding hours paid upon termination. This field is only applicable for termination payrolls. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollshowpaymentmethod.md b/gusto_app_int/docs/models/payrollshowpaymentmethod.md new file mode 100644 index 00000000..f505933b --- /dev/null +++ b/gusto_app_int/docs/models/payrollshowpaymentmethod.md @@ -0,0 +1,12 @@ +# PayrollShowPaymentMethod + +The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | +| `HISTORICAL` | Historical | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollshowreimbursements.md b/gusto_app_int/docs/models/payrollshowreimbursements.md new file mode 100644 index 00000000..44b9a7ef --- /dev/null +++ b/gusto_app_int/docs/models/payrollshowreimbursements.md @@ -0,0 +1,11 @@ +# PayrollShowReimbursements + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `amount` | *str* | :heavy_check_mark: | The dollar amount of the reimbursement for the pay period. | +| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the reimbursement. Null for unnamed reimbursements. | +| `uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls. | +| `recurring` | *Optional[bool]* | :heavy_minus_sign: | Whether the reimbursement is recurring. This field is only available for unprocessed payrolls. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrolltaxestype.md b/gusto_app_int/docs/models/payrolltaxestype.md new file mode 100644 index 00000000..53dcca3e --- /dev/null +++ b/gusto_app_int/docs/models/payrolltaxestype.md @@ -0,0 +1,10 @@ +# PayrollTaxesType + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The tax name | +| `employer` | *Optional[bool]* | :heavy_minus_sign: | Whether this tax is an employer or employee tax | +| `amount` | *Optional[float]* | :heavy_minus_sign: | The total tax for the payroll | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1companiescompanyidpayrollsrequestbody.md b/gusto_app_int/docs/models/payrollupdate.md similarity index 97% rename from gusto_app_int/docs/models/putv1companiescompanyidpayrollsrequestbody.md rename to gusto_app_int/docs/models/payrollupdate.md index 39a1f6cc..c2214d52 100644 --- a/gusto_app_int/docs/models/putv1companiescompanyidpayrollsrequestbody.md +++ b/gusto_app_int/docs/models/payrollupdate.md @@ -1,11 +1,11 @@ -# PutV1CompaniesCompanyIDPayrollsRequestBody +# PayrollUpdate ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_compensations` | List[[models.EmployeeCompensations](../models/employeecompensations.md)] | :heavy_check_mark: | N/A | +| `employee_compensations` | List[[models.PayrollUpdateEmployeeCompensations](../models/payrollupdateemployeecompensations.md)] | :heavy_check_mark: | N/A | | `withholding_pay_period` | [Optional[models.WithholdingPayPeriod]](../models/withholdingpayperiod.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. | | `skip_regular_deductions` | *Optional[bool]* | :heavy_minus_sign: | Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls. | | `fixed_withholding_rate` | *Optional[bool]* | :heavy_minus_sign: | Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollupdateamounttype.md b/gusto_app_int/docs/models/payrollupdateamounttype.md new file mode 100644 index 00000000..dee07340 --- /dev/null +++ b/gusto_app_int/docs/models/payrollupdateamounttype.md @@ -0,0 +1,11 @@ +# PayrollUpdateAmountType + +The amount type of the deduction for the pay period. + + +## Values + +| Name | Value | +| --------- | --------- | +| `FIXED` | fixed | +| `PERCENT` | percent | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payrollupdatedeductions.md b/gusto_app_int/docs/models/payrollupdatedeductions.md new file mode 100644 index 00000000..18b49824 --- /dev/null +++ b/gusto_app_int/docs/models/payrollupdatedeductions.md @@ -0,0 +1,13 @@ +# PayrollUpdateDeductions + +An array of deductions for the employee. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the deduction. | +| `amount` | *Optional[float]* | :heavy_minus_sign: | The amount of the deduction for the pay period. | +| `amount_type` | [Optional[models.PayrollUpdateAmountType]](../models/payrollupdateamounttype.md) | :heavy_minus_sign: | The amount type of the deduction for the pay period. | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollsemployeecompensations.md b/gusto_app_int/docs/models/payrollupdateemployeecompensations.md similarity index 82% rename from gusto_embedded/docs/models/putv1companiescompanyidpayrollsemployeecompensations.md rename to gusto_app_int/docs/models/payrollupdateemployeecompensations.md index 1f33cef8..7333c021 100644 --- a/gusto_embedded/docs/models/putv1companiescompanyidpayrollsemployeecompensations.md +++ b/gusto_app_int/docs/models/payrollupdateemployeecompensations.md @@ -1,4 +1,4 @@ -# PutV1CompaniesCompanyIDPayrollsEmployeeCompensations +# PayrollUpdateEmployeeCompensations ## Fields @@ -8,8 +8,9 @@ | `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | | `version` | *Optional[str]* | :heavy_minus_sign: | The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | | `excluded` | *Optional[bool]* | :heavy_minus_sign: | This employee will be excluded from payroll calculation and will not be paid for the payroll. | -| `payment_method` | [Optional[models.PutV1CompaniesCompanyIDPayrollsPaymentMethod]](../models/putv1companiescompanyidpayrollspaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. Invalid values will be ignored. | +| `payment_method` | [Optional[models.PayrollUpdatePaymentMethod]](../models/payrollupdatepaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. Invalid values will be ignored. | | `memo` | *Optional[str]* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | -| `fixed_compensations` | List[[models.PutV1CompaniesCompanyIDPayrollsFixedCompensations](../models/putv1companiescompanyidpayrollsfixedcompensations.md)] | :heavy_minus_sign: | N/A | -| `hourly_compensations` | List[[models.PutV1CompaniesCompanyIDPayrollsHourlyCompensations](../models/putv1companiescompanyidpayrollshourlycompensations.md)] | :heavy_minus_sign: | N/A | -| `paid_time_off` | List[[models.PutV1CompaniesCompanyIDPayrollsPaidTimeOff](../models/putv1companiescompanyidpayrollspaidtimeoff.md)] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid. | \ No newline at end of file +| `fixed_compensations` | List[[models.PayrollUpdateFixedCompensations](../models/payrollupdatefixedcompensations.md)] | :heavy_minus_sign: | N/A | +| `hourly_compensations` | List[[models.PayrollUpdateHourlyCompensations](../models/payrollupdatehourlycompensations.md)] | :heavy_minus_sign: | N/A | +| `deductions` | List[[models.PayrollUpdateDeductions](../models/payrollupdatedeductions.md)] | :heavy_minus_sign: | N/A | +| `paid_time_off` | List[[models.PayrollUpdatePaidTimeOff](../models/payrollupdatepaidtimeoff.md)] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollsfixedcompensations.md b/gusto_app_int/docs/models/payrollupdatefixedcompensations.md similarity index 97% rename from gusto_embedded/docs/models/putv1companiescompanyidpayrollsfixedcompensations.md rename to gusto_app_int/docs/models/payrollupdatefixedcompensations.md index d420dda8..a8cc7cea 100644 --- a/gusto_embedded/docs/models/putv1companiescompanyidpayrollsfixedcompensations.md +++ b/gusto_app_int/docs/models/payrollupdatefixedcompensations.md @@ -1,4 +1,4 @@ -# PutV1CompaniesCompanyIDPayrollsFixedCompensations +# PayrollUpdateFixedCompensations An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollshourlycompensations.md b/gusto_app_int/docs/models/payrollupdatehourlycompensations.md similarity index 97% rename from gusto_embedded/docs/models/putv1companiescompanyidpayrollshourlycompensations.md rename to gusto_app_int/docs/models/payrollupdatehourlycompensations.md index eb2bef39..57677194 100644 --- a/gusto_embedded/docs/models/putv1companiescompanyidpayrollshourlycompensations.md +++ b/gusto_app_int/docs/models/payrollupdatehourlycompensations.md @@ -1,4 +1,4 @@ -# PutV1CompaniesCompanyIDPayrollsHourlyCompensations +# PayrollUpdateHourlyCompensations An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. diff --git a/gusto_app_int/docs/models/putv1companiescompanyidpayrollspaidtimeoff.md b/gusto_app_int/docs/models/payrollupdatepaidtimeoff.md similarity index 98% rename from gusto_app_int/docs/models/putv1companiescompanyidpayrollspaidtimeoff.md rename to gusto_app_int/docs/models/payrollupdatepaidtimeoff.md index c6bd2e16..b4dcf306 100644 --- a/gusto_app_int/docs/models/putv1companiescompanyidpayrollspaidtimeoff.md +++ b/gusto_app_int/docs/models/payrollupdatepaidtimeoff.md @@ -1,4 +1,4 @@ -# PutV1CompaniesCompanyIDPayrollsPaidTimeOff +# PayrollUpdatePaidTimeOff ## Fields diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollspaymentmethod.md b/gusto_app_int/docs/models/payrollupdatepaymentmethod.md similarity index 84% rename from gusto_embedded/docs/models/putv1companiescompanyidpayrollspaymentmethod.md rename to gusto_app_int/docs/models/payrollupdatepaymentmethod.md index 8fd1175b..88b6b109 100644 --- a/gusto_embedded/docs/models/putv1companiescompanyidpayrollspaymentmethod.md +++ b/gusto_app_int/docs/models/payrollupdatepaymentmethod.md @@ -1,4 +1,4 @@ -# PutV1CompaniesCompanyIDPayrollsPaymentMethod +# PayrollUpdatePaymentMethod The employee's compensation payment method. Invalid values will be ignored. diff --git a/gusto_app_int/docs/models/payscheduleassignmentemployee.md b/gusto_app_int/docs/models/payscheduleassignmentemployee.md index 3a45e295..e301a66a 100644 --- a/gusto_app_int/docs/models/payscheduleassignmentemployee.md +++ b/gusto_app_int/docs/models/payscheduleassignmentemployee.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | | `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | -| `pay_schedule_uuid` | *Optional[str]* | :heavy_minus_sign: | The employee's pay schedule UUID. | \ No newline at end of file +| `pay_schedule_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee's pay schedule UUID. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payschedulelist.md b/gusto_app_int/docs/models/payschedulelist.md index aa5e42eb..2eb0c618 100644 --- a/gusto_app_int/docs/models/payschedulelist.md +++ b/gusto_app_int/docs/models/payschedulelist.md @@ -5,16 +5,16 @@ The representation of a pay schedule. ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *str* | :heavy_check_mark: | The unique identifier of the pay schedule in Gusto. | -| `frequency` | [Optional[models.PayScheduleFrequency]](../models/payschedulefrequency.md) | :heavy_minus_sign: | The frequency that employees on this pay schedule are paid with Gusto. | -| `anchor_pay_date` | *Optional[str]* | :heavy_minus_sign: | The first date that employees on this pay schedule are paid with Gusto. | -| `anchor_end_of_pay_period` | *Optional[str]* | :heavy_minus_sign: | The last date of the first pay period. This can be the same date as the anchor pay date. | -| `day_1` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the first day of the month that employees are paid. This field is only relevant for pay schedules with the “Twice per month” and “Monthly” frequencies. It will be null for pay schedules with other frequencies. | -| `day_2` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the second day of the month that employees are paid. This field is the second pay date for pay schedules with the "Twice per month" frequency. For semi-monthly pay schedules, this field should be set to 31. For months shorter than 31 days, we will set the second pay date to the last day of the month. It will be null for pay schedules with other frequencies. | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | This field will be hourly when the pay schedule is for hourly employees, salaried when the pay schedule is for salaried employees, the department name if pay schedule is by department, and null when the pay schedule is for all employees. | -| `custom_name` | *Optional[str]* | :heavy_minus_sign: | A custom name for a pay schedule, defaults to the pay frequency description. | -| `auto_pilot` | *Optional[bool]* | :heavy_minus_sign: | With Autopilot® enabled, payroll will run automatically one day before your payroll deadlines. | -| `active` | *Optional[bool]* | :heavy_minus_sign: | Whether this pay schedule is associated with any employees. A pay schedule is inactive when it's unassigned. | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The unique identifier of the pay schedule in Gusto. | | +| `frequency` | [Optional[models.PayScheduleFrequency]](../models/payschedulefrequency.md) | :heavy_minus_sign: | The frequency that employees on this pay schedule are paid with Gusto. | | +| `anchor_pay_date` | *Optional[str]* | :heavy_minus_sign: | The first date that employees on this pay schedule are paid with Gusto. | | +| `anchor_end_of_pay_period` | *Optional[str]* | :heavy_minus_sign: | The last date of the first pay period. This can be the same date as the anchor pay date. | | +| `day_1` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the first day of the month that employees are paid. This field is only relevant for pay schedules with the “Twice per month” and “Monthly” frequencies. It will be null for pay schedules with other frequencies. | | +| `day_2` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the second day of the month that employees are paid. This field is the second pay date for pay schedules with the "Twice per month" frequency. For semi-monthly pay schedules, this field should be set to 31. For months shorter than 31 days, we will set the second pay date to the last day of the month. It will be null for pay schedules with other frequencies. | | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | This field will be hourly when the pay schedule is for hourly employees, salaried when the pay schedule is for salaried employees, the department name if pay schedule is by department, and null when the pay schedule is for all employees. | | +| `custom_name` | *Optional[str]* | :heavy_minus_sign: | A custom name for a pay schedule, defaults to the pay frequency description. | | +| `auto_pilot` | *Optional[bool]* | :heavy_minus_sign: | With Autopilot® enabled, payroll will run automatically one day before your payroll deadlines. | | +| `active` | *Optional[bool]* | :heavy_minus_sign: | Whether this pay schedule is associated with any employees. A pay schedule is inactive when it's unassigned. | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/payscheduleobject.md b/gusto_app_int/docs/models/payscheduleobject.md index e76e5fcf..31401765 100644 --- a/gusto_app_int/docs/models/payscheduleobject.md +++ b/gusto_app_int/docs/models/payscheduleobject.md @@ -5,16 +5,16 @@ The representation of a pay schedule. ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *str* | :heavy_check_mark: | The unique identifier of the pay schedule in Gusto. | -| `frequency` | [Optional[models.PayScheduleFrequency]](../models/payschedulefrequency.md) | :heavy_minus_sign: | The frequency that employees on this pay schedule are paid with Gusto. | -| `anchor_pay_date` | *Optional[str]* | :heavy_minus_sign: | The first date that employees on this pay schedule are paid with Gusto. | -| `anchor_end_of_pay_period` | *Optional[str]* | :heavy_minus_sign: | The last date of the first pay period. This can be the same date as the anchor pay date. | -| `day_1` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the first day of the month that employees are paid. This field is only relevant for pay schedules with the “Twice per month” and “Monthly” frequencies. It will be null for pay schedules with other frequencies. | -| `day_2` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the second day of the month that employees are paid. This field is the second pay date for pay schedules with the "Twice per month" frequency. For semi-monthly pay schedules, this field should be set to 31. For months shorter than 31 days, we will set the second pay date to the last day of the month. It will be null for pay schedules with other frequencies. | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | This field will be hourly when the pay schedule is for hourly employees, salaried when the pay schedule is for salaried employees, the department name if pay schedule is by department, and null when the pay schedule is for all employees. | -| `custom_name` | *Optional[str]* | :heavy_minus_sign: | A custom name for a pay schedule, defaults to the pay frequency description. | -| `auto_pilot` | *Optional[bool]* | :heavy_minus_sign: | With Autopilot® enabled, payroll will run automatically one day before your payroll deadlines. | -| `active` | *Optional[bool]* | :heavy_minus_sign: | Whether this pay schedule is associated with any employees. A pay schedule is inactive when it's unassigned. | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The unique identifier of the pay schedule in Gusto. | | +| `frequency` | [Optional[models.PayScheduleFrequency]](../models/payschedulefrequency.md) | :heavy_minus_sign: | The frequency that employees on this pay schedule are paid with Gusto. | | +| `anchor_pay_date` | *Optional[str]* | :heavy_minus_sign: | The first date that employees on this pay schedule are paid with Gusto. | | +| `anchor_end_of_pay_period` | *Optional[str]* | :heavy_minus_sign: | The last date of the first pay period. This can be the same date as the anchor pay date. | | +| `day_1` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the first day of the month that employees are paid. This field is only relevant for pay schedules with the “Twice per month” and “Monthly” frequencies. It will be null for pay schedules with other frequencies. | | +| `day_2` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the second day of the month that employees are paid. This field is the second pay date for pay schedules with the "Twice per month" frequency. For semi-monthly pay schedules, this field should be set to 31. For months shorter than 31 days, we will set the second pay date to the last day of the month. It will be null for pay schedules with other frequencies. | | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | This field will be hourly when the pay schedule is for hourly employees, salaried when the pay schedule is for salaried employees, the department name if pay schedule is by department, and null when the pay schedule is for all employees. | | +| `custom_name` | *Optional[str]* | :heavy_minus_sign: | A custom name for a pay schedule, defaults to the pay frequency description. | | +| `auto_pilot` | *Optional[bool]* | :heavy_minus_sign: | With Autopilot® enabled, payroll will run automatically one day before your payroll deadlines. | | +| `active` | *Optional[bool]* | :heavy_minus_sign: | Whether this pay schedule is associated with any employees. A pay schedule is inactive when it's unassigned. | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md b/gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md new file mode 100644 index 00000000..7faf7695 --- /dev/null +++ b/gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md @@ -0,0 +1,13 @@ +# PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation + +The breakdown of the report. Use 'default' for no split. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `DEFAULT` | default | +| `JOB` | job | +| `DEPARTMENT` | department | +| `INTEGRATION` | integration | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md b/gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md new file mode 100644 index 00000000..b66d3574 --- /dev/null +++ b/gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md @@ -0,0 +1,11 @@ +# PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType + +The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'. + + +## Values + +| Name | Value | +| ------ | ------ | +| `XERO` | xero | +| `QBO` | qbo | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md b/gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequest.md similarity index 91% rename from gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md rename to gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequest.md index 76b7a8d3..84e3cb3a 100644 --- a/gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md +++ b/gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequest.md @@ -1,10 +1,10 @@ -# PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest +# PostPayrollsPayrollUUIDReportsGeneralLedgerRequest ## Fields | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `payroll_uuid` | *str* | :heavy_check_mark: | The UUID of the payroll | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `request_body` | [models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody](../models/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `request_body` | [models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody](../models/postpayrollspayrolluuidreportsgeneralledgerrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequestbody.md b/gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequestbody.md new file mode 100644 index 00000000..4685f5ef --- /dev/null +++ b/gusto_app_int/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequestbody.md @@ -0,0 +1,9 @@ +# PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `aggregation` | [models.PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation](../models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md) | :heavy_check_mark: | The breakdown of the report. Use 'default' for no split. | +| `integration_type` | [OptionalNullable[models.PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType]](../models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md) | :heavy_minus_sign: | The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1employeesemployeeidemployeebenefitsvalue2.md b/gusto_app_int/docs/models/postv1employeesemployeeidemployeebenefitsvalue2.md index adaff992..eeaa8dfe 100644 --- a/gusto_app_int/docs/models/postv1employeesemployeeidemployeebenefitsvalue2.md +++ b/gusto_app_int/docs/models/postv1employeesemployeeidemployeebenefitsvalue2.md @@ -5,7 +5,7 @@ A single tier of a tiered matching scheme. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | -| `threshold` | *Optional[str]* | :heavy_minus_sign: | The percentage threshold at which this tier ends (inclusive).

For example, a value of "5" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll.

If this is the first tier, a value of "5" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | +| `threshold` | *Optional[str]* | :heavy_minus_sign: | Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to.

Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards.

For example:

If the first tier has a threshold of "3", and rate of "100", the company will match 100% of employee contributions from 0% up to and including 3% of payroll.

If the next tier has a threshold of "5" and a rate of "50", the company will match 50% of contributions from above 3% up to and including 5% of payroll. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md b/gusto_app_int/docs/models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md new file mode 100644 index 00000000..bd7c5eed --- /dev/null +++ b/gusto_app_int/docs/models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1employeesemployeeidhomeaddressesrequest.md b/gusto_app_int/docs/models/postv1employeesemployeeidhomeaddressesrequest.md index 8d204900..ac3e4b62 100644 --- a/gusto_app_int/docs/models/postv1employeesemployeeidhomeaddressesrequest.md +++ b/gusto_app_int/docs/models/postv1employeesemployeeidhomeaddressesrequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion]](../models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PostV1EmployeesEmployeeIDHomeAddressesRequestBody](../models/postv1employeesemployeeidhomeaddressesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1employeesemployeeidhomeaddressesrequestbody.md b/gusto_app_int/docs/models/postv1employeesemployeeidhomeaddressesrequestbody.md index 7097ca9a..1adffefe 100644 --- a/gusto_app_int/docs/models/postv1employeesemployeeidhomeaddressesrequestbody.md +++ b/gusto_app_int/docs/models/postv1employeesemployeeidhomeaddressesrequestbody.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | 300 3rd Street | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | San Francisco | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | CA | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | 94107 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | 2022-01-31 | +| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md b/gusto_app_int/docs/models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md new file mode 100644 index 00000000..21ad54ad --- /dev/null +++ b/gusto_app_int/docs/models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1employeesemployeeidworkaddressesrequest.md b/gusto_app_int/docs/models/postv1employeesemployeeidworkaddressesrequest.md index 5bf0b4d9..e7464da0 100644 --- a/gusto_app_int/docs/models/postv1employeesemployeeidworkaddressesrequest.md +++ b/gusto_app_int/docs/models/postv1employeesemployeeidworkaddressesrequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion]](../models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PostV1EmployeesEmployeeIDWorkAddressesRequestBody](../models/postv1employeesemployeeidworkaddressesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1employeesemployeeidworkaddressesrequestbody.md b/gusto_app_int/docs/models/postv1employeesemployeeidworkaddressesrequestbody.md index 82ceb283..39b2b771 100644 --- a/gusto_app_int/docs/models/postv1employeesemployeeidworkaddressesrequestbody.md +++ b/gusto_app_int/docs/models/postv1employeesemployeeidworkaddressesrequestbody.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date the employee began working at the company location | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | 6a119be7-b4b0-4e27-aaa0-89d5f2524635 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date the employee began working at the company location | 2023-05-15 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1employeesrequestbody.md b/gusto_app_int/docs/models/postv1employeesrequestbody.md index 263ed396..67485b20 100644 --- a/gusto_app_int/docs/models/postv1employeesrequestbody.md +++ b/gusto_app_int/docs/models/postv1employeesrequestbody.md @@ -9,6 +9,7 @@ | `middle_initial` | *Optional[str]* | :heavy_minus_sign: | N/A | | `last_name` | *str* | :heavy_check_mark: | N/A | | `email` | *Optional[str]* | :heavy_minus_sign: | The employee's personal email address. | +| `work_email` | *Optional[str]* | :heavy_minus_sign: | The employee's work email address. | | `date_of_birth` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | | `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | | `preferred_first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | diff --git a/gusto_app_int/docs/models/processingstatuses.md b/gusto_app_int/docs/models/processingstatuses.md index 9363c1c4..ae4a9f0f 100644 --- a/gusto_app_int/docs/models/processingstatuses.md +++ b/gusto_app_int/docs/models/processingstatuses.md @@ -5,5 +5,5 @@ | Name | Value | | ------------- | ------------- | -| `UNPROCESSED` | unprocessed | -| `PROCESSED` | processed | \ No newline at end of file +| `PROCESSED` | processed | +| `UNPROCESSED` | unprocessed | \ No newline at end of file diff --git a/gusto_app_int/docs/models/puttimetrackingtimesheetstimesheetuuidrequestbody.md b/gusto_app_int/docs/models/puttimetrackingtimesheetstimesheetuuidrequestbody.md index 609811ce..ec13c677 100644 --- a/gusto_app_int/docs/models/puttimetrackingtimesheetstimesheetuuidrequestbody.md +++ b/gusto_app_int/docs/models/puttimetrackingtimesheetstimesheetuuidrequestbody.md @@ -3,14 +3,14 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `entity_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the entity associated with the time sheet. | -| `entity_type` | *Optional[str]* | :heavy_minus_sign: | Type of entity associated with the time sheet. | -| `job_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the job for which time was tracked. Currently is only supported for employees. | -| `time_zone` | *Optional[str]* | :heavy_minus_sign: | Time zone of where the time was tracked. | -| `shift_started_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The start time of the shift. Timestamp should be in ISO8601 | -| `shift_ended_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The end time of the shift. If the shift is still ongoing this will be null. | -| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata associated with the time sheet. Key-value pairs of arbitrary data. Both keys and values must be strings. | -| `entries` | List[[models.PutTimeTrackingTimeSheetsTimeSheetUUIDEntries](../models/puttimetrackingtimesheetstimesheetuuidentries.md)] | :heavy_minus_sign: | Entries associated with the time sheet. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `entity_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the entity associated with the time sheet. | | +| `entity_type` | *Optional[str]* | :heavy_minus_sign: | Type of entity associated with the time sheet. | | +| `job_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the job for which time was tracked. Currently is only supported for employees. | | +| `time_zone` | *Optional[str]* | :heavy_minus_sign: | Time zone of where the time was tracked. | | +| `shift_started_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The start time of the shift. Timestamp should be in ISO8601 | | +| `shift_ended_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The end time of the shift. If the shift is still ongoing this will be null. | | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata associated with the time sheet. Key-value pairs of arbitrary data. Both keys and values must be strings. | | +| `entries` | List[[models.PutTimeTrackingTimeSheetsTimeSheetUUIDEntries](../models/puttimetrackingtimesheetstimesheetuuidentries.md)] | :heavy_minus_sign: | Entries associated with the time sheet. | | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md b/gusto_app_int/docs/models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md new file mode 100644 index 00000000..8586ec45 --- /dev/null +++ b/gusto_app_int/docs/models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequest.md b/gusto_app_int/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequest.md index 601ba90d..4388cc72 100644 --- a/gusto_app_int/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequest.md +++ b/gusto_app_int/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequest.md @@ -7,4 +7,8 @@ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `sort_by` | [Optional[models.PayrollPrepareSortBy]](../models/payrollpreparesortby.md) | :heavy_minus_sign: | Sort employee compenstations by name. Options: first_name, last_name | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `request_body` | [Optional[models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody]](../models/putv1companiescompanyidpayrollspayrollidpreparerequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequestbody.md b/gusto_app_int/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequestbody.md new file mode 100644 index 00000000..8c19c85e --- /dev/null +++ b/gusto_app_int/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequestbody.md @@ -0,0 +1,8 @@ +# PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `employee_uuids` | List[*str*] | :heavy_minus_sign: | An array of employee UUIDs. If passed, only those employees payroll items will be prepared. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1companiescompanyidpayrollsrequest.md b/gusto_app_int/docs/models/putv1companiescompanyidpayrollsrequest.md index 0007d44b..27519a91 100644 --- a/gusto_app_int/docs/models/putv1companiescompanyidpayrollsrequest.md +++ b/gusto_app_int/docs/models/putv1companiescompanyidpayrollsrequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `request_body` | [models.PutV1CompaniesCompanyIDPayrollsRequestBody](../models/putv1companiescompanyidpayrollsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `payroll_update` | [models.PayrollUpdate](../models/payrollupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md b/gusto_app_int/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md new file mode 100644 index 00000000..f0d803e0 --- /dev/null +++ b/gusto_app_int/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md @@ -0,0 +1,10 @@ +# PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_benefit_id` | *str* | :heavy_check_mark: | The UUID of the company benefit | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `request_body` | [models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody](../models/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md b/gusto_app_int/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md new file mode 100644 index 00000000..dc6dbb22 --- /dev/null +++ b/gusto_app_int/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md @@ -0,0 +1,8 @@ +# PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `contribution_exclusions` | List[[models.ContributionExclusion](../models/contributionexclusion.md)] | :heavy_check_mark: | The list of contribution exclusions to update | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1contractorscontractoruuidrequestbody.md b/gusto_app_int/docs/models/putv1contractorscontractoruuidrequestbody.md index 03bb755d..2583504e 100644 --- a/gusto_app_int/docs/models/putv1contractorscontractoruuidrequestbody.md +++ b/gusto_app_int/docs/models/putv1contractorscontractoruuidrequestbody.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | | `type` | [Optional[models.PutV1ContractorsContractorUUIDType]](../models/putv1contractorscontractoruuidtype.md) | :heavy_minus_sign: | The contractor type. | | | `wage_type` | [Optional[models.PutV1ContractorsContractorUUIDWageType]](../models/putv1contractorscontractoruuidwagetype.md) | :heavy_minus_sign: | The contractor’s wage type.
| | | `start_date` | *Optional[str]* | :heavy_minus_sign: | The day when the contractor will start working for the company.
| 2020-01-11 | diff --git a/gusto_app_int/docs/models/putv1employeebenefitsemployeebenefitidvalue2.md b/gusto_app_int/docs/models/putv1employeebenefitsemployeebenefitidvalue2.md index bdc0c650..ef9bac0b 100644 --- a/gusto_app_int/docs/models/putv1employeebenefitsemployeebenefitidvalue2.md +++ b/gusto_app_int/docs/models/putv1employeebenefitsemployeebenefitidvalue2.md @@ -5,7 +5,7 @@ A single tier of a tiered matching scheme. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | -| `threshold` | *Optional[str]* | :heavy_minus_sign: | The percentage threshold at which this tier ends (inclusive).

For example, a value of "5" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll.

If this is the first tier, a value of "5" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | +| `threshold` | *Optional[str]* | :heavy_minus_sign: | Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to.

Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards.

For example:

If the first tier has a threshold of "3", and rate of "100", the company will match 100% of employee contributions from 0% up to and including 3% of payroll.

If the next tier has a threshold of "5" and a rate of "50", the company will match 50% of contributions from above 3% up to and including 5% of payroll. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1employeesemployeeidrehirerequestbody.md b/gusto_app_int/docs/models/putv1employeesemployeeidrehirerequestbody.md index 88ee8a60..777bb82d 100644 --- a/gusto_app_int/docs/models/putv1employeesemployeeidrehirerequestbody.md +++ b/gusto_app_int/docs/models/putv1employeesemployeeidrehirerequestbody.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `effective_date` | *str* | :heavy_check_mark: | The day when the employee returns to work. | -| `file_new_hire_report` | *bool* | :heavy_check_mark: | The boolean flag indicating whether Gusto will file a new hire report for the employee. | -| `work_location_uuid` | *str* | :heavy_check_mark: | The uuid of the employee's work location. | -| `employment_status` | [Optional[models.PutV1EmployeesEmployeeIDRehireEmploymentStatus]](../models/putv1employeesemployeeidrehireemploymentstatus.md) | :heavy_minus_sign: | The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. | -| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `effective_date` | *str* | :heavy_check_mark: | The day when the employee returns to work. | | +| `file_new_hire_report` | *bool* | :heavy_check_mark: | The boolean flag indicating whether Gusto will file a new hire report for the employee. | | +| `work_location_uuid` | *str* | :heavy_check_mark: | The uuid of the employee's work location. | | +| `employment_status` | [Optional[models.PutV1EmployeesEmployeeIDRehireEmploymentStatus]](../models/putv1employeesemployeeidrehireemploymentstatus.md) | :heavy_minus_sign: | The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. | | +| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1employeesheaderxgustoapiversion.md b/gusto_app_int/docs/models/putv1employeesheaderxgustoapiversion.md new file mode 100644 index 00000000..63293c04 --- /dev/null +++ b/gusto_app_int/docs/models/putv1employeesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1EmployeesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1employeesrequest.md b/gusto_app_int/docs/models/putv1employeesrequest.md index cc8eea80..9bbc71f7 100644 --- a/gusto_app_int/docs/models/putv1employeesrequest.md +++ b/gusto_app_int/docs/models/putv1employeesrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `x_gusto_api_version` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `request_body` | [models.PutV1EmployeesRequestBody](../models/putv1employeesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PutV1EmployeesHeaderXGustoAPIVersion]](../models/putv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `request_body` | [models.PutV1EmployeesRequestBody](../models/putv1employeesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1employeesrequestbody.md b/gusto_app_int/docs/models/putv1employeesrequestbody.md index af25bb23..a0cc6631 100644 --- a/gusto_app_int/docs/models/putv1employeesrequestbody.md +++ b/gusto_app_int/docs/models/putv1employeesrequestbody.md @@ -3,14 +3,15 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `last_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `email` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `date_of_birth` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | Weezy | +| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | F | +| `last_name` | *Optional[str]* | :heavy_minus_sign: | N/A | Baby | +| `email` | *Optional[str]* | :heavy_minus_sign: | N/A | tunechi@cashmoneyrecords.com | +| `work_email` | *Optional[str]* | :heavy_minus_sign: | N/A | new.partner.work@example.com | +| `date_of_birth` | *Optional[str]* | :heavy_minus_sign: | N/A | 1991-01-31 | +| `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | 824920233 | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md b/gusto_app_int/docs/models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..7b88ddec --- /dev/null +++ b/gusto_app_int/docs/models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1homeaddresseshomeaddressuuidrequest.md b/gusto_app_int/docs/models/putv1homeaddresseshomeaddressuuidrequest.md index 038b110d..6cfadabb 100644 --- a/gusto_app_int/docs/models/putv1homeaddresseshomeaddressuuidrequest.md +++ b/gusto_app_int/docs/models/putv1homeaddresseshomeaddressuuidrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PutV1HomeAddressesHomeAddressUUIDRequestBody](../models/putv1homeaddresseshomeaddressuuidrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1homeaddresseshomeaddressuuidrequestbody.md b/gusto_app_int/docs/models/putv1homeaddresseshomeaddressuuidrequestbody.md index c728a4de..0031f588 100644 --- a/gusto_app_int/docs/models/putv1homeaddresseshomeaddressuuidrequestbody.md +++ b/gusto_app_int/docs/models/putv1homeaddresseshomeaddressuuidrequestbody.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | | +| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1locationslocationidrequestbody.md b/gusto_app_int/docs/models/putv1locationslocationidrequestbody.md index d126005a..a0f7f0c1 100644 --- a/gusto_app_int/docs/models/putv1locationslocationidrequestbody.md +++ b/gusto_app_int/docs/models/putv1locationslocationidrequestbody.md @@ -3,15 +3,15 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `phone_number` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `country` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mailing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's mailing address. A company has a single mailing address, so this designation will override any previous selection. | -| `filing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's filing address. A company has a single filing address, so this designation will override any previous selection. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `phone_number` | *Optional[str]* | :heavy_minus_sign: | N/A | 8009360383 | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | 300 3rd Street | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | Apartment 318 | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | San Francisco | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | 94107 | +| `country` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `mailing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's mailing address. A company has a single mailing address, so this designation will override any previous selection. | | +| `filing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's filing address. A company has a single filing address, so this designation will override any previous selection. | | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1terminationsemployeeidrequestbody.md b/gusto_app_int/docs/models/putv1terminationsemployeeidrequestbody.md index 08eeedeb..c52b27b5 100644 --- a/gusto_app_int/docs/models/putv1terminationsemployeeidrequestbody.md +++ b/gusto_app_int/docs/models/putv1terminationsemployeeidrequestbody.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `effective_date` | *str* | :heavy_check_mark: | The employee's last day of work. | -| `run_termination_payroll` | *Optional[bool]* | :heavy_minus_sign: | If true, the employee should receive their final wages via an off-cycle payroll. If false, they should receive their final wages on their current pay schedule. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `effective_date` | *str* | :heavy_check_mark: | The employee's last day of work. | | +| `run_termination_payroll` | *Optional[bool]* | :heavy_minus_sign: | If true, the employee should receive their final wages via an off-cycle payroll. If false, they should receive their final wages on their current pay schedule. | | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md b/gusto_app_int/docs/models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..0b000fe8 --- /dev/null +++ b/gusto_app_int/docs/models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1workaddressesworkaddressuuidrequest.md b/gusto_app_int/docs/models/putv1workaddressesworkaddressuuidrequest.md index 1a69d9c2..e25a4a88 100644 --- a/gusto_app_int/docs/models/putv1workaddressesworkaddressuuidrequest.md +++ b/gusto_app_int/docs/models/putv1workaddressesworkaddressuuidrequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PutV1WorkAddressesWorkAddressUUIDRequestBody](../models/putv1workaddressesworkaddressuuidrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1workaddressesworkaddressuuidrequestbody.md b/gusto_app_int/docs/models/putv1workaddressesworkaddressuuidrequestbody.md index 27bb04d5..4a46901c 100644 --- a/gusto_app_int/docs/models/putv1workaddressesworkaddressuuidrequestbody.md +++ b/gusto_app_int/docs/models/putv1workaddressesworkaddressuuidrequestbody.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | 6a119be7-b4b0-4e27-aaa0-89d5f2524635 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | 2023-05-15 | \ No newline at end of file diff --git a/gusto_app_int/docs/models/queryparaminclude.md b/gusto_app_int/docs/models/queryparaminclude.md index 08b8feec..433bf334 100644 --- a/gusto_app_int/docs/models/queryparaminclude.md +++ b/gusto_app_int/docs/models/queryparaminclude.md @@ -3,8 +3,11 @@ ## Values -| Name | Value | -| ------------------- | ------------------- | -| `CUSTOM_FIELDS` | custom_fields | -| `ALL_COMPENSATIONS` | all_compensations | -| `COMPANY_NAME` | company_name | \ No newline at end of file +| Name | Value | +| ---------------------- | ---------------------- | +| `ALL_COMPENSATIONS` | all_compensations | +| `ALL_HOME_ADDRESSES` | all_home_addresses | +| `COMPANY_NAME` | company_name | +| `CURRENT_HOME_ADDRESS` | current_home_address | +| `CUSTOM_FIELDS` | custom_fields | +| `PORTAL_INVITATIONS` | portal_invitations | \ No newline at end of file diff --git a/gusto_app_int/docs/models/queryparamsortorder.md b/gusto_app_int/docs/models/queryparamsortorder.md new file mode 100644 index 00000000..ecf66e69 --- /dev/null +++ b/gusto_app_int/docs/models/queryparamsortorder.md @@ -0,0 +1,11 @@ +# QueryParamSortOrder + +A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. + + +## Values + +| Name | Value | +| ------ | ------ | +| `ASC` | asc | +| `DESC` | desc | \ No newline at end of file diff --git a/gusto_app_int/docs/models/queryparamstatus.md b/gusto_app_int/docs/models/queryparamstatus.md new file mode 100644 index 00000000..28dacaa5 --- /dev/null +++ b/gusto_app_int/docs/models/queryparamstatus.md @@ -0,0 +1,10 @@ +# QueryParamStatus + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `OPEN` | open | +| `EXPIRED` | expired | +| `RESOLVED` | resolved | \ No newline at end of file diff --git a/gusto_app_int/docs/models/reimbursements.md b/gusto_app_int/docs/models/reimbursements.md new file mode 100644 index 00000000..54a4689b --- /dev/null +++ b/gusto_app_int/docs/models/reimbursements.md @@ -0,0 +1,11 @@ +# Reimbursements + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `amount` | *str* | :heavy_check_mark: | The dollar amount of the reimbursement for the pay period. | +| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the reimbursement. Null for unnamed reimbursements. | +| `uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls. | +| `recurring` | *Optional[bool]* | :heavy_minus_sign: | Whether the reimbursement is recurring. This field is only available for unprocessed payrolls. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/report.md b/gusto_app_int/docs/models/report.md new file mode 100644 index 00000000..bea0b238 --- /dev/null +++ b/gusto_app_int/docs/models/report.md @@ -0,0 +1,12 @@ +# Report + +Example response + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `request_uuid` | *Optional[str]* | :heavy_minus_sign: | A unique identifier of the report request | +| `status` | *Optional[str]* | :heavy_minus_sign: | Current status of the report, possible values are 'succeeded', 'pending', or 'failed' | +| `report_urls` | List[*str*] | :heavy_minus_sign: | The array of urls to access the report | \ No newline at end of file diff --git a/gusto_app_int/docs/models/requesttype.md b/gusto_app_int/docs/models/requesttype.md new file mode 100644 index 00000000..b5368e04 --- /dev/null +++ b/gusto_app_int/docs/models/requesttype.md @@ -0,0 +1,11 @@ +# RequestType + +The type of time off request. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `VACATION` | vacation | +| `SICK` | sick | \ No newline at end of file diff --git a/gusto_app_int/docs/models/resources.md b/gusto_app_int/docs/models/resources.md new file mode 100644 index 00000000..3e2c2c3d --- /dev/null +++ b/gusto_app_int/docs/models/resources.md @@ -0,0 +1,11 @@ +# Resources + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `entity_type` | [models.NotificationEntityType](../models/notificationentitytype.md) | :heavy_check_mark: | The type of entity being described. | +| `entity_uuid` | *str* | :heavy_check_mark: | Unique identifier of the entity | +| `reference_type` | *Optional[str]* | :heavy_minus_sign: | Optional. The type of a resource that is related to the one described by entity_type and entity_uuid. For instance, if the entity_type is “BankAccount”, the reference_type could be the “Employee” or “Contractor” to whom the bank account belongs. | +| `reference_uuid` | *Optional[str]* | :heavy_minus_sign: | Optional. Unique identifier of the reference. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/showemployees.md b/gusto_app_int/docs/models/showemployees.md new file mode 100644 index 00000000..1c5e39a4 --- /dev/null +++ b/gusto_app_int/docs/models/showemployees.md @@ -0,0 +1,47 @@ +# ShowEmployees + +The representation of an employee in Gusto. + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the employee in Gusto. | | +| `first_name` | *str* | :heavy_check_mark: | N/A | | +| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `last_name` | *str* | :heavy_check_mark: | N/A | | +| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | The personal email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | | +| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company the employee is employed by. | | +| `manager_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the employee's manager. | | +| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the employee. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | | +| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee's department in the company. | | +| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is terminated. | | +| `two_percent_shareholder` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | +| `work_email` | *OptionalNullable[str]* | :heavy_minus_sign: | The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | | +| `onboarded` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee has completed onboarding. | | +| `onboarding_status` | [OptionalNullable[models.OnboardingStatus]](../models/onboardingstatus.md) | :heavy_minus_sign: | The current onboarding status of the employee | | +| `onboarding_documents_config` | [Optional[models.OnboardingDocumentsConfig]](../models/onboardingdocumentsconfig.md) | :heavy_minus_sign: | Configuration for an employee onboarding documents during onboarding | | +| `jobs` | List[[models.Job](../models/job.md)] | :heavy_minus_sign: | N/A | | +| `eligible_paid_time_off` | List[[models.PaidTimeOff](../models/paidtimeoff.md)] | :heavy_minus_sign: | N/A | | +| `terminations` | List[[models.Termination](../models/termination.md)] | :heavy_minus_sign: | N/A | | +| `garnishments` | List[[models.Garnishment](../models/garnishment.md)] | :heavy_minus_sign: | N/A | | +| `custom_fields` | List[[models.EmployeeCustomField](../models/employeecustomfield.md)] | :heavy_minus_sign: | Custom fields are only included for the employee if the include param has the custom_fields value set | | +| `date_of_birth` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `has_ssn` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the employee has an SSN in Gusto. | | +| `ssn` | *Optional[str]* | :heavy_minus_sign: | Deprecated. This field always returns an empty string. | | +| `phone` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `payment_method` | [Optional[models.PaymentMethod]](../models/paymentmethod.md) | :heavy_minus_sign: | The employee's payment method | | +| `current_employment_status` | [OptionalNullable[models.CurrentEmploymentStatus]](../models/currentemploymentstatus.md) | :heavy_minus_sign: | The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less. | | +| `historical` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `employee_code` | *Optional[str]* | :heavy_minus_sign: | The short format code of the employee | | +| `department_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the department the employee is under | | +| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `hired_at` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date when the employee was hired to the company | | +| `hidden_ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `flsa_status` | [Optional[models.FlsaStatusType]](../models/flsastatustype.md) | :heavy_minus_sign: | The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company. | | +| `applicable_tax_ids` | List[*float*] | :heavy_minus_sign: | N/A | | +| `current_home_address` | [Optional[models.EmployeeHomeAddress]](../models/employeehomeaddress.md) | :heavy_minus_sign: | N/A | {
"street_1": "412 Kiera Stravenue",
"street_2": "Suite 391",
"city": "San Francisco",
"state": "CA",
"zip": "94107",
"country": "USA",
"active": true,
"uiud": "sample-uuid-123231"
} | +| `all_home_addresses` | List[[models.EmployeeHomeAddress](../models/employeehomeaddress.md)] | :heavy_minus_sign: | N/A | | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/gusto_app_int/docs/models/sortby.md b/gusto_app_int/docs/models/sortby.md new file mode 100644 index 00000000..2bee5703 --- /dev/null +++ b/gusto_app_int/docs/models/sortby.md @@ -0,0 +1,11 @@ +# SortBy + +Field to sort employee compensations by + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `FIRST_NAME` | first_name | +| `LAST_NAME` | last_name | \ No newline at end of file diff --git a/gusto_app_int/docs/models/splitby.md b/gusto_app_int/docs/models/splitby.md new file mode 100644 index 00000000..4e139518 --- /dev/null +++ b/gusto_app_int/docs/models/splitby.md @@ -0,0 +1,11 @@ +# SplitBy + +Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `AMOUNT` | Amount | +| `PERCENTAGE` | Percentage | \ No newline at end of file diff --git a/gusto_app_int/docs/models/splits.md b/gusto_app_int/docs/models/splits.md new file mode 100644 index 00000000..643775dc --- /dev/null +++ b/gusto_app_int/docs/models/splits.md @@ -0,0 +1,15 @@ +# Splits + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `bank_account_uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `hidden_account_number` | *Optional[str]* | :heavy_minus_sign: | An obfuscated version of the account number which can be used for display purposes. | +| `encrypted_account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Ciphertext containing the full bank account number, which must be decrypted using a key provided by Gusto. Only visible with the `contractor_payment_methods:read:account_number` scope. | +| `routing_number` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `priority` | *Optional[int]* | :heavy_minus_sign: | The order of priority for each payment split, with priority 1 being the first bank account paid. Priority must be unique and sequential. | +| `split_amount` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `account_type` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/supportedbenefit.md b/gusto_app_int/docs/models/supportedbenefit.md index 53d1f7bc..8b0d7925 100644 --- a/gusto_app_int/docs/models/supportedbenefit.md +++ b/gusto_app_int/docs/models/supportedbenefit.md @@ -16,4 +16,5 @@ Example response | `healthcare` | *Optional[bool]* | :heavy_minus_sign: | Whether the benefit is healthcare related. | | `retirement` | *Optional[bool]* | :heavy_minus_sign: | Whether the benefit is associated with retirement planning. | | `yearly_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether the benefit has a government mandated yearly limit. If the benefit has a government mandated yearly limit, employees cannot be added to more than one benefit of this type. | -| `category` | *Optional[str]* | :heavy_minus_sign: | Category where the benefit belongs to. | \ No newline at end of file +| `category` | *Optional[str]* | :heavy_minus_sign: | Category where the benefit belongs to. | +| `writable_by_application` | *Optional[bool]* | :heavy_minus_sign: | Whether this benefit can be written (created, updated, or destroyed). Returns true if the benefit type is permitted for the application, false otherwise. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/tiers.md b/gusto_app_int/docs/models/tiers.md index 3575eb76..17ea953c 100644 --- a/gusto_app_int/docs/models/tiers.md +++ b/gusto_app_int/docs/models/tiers.md @@ -5,8 +5,8 @@ A single tier of a tiered matching scheme. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | -| `threshold` | *Optional[str]* | :heavy_minus_sign: | The percentage threshold at which this tier ends (inclusive).

For example, a value of "5" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll.

If this is the first tier, a value of "5" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. | -| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | +| `threshold` | *Optional[str]* | :heavy_minus_sign: | Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to.

Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards.

For example:

If the first tier has a threshold of "3", and `rate` of "100", the company will match 100% of employee contributions from 0% up to and including 3% of payroll.

If the next tier has a threshold of "5" and a rate of "50", the company will match 50% of contributions from above 3% up to and including 5% of payroll. | +| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentgroupminimal.md b/gusto_app_int/docs/models/timeoffrequest.md similarity index 59% rename from gusto_embedded/docs/models/contractorpaymentgroupminimal.md rename to gusto_app_int/docs/models/timeoffrequest.md index 3481b02d..5f621639 100644 --- a/gusto_embedded/docs/models/contractorpaymentgroupminimal.md +++ b/gusto_app_int/docs/models/timeoffrequest.md @@ -1,16 +1,18 @@ -# ContractorPaymentGroupMinimal +# TimeOffRequest -The summary of a contractor payment group. +The representation of a time off request. ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *Optional[str]* | :heavy_minus_sign: | The unique identifier of the contractor payment group. | -| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company. | -| `check_date` | *Optional[str]* | :heavy_minus_sign: | The check date of the contractor payment group. | -| `debit_date` | *Optional[str]* | :heavy_minus_sign: | The debit date of the contractor payment group. | -| `status` | [Optional[models.ContractorPaymentGroupMinimalStatus]](../models/contractorpaymentgroupminimalstatus.md) | :heavy_minus_sign: | The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. | -| `creation_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token. | -| `totals` | [Optional[models.ContractorPaymentGroupMinimalTotals]](../models/contractorpaymentgroupminimaltotals.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the time off request. | +| `status` | [Optional[models.TimeOffRequestStatus]](../models/timeoffrequeststatus.md) | :heavy_minus_sign: | The status of the time off request. | +| `employee_note` | *Optional[str]* | :heavy_minus_sign: | A note about the time off request, from the employee to the employer. | +| `employer_note` | *Optional[str]* | :heavy_minus_sign: | A note about the time off request, from the employer to the employee. | +| `request_type` | [Optional[models.RequestType]](../models/requesttype.md) | :heavy_minus_sign: | The type of time off request. | +| `days` | [Optional[models.Days]](../models/days.md) | :heavy_minus_sign: | An object that represents the days in the time off request. The keys of the object are the dates, formatted as a YYYY-MM-DD string. The values of the object are the number of hours requested off for each day, formatted as a string representation of a numeric decimal to the thousands place. | +| `employee` | [Optional[models.TimeOffRequestEmployee]](../models/timeoffrequestemployee.md) | :heavy_minus_sign: | N/A | +| `initiator` | [OptionalNullable[models.Initiator]](../models/initiator.md) | :heavy_minus_sign: | N/A | +| `approver` | [OptionalNullable[models.Approver]](../models/approver.md) | :heavy_minus_sign: | This value will be null if the request has not been approved. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/timeoffrequestemployee.md b/gusto_app_int/docs/models/timeoffrequestemployee.md new file mode 100644 index 00000000..70b33893 --- /dev/null +++ b/gusto_app_int/docs/models/timeoffrequestemployee.md @@ -0,0 +1,9 @@ +# TimeOffRequestEmployee + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee the time off request is for. | +| `full_name` | *Optional[str]* | :heavy_minus_sign: | The full name of the employee the time off request is for. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/timeoffrequeststatus.md b/gusto_app_int/docs/models/timeoffrequeststatus.md new file mode 100644 index 00000000..15c23d91 --- /dev/null +++ b/gusto_app_int/docs/models/timeoffrequeststatus.md @@ -0,0 +1,12 @@ +# TimeOffRequestStatus + +The status of the time off request. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PENDING` | pending | +| `APPROVED` | approved | +| `DENIED` | denied | \ No newline at end of file diff --git a/gusto_app_int/docs/models/valuetiers.md b/gusto_app_int/docs/models/valuetiers.md index 7d60efc0..832a34ce 100644 --- a/gusto_app_int/docs/models/valuetiers.md +++ b/gusto_app_int/docs/models/valuetiers.md @@ -5,8 +5,8 @@ A single tier of a tiered matching scheme. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | -| `threshold` | *Optional[str]* | :heavy_minus_sign: | The percentage threshold at which this tier ends (inclusive).

For example, a value of "5" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll.

If this is the first tier, a value of "5" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. | -| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | +| `threshold` | *Optional[str]* | :heavy_minus_sign: | Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to.

Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards.

For example:

If the first tier has a threshold of "3", and `rate` of "100", the company will match 100% of employee contributions from 0% up to and including 3% of payroll.

If the next tier has a threshold of "5" and a rate of "50", the company will match 50% of contributions from above 3% up to and including 5% of payroll. | +| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/webhookshealthcheckstatus.md b/gusto_app_int/docs/models/webhookshealthcheckstatus.md new file mode 100644 index 00000000..0fa9746d --- /dev/null +++ b/gusto_app_int/docs/models/webhookshealthcheckstatus.md @@ -0,0 +1,11 @@ +# WebhooksHealthCheckStatus + +The representation of a webhooks health check response + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `status` | [Optional[models.WebhooksHealthCheckStatusStatus]](../models/webhookshealthcheckstatusstatus.md) | :heavy_minus_sign: | Latest health status of the webhooks system | +| `last_checked_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO8601 timestamp of the last successful health check with millisecond precision | \ No newline at end of file diff --git a/gusto_app_int/docs/models/webhookshealthcheckstatusstatus.md b/gusto_app_int/docs/models/webhookshealthcheckstatusstatus.md new file mode 100644 index 00000000..8f67d90b --- /dev/null +++ b/gusto_app_int/docs/models/webhookshealthcheckstatusstatus.md @@ -0,0 +1,12 @@ +# WebhooksHealthCheckStatusStatus + +Latest health status of the webhooks system + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `HEALTHY` | healthy | +| `UNHEALTHY` | unhealthy | +| `UNKNOWN` | unknown | \ No newline at end of file diff --git a/gusto_app_int/docs/sdks/companies/README.md b/gusto_app_int/docs/sdks/companies/README.md index 1a712059..f126fb9c 100644 --- a/gusto_app_int/docs/sdks/companies/README.md +++ b/gusto_app_int/docs/sdks/companies/README.md @@ -29,6 +29,7 @@ scope: `accounts:write` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -70,7 +71,7 @@ with GustoAppIntegration() as gai_client: "phone": "2345678901", }, ], - }) + }, x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -109,7 +110,9 @@ scope: `companies:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -117,7 +120,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.companies.get(company_id="") + res = gai_client.companies.get(company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -150,7 +153,9 @@ scope: `companies:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -158,7 +163,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.companies.update(company_id="", contractor_only=False) + res = gai_client.companies.update(company_id="", contractor_only=False, x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -193,7 +198,9 @@ scope: `company_admin:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -201,7 +208,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.companies.get_admins(company_id="") + res = gai_client.companies.get_admins(company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -236,7 +243,9 @@ scope: `companies:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -244,7 +253,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.companies.get_custom_fields(company_id="") + res = gai_client.companies.get_custom_fields(company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/companybenefits/README.md b/gusto_app_int/docs/sdks/companybenefits/README.md index 4a1f5484..39a3ce4c 100644 --- a/gusto_app_int/docs/sdks/companybenefits/README.md +++ b/gusto_app_int/docs/sdks/companybenefits/README.md @@ -16,6 +16,8 @@ * [get_employee_benefits](#get_employee_benefits) - Get all employee benefits for a company benefit * [bulk_update_employee_benefits](#bulk_update_employee_benefits) - Bulk update employee benefits for a company benefit * [get_requirements](#get_requirements) - Get benefit fields requirements by ID +* [get_v1_company_benefits_company_benefit_id_contribution_exclusions](#get_v1_company_benefits_company_benefit_id_contribution_exclusions) - Get contribution exclusions for a company benefit +* [put_v1_company_benefits_company_benefit_id_contribution_exclusions](#put_v1_company_benefits_company_benefit_id_contribution_exclusions) - Update contribution exclusions for a company benefit ## create @@ -23,11 +25,15 @@ Company benefits represent the benefits that a company is offering to employees. Note that company benefits can be deactivated only when no employees are enrolled. +When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only create company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -35,7 +41,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.company_benefits.create(company_id="", description="yuck vice between gee ugh ha") + res = gai_client.company_benefits.create(company_id="", description="hm pfft surge beyond", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, active=True) # Handle response print(res) @@ -78,7 +84,9 @@ scope: `company_benefits:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -86,7 +94,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.company_benefits.list(company_id="") + res = gai_client.company_benefits.list(company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -125,7 +133,9 @@ scope: `company_benefits:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -133,7 +143,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.company_benefits.get_by_id(company_benefit_id="") + res = gai_client.company_benefits.get_by_id(company_benefit_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -165,11 +175,15 @@ Company benefits represent the benefits that a company is offering to employees. Note that company benefits can be deactivated only when no employees are enrolled. +When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only update company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -177,7 +191,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.company_benefits.update(company_benefit_id="", version="98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", active=False) + res = gai_client.company_benefits.update(company_benefit_id="", version="98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, active=False) # Handle response print(res) @@ -213,11 +227,15 @@ The following must be true in order to delete a company benefit - There are no payroll items associated with the company benefit - The benefit is not managed by a Partner or by Gusto (type must be 'External') +When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only delete company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -225,7 +243,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.company_benefits.delete(company_benefit_id="") + gai_client.company_benefits.delete(company_benefit_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -256,7 +274,9 @@ scope: `benefits:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -264,7 +284,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.company_benefits.list_supported() + res = gai_client.company_benefits.list_supported(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -298,7 +318,9 @@ scope: `benefits:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -306,7 +328,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.company_benefits.get(benefit_id="") + res = gai_client.company_benefits.get(benefit_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -341,7 +363,9 @@ scope: `company_benefits:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -349,7 +373,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.company_benefits.get_summary(company_benefit_id="", start_date="2022-01-01", end_date="2022-12-31") + res = gai_client.company_benefits.get_summary(company_benefit_id="", start_date="2022-01-01", end_date="2022-12-31", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -389,7 +413,9 @@ scope: `employee_benefits:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -397,7 +423,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.company_benefits.get_employee_benefits(company_benefit_id="") + res = gai_client.company_benefits.get_employee_benefits(company_benefit_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -432,11 +458,15 @@ Create or update(if the employee is already enrolled in the company benefit prev Benefits containing PHI are only visible to applications with the `employee_benefits:read:phi` scope. +When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create or update employee benefits for benefit types that are permitted for the application. + scope: `employee_benefits:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -447,9 +477,10 @@ with GustoAppIntegration( res = gai_client.company_benefits.bulk_update_employee_benefits(company_benefit_id="", employee_benefits=[ { "version": "09j3d29jqdpj92109j9j2d90dq", + "employee_deduction": "250.00", "employee_uuid": "8f9f3f68-8fd3-499d-ade7-4a052e56494e", }, - ]) + ], x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -484,7 +515,9 @@ scope: `benefits:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -492,7 +525,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.company_benefits.get_requirements(benefit_id="") + res = gai_client.company_benefits.get_requirements(benefit_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -515,4 +548,112 @@ with GustoAppIntegration( | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| models.APIError | 4XX, 5XX | \*/\* | + +## get_v1_company_benefits_company_benefit_id_contribution_exclusions + +Returns all contributions for a given company benefit and whether they are excluded or not. + +Currently this endpoint only works for 401-k and Roth 401-k benefit types. + +scope: `company_benefits:read` + +### Example Usage + + +```python +import gusto_app_integration +from gusto_app_integration import GustoAppIntegration + + +with GustoAppIntegration( + company_access_auth="", +) as gai_client: + + res = gai_client.company_benefits.get_v1_company_benefits_company_benefit_id_contribution_exclusions(company_benefit_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_benefit_id` | *str* | :heavy_check_mark: | The UUID of the company benefit | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.ContributionExclusion]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| models.APIError | 4XX, 5XX | \*/\* | + +## put_v1_company_benefits_company_benefit_id_contribution_exclusions + +Updates contribution exclusions for a given company benefit. + +Currently this endpoint only works for 401-k and Roth 401-k benefit types. + +scope: `company_benefits:write` + +### Example Usage + + +```python +import gusto_app_integration +from gusto_app_integration import GustoAppIntegration + + +with GustoAppIntegration( + company_access_auth="", +) as gai_client: + + res = gai_client.company_benefits.put_v1_company_benefits_company_benefit_id_contribution_exclusions(company_benefit_id="", contribution_exclusions=[ + { + "contribution_uuid": "082dfd3e-5b55-11f0-bb42-ab7136ba04e2", + "contribution_type": "Bonus", + "excluded": True, + }, + { + "contribution_uuid": "082e034c-5b55-11f0-bb42-ab7136ba04e2", + "contribution_type": "Commission", + "excluded": False, + }, + { + "contribution_uuid": "082e1f6c-5b55-11f0-bb42-ab7136ba04e2", + "contribution_type": "Regular", + "excluded": True, + }, + ], x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_benefit_id` | *str* | :heavy_check_mark: | The UUID of the company benefit | +| `contribution_exclusions` | List[[models.ContributionExclusion](../../models/contributionexclusion.md)] | :heavy_check_mark: | The list of contribution exclusions to update | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.ContributionExclusion]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_app_int/docs/sdks/companylocations/README.md b/gusto_app_int/docs/sdks/companylocations/README.md index d91c8276..0ee7c965 100644 --- a/gusto_app_int/docs/sdks/companylocations/README.md +++ b/gusto_app_int/docs/sdks/companylocations/README.md @@ -17,7 +17,9 @@ scope: `companies:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -25,7 +27,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.company_locations.list(company_id="") + res = gai_client.company_locations.list(company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/contractorpayments/README.md b/gusto_app_int/docs/sdks/contractorpayments/README.md index 1b1308b5..e6a4b31b 100644 --- a/gusto_app_int/docs/sdks/contractorpayments/README.md +++ b/gusto_app_int/docs/sdks/contractorpayments/README.md @@ -16,7 +16,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -24,7 +26,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.contractor_payments.get(company_id="", start_date="2020-01-01", end_date="2020-12-31") + res = gai_client.contractor_payments.get(company_id="", start_date="2020-01-01", end_date="2020-12-31", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -62,7 +64,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -70,7 +74,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.contractor_payments.get_by_id(company_id="", contractor_payment_id="") + res = gai_client.contractor_payments.get_by_id(company_id="", contractor_payment_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/contractors/README.md b/gusto_app_int/docs/sdks/contractors/README.md index 93da3b1d..2d50e9e4 100644 --- a/gusto_app_int/docs/sdks/contractors/README.md +++ b/gusto_app_int/docs/sdks/contractors/README.md @@ -9,6 +9,7 @@ * [get](#get) - Get contractors of a company * [get_by_id](#get_by_id) - Get a contractor * [update](#update) - Update a contractor +* [get_v1_companies_company_id_contractors_payment_details](#get_v1_companies_company_id_contractors_payment_details) - List contractor payment details ## create @@ -18,6 +19,7 @@ scope: `contractors:manage` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -27,7 +29,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.contractors.create(company_uuid="", wage_type=gusto_app_integration.PostV1CompaniesCompanyUUIDContractorsWageType.FIXED, start_date="2020-04-01", hourly_rate="40.0", email="johnson@johnson.com", first_name="Johnson", last_name="Johnson", work_state="CA") + res = gai_client.contractors.create(company_uuid="", wage_type=gusto_app_integration.PostV1CompaniesCompanyUUIDContractorsWageType.FIXED, start_date="2020-04-01", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, type_=gusto_app_integration.PostV1CompaniesCompanyUUIDContractorsType.INDIVIDUAL, hourly_rate="40.0", self_onboarding=True, email="johnson@johnson.com", first_name="Johnson", last_name="Johnson", file_new_hire_report=False, work_state="CA") # Handle response print(res) @@ -76,7 +78,9 @@ scope: `contractors:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -84,7 +88,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.contractors.get(company_uuid="") + res = gai_client.contractors.get(company_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -99,6 +103,7 @@ with GustoAppIntegration( | `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | +| `sort_by` | [Optional[models.ContractorsSortBy]](../../models/contractorssortby.md) | :heavy_minus_sign: | Sort contractors. Options: type, onboarding_status, name, created_at | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -120,7 +125,9 @@ scope: `contractors:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -128,7 +135,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.contractors.get_by_id(contractor_uuid="") + res = gai_client.contractors.get_by_id(contractor_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -165,6 +172,7 @@ scope: `contractors:write` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -174,7 +182,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.contractors.update(contractor_uuid="", version="b48c46abfed1487b873b442334b3c4ff", wage_type=gusto_app_integration.PutV1ContractorsContractorUUIDWageType.HOURLY, start_date="2021-01-01", hourly_rate="20.00", first_name="Chanel", last_name="Boyle", middle_initial="X", is_active=True) + res = gai_client.contractors.update(contractor_uuid="", version="b48c46abfed1487b873b442334b3c4ff", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, type_=gusto_app_integration.PutV1ContractorsContractorUUIDType.INDIVIDUAL, wage_type=gusto_app_integration.PutV1ContractorsContractorUUIDWageType.HOURLY, start_date="2021-01-01", hourly_rate="20.00", self_onboarding=False, first_name="Chanel", last_name="Boyle", middle_initial="X", file_new_hire_report=False, is_active=True) # Handle response print(res) @@ -186,7 +194,7 @@ with GustoAppIntegration( | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contractor_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor | | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | | `type` | [Optional[models.PutV1ContractorsContractorUUIDType]](../../models/putv1contractorscontractoruuidtype.md) | :heavy_minus_sign: | The contractor type. | | | `wage_type` | [Optional[models.PutV1ContractorsContractorUUIDWageType]](../../models/putv1contractorscontractoruuidwagetype.md) | :heavy_minus_sign: | The contractor’s wage type.
| | @@ -214,4 +222,75 @@ with GustoAppIntegration( | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | | models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_v1_companies_company_id_contractors_payment_details + +Get payment details for contractors in a company. This endpoint returns a list of all contractors +associated with the specified company, including their payment methods and bank account details +if they are paid via direct deposit. + +For contractors paid by direct deposit, the response includes their bank account information +with sensitive data masked for security. The payment details also include information about +how their payments are split if they have multiple bank accounts configured. + +For contractors paid by check, only the basic payment method information is returned. + +### Response Details +- For direct deposit contractors: + - Bank account details (masked) + - Payment splits configuration + - Routing numbers + - Account types +- For check payments: + - Basic payment method designation + +### Common Use Cases +- Fetching contractor payment information for payroll processing +- Verifying contractor payment methods +- Reviewing payment split configurations + +`encrypted_account_number` is available only with the additional scope `contractor_payment_methods:read:account_numbers`. + +scope: `contractor_payment_methods:read` + + +### Example Usage + + +```python +import gusto_app_integration +from gusto_app_integration import GustoAppIntegration + + +with GustoAppIntegration( + company_access_auth="", +) as gai_client: + + res = gai_client.contractors.get_v1_companies_company_id_contractors_payment_details(company_id="", x_gusto_api_version=gusto_app_integration.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company. This identifies the company whose contractor payment details you want to retrieve. | +| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor. | +| `contractor_payment_group_uuid` | *Optional[str]* | :heavy_minus_sign: | Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group. | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.ContractorPaymentDetailsList]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | | models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_app_int/docs/sdks/departments/README.md b/gusto_app_int/docs/sdks/departments/README.md index 80a3bee5..5cce9d9b 100644 --- a/gusto_app_int/docs/sdks/departments/README.md +++ b/gusto_app_int/docs/sdks/departments/README.md @@ -21,7 +21,9 @@ scope: `departments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -29,7 +31,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.departments.create(company_uuid="", title="Stage Hand") + res = gai_client.departments.create(company_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, title="Stage Hand") # Handle response print(res) @@ -64,7 +66,9 @@ scope: `departments:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -72,7 +76,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.departments.get_all(company_uuid="") + res = gai_client.departments.get_all(company_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -106,7 +110,9 @@ scope: `departments:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -114,7 +120,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.departments.get(department_uuid="") + res = gai_client.departments.get(department_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -147,7 +153,9 @@ scope: `departments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -155,7 +163,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.departments.update(department_uuid="", version="db0edd04aaac4506f7edab03ac855d56", title="Backup Dancer") + res = gai_client.departments.update(department_uuid="", version="db0edd04aaac4506f7edab03ac855d56", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, title="Backup Dancer") # Handle response print(res) @@ -192,7 +200,9 @@ scope: `departments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -200,7 +210,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.departments.delete(department_uuid="") + gai_client.departments.delete(department_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -230,7 +240,9 @@ scope: `departments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -238,7 +250,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.departments.add_people(department_uuid="") + res = gai_client.departments.add_people(department_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -275,7 +287,9 @@ scope: `departments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -283,7 +297,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.departments.remove_people(department_uuid="") + res = gai_client.departments.remove_people(department_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/earningtypes/README.md b/gusto_app_int/docs/sdks/earningtypes/README.md index 1f545338..c19f784d 100644 --- a/gusto_app_int/docs/sdks/earningtypes/README.md +++ b/gusto_app_int/docs/sdks/earningtypes/README.md @@ -20,7 +20,9 @@ scope: `payrolls:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -28,7 +30,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.earning_types.create(company_id="", name="Gym Membership Stipend") + res = gai_client.earning_types.create(company_id="", name="Gym Membership Stipend", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -69,7 +71,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -77,7 +81,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.earning_types.get(company_id="") + res = gai_client.earning_types.get(company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -110,7 +114,9 @@ scope: `payrolls:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -118,7 +124,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.earning_types.update(company_id="", earning_type_uuid="", name="Gym Membership Stipend") + res = gai_client.earning_types.update(company_id="", earning_type_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, name="Gym Membership Stipend") # Handle response print(res) @@ -154,7 +160,9 @@ scope: `payrolls:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -162,7 +170,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.earning_types.deactivate(company_id="", earning_type_uuid="") + gai_client.earning_types.deactivate(company_id="", earning_type_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... diff --git a/gusto_app_int/docs/sdks/employeeaddresses/README.md b/gusto_app_int/docs/sdks/employeeaddresses/README.md index ce203ef1..60badc5a 100644 --- a/gusto_app_int/docs/sdks/employeeaddresses/README.md +++ b/gusto_app_int/docs/sdks/employeeaddresses/README.md @@ -24,9 +24,12 @@ Supports home address effective dating and courtesy withholding. scope: `employees:read` + ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -34,7 +37,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_addresses.list_home_addresses(employee_id="") + res = gai_client.employee_addresses.list_home_addresses(employee_id="", x_gusto_api_version=gusto_app_integration.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -46,7 +49,7 @@ with GustoAppIntegration( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion]](../../models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -55,9 +58,10 @@ with GustoAppIntegration( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## create @@ -67,10 +71,13 @@ Supports home address effective dating and courtesy withholding. scope: `employees:write` + ### Example Usage + ```python from datetime import date +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -78,7 +85,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_addresses.create(employee_id="", street_1="300 3rd Street", street_2=None, city="San Francisco", state="CA", zip_code="94107", effective_date=date.fromisoformat("2021-01-01"), courtesy_withholding=True) + res = gai_client.employee_addresses.create(employee_id="", x_gusto_api_version=gusto_app_integration.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_1="300 3rd Street", city="San Francisco", state="CA", zip_code="94107", effective_date=date.fromisoformat("2022-01-31")) # Handle response print(res) @@ -87,18 +94,18 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion]](../../models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | 300 3rd Street | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | San Francisco | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | CA | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | 94107 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | 2022-01-31 | +| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -108,7 +115,7 @@ with GustoAppIntegration( | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | | models.APIError | 4XX, 5XX | \*/\* | ## get @@ -119,9 +126,12 @@ Supports home address effective dating and courtesy withholding. scope: `employees:read` + ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -129,7 +139,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_addresses.get(home_address_uuid="") + res = gai_client.employee_addresses.get(home_address_uuid="", x_gusto_api_version=gusto_app_integration.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -141,7 +151,7 @@ with GustoAppIntegration( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../../models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -150,9 +160,10 @@ with GustoAppIntegration( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update @@ -162,10 +173,12 @@ Supports home address effective dating and courtesy withholding. scope: `employees:write` + ### Example Usage + ```python -from datetime import date +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -173,7 +186,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_addresses.update(home_address_uuid="", version="fe75bd065ff48b91c35fe8ff842f986c", street_1="300 3rd Street", street_2=None, city="San Francisco", state="CA", zip_code="94107", effective_date=date.fromisoformat("2021-01-01"), courtesy_withholding=True) + res = gai_client.employee_addresses.update(home_address_uuid="", version="56d00c178bc7393b2a206ed6a86afcb4", x_gusto_api_version=gusto_app_integration.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -182,19 +195,19 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `x_gusto_api_version` | [Optional[models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../../models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | | +| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -204,18 +217,21 @@ with GustoAppIntegration( | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | | models.APIError | 4XX, 5XX | \*/\* | ## delete_home_address -Used for deleting an employee's home address. Cannot delete the employee's active home address. +Used for deleting an employee's home address. Cannot delete the employee's active home address. scope: `employees:write` + ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -223,7 +239,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.employee_addresses.delete_home_address(home_address_uuid="") + gai_client.employee_addresses.delete_home_address(home_address_uuid="", x_gusto_api_version=gusto_app_integration.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -234,26 +250,28 @@ with GustoAppIntegration( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../../models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models.UnprocessableEntityErrorObject | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| models.APIError | 4XX, 5XX | \*/\* | ## get_work_addresses -Returns a list of an employee's work addresses. Each address includes its effective date and a boolean -signifying if it is the currently active work address. +Returns a list of an employee's work addresses. Each address includes its effective +date and a boolean signifying if it is the currently active work address. scope: `employees:read` + ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -261,7 +279,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_addresses.get_work_addresses(employee_id="") + res = gai_client.employee_addresses.get_work_addresses(employee_id="", x_gusto_api_version=gusto_app_integration.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -273,7 +291,7 @@ with GustoAppIntegration( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion]](../../models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -282,9 +300,10 @@ with GustoAppIntegration( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## create_work_address @@ -292,10 +311,13 @@ The work address of an employee describes when an employee began working at an a scope: `employees:manage` + ### Example Usage + ```python from datetime import date +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -303,7 +325,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_addresses.create_work_address(employee_id="", location_uuid="6a119be7-b4b0-4e27-aaa0-89d5f2524635", effective_date=date.fromisoformat("2023-05-15")) + res = gai_client.employee_addresses.create_work_address(employee_id="", x_gusto_api_version=gusto_app_integration.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid="6a119be7-b4b0-4e27-aaa0-89d5f2524635", effective_date=date.fromisoformat("2023-05-15")) # Handle response print(res) @@ -312,13 +334,13 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date the employee began working at the company location | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion]](../../models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | 6a119be7-b4b0-4e27-aaa0-89d5f2524635 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date the employee began working at the company location | 2023-05-15 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -328,7 +350,7 @@ with GustoAppIntegration( | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | | models.APIError | 4XX, 5XX | \*/\* | ## get_work_address @@ -337,9 +359,12 @@ The work address of an employee is used for payroll tax purposes. scope: `employees:read` + ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -347,7 +372,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_addresses.get_work_address(work_address_uuid="") + res = gai_client.employee_addresses.get_work_address(work_address_uuid="", x_gusto_api_version=gusto_app_integration.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -359,7 +384,7 @@ with GustoAppIntegration( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../../models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -368,9 +393,10 @@ with GustoAppIntegration( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update_work_address @@ -378,10 +404,13 @@ The work address of an employee is used for payroll tax purposes. scope: `employees:manage` + ### Example Usage + ```python from datetime import date +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -389,7 +418,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_addresses.update_work_address(work_address_uuid="", version="e6db1baa29d3df1eb307ff6a12c778da", location_uuid="6a119be7-b4b0-4e27-aaa0-89d5f2524635", effective_date=date.fromisoformat("2023-05-15")) + res = gai_client.employee_addresses.update_work_address(work_address_uuid="", version="56d00c178bc7393b2a206ed6a86afcb4", x_gusto_api_version=gusto_app_integration.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid="6a119be7-b4b0-4e27-aaa0-89d5f2524635", effective_date=date.fromisoformat("2023-05-15")) # Handle response print(res) @@ -398,14 +427,14 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `x_gusto_api_version` | [Optional[models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../../models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | 6a119be7-b4b0-4e27-aaa0-89d5f2524635 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | 2023-05-15 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -415,18 +444,21 @@ with GustoAppIntegration( | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | | models.APIError | 4XX, 5XX | \*/\* | ## delete_work_address -Used for deleting an employee's work address. Cannot delete the employee's active work address. +Used for deleting an employee's work address. Cannot delete the employee's active work address. scope: `employees:manage` + ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -434,7 +466,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.employee_addresses.delete_work_address(work_address_uuid="") + gai_client.employee_addresses.delete_work_address(work_address_uuid="", x_gusto_api_version=gusto_app_integration.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -445,12 +477,12 @@ with GustoAppIntegration( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../../models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Errors | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | | models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_app_int/docs/sdks/employeebenefits/README.md b/gusto_app_int/docs/sdks/employeebenefits/README.md index a84ee290..8ee3208b 100644 --- a/gusto_app_int/docs/sdks/employeebenefits/README.md +++ b/gusto_app_int/docs/sdks/employeebenefits/README.md @@ -15,12 +15,15 @@ ## create -Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. +Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + +When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -30,10 +33,10 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_benefits.create(employee_id="", company_benefit_uuid="f68abb42-431e-4392-bc3f-2795627e00f3", contribution={ + res = gai_client.employee_benefits.create(employee_id="", company_benefit_uuid="f68abb42-431e-4392-bc3f-2795627e00f3", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, active=True, employee_deduction="100.00", deduct_as_percentage=False, contribution={ "type": gusto_app_integration.PostV1EmployeesEmployeeIDEmployeeBenefitsType.AMOUNT, "value": "100.00", - }) + }, elective=False, catch_up=False, coverage_salary_multiplier="0.00", company_contribution="0.00", contribute_as_percentage=False) # Handle response print(res) @@ -86,7 +89,9 @@ scope: `employee_benefits:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -94,7 +99,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_benefits.get_all(employee_id="") + res = gai_client.employee_benefits.get_all(employee_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -131,7 +136,9 @@ scope: `employee_benefits:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -139,7 +146,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_benefits.get(employee_benefit_id="") + res = gai_client.employee_benefits.get(employee_benefit_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -166,13 +173,17 @@ with GustoAppIntegration( ## update -Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. +Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + +When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only update employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -180,7 +191,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_benefits.update(employee_benefit_id="", version="09j3d29jqdpj92109j9j2d90dq") + res = gai_client.employee_benefits.update(employee_benefit_id="", version="09j3d29jqdpj92109j9j2d90dq", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, employee_deduction="250.00", elective=False, catch_up=False, deduction_reduces_taxable_income=gusto_app_integration.PutV1EmployeeBenefitsEmployeeBenefitIDDeductionReducesTaxableIncome.UNSET, coverage_salary_multiplier="0.00", company_contribution="0.00", contribute_as_percentage=False) # Handle response print(res) @@ -223,13 +234,17 @@ with GustoAppIntegration( ## delete -Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. +Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + +When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only delete employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -237,7 +252,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.employee_benefits.delete(employee_benefit_id="") + gai_client.employee_benefits.delete(employee_benefit_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -268,7 +283,9 @@ scope: `employee_benefits:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -276,7 +293,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_benefits.get_ytd_benefit_amounts_from_different_company(employee_id="", tax_year=2024) + res = gai_client.employee_benefits.get_ytd_benefit_amounts_from_different_company(employee_id="", tax_year=2024, x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -312,7 +329,9 @@ scope: `employee_benefits:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -320,7 +339,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.employee_benefits.create_ytd_benefit_amounts_from_different_company(employee_id="", tax_year=5621.31) + gai_client.employee_benefits.create_ytd_benefit_amounts_from_different_company(employee_id="", tax_year=1828.56, x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, ytd_employee_deduction_amount="0.00", ytd_company_contribution_amount="0.00") # Use the SDK ... diff --git a/gusto_app_int/docs/sdks/employeeemployments/README.md b/gusto_app_int/docs/sdks/employeeemployments/README.md index e4cb3bed..d5d63e24 100644 --- a/gusto_app_int/docs/sdks/employeeemployments/README.md +++ b/gusto_app_int/docs/sdks/employeeemployments/README.md @@ -24,7 +24,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -32,7 +34,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_employments.create_termination(employee_id="", effective_date="2020-06-30", run_termination_payroll=True) + res = gai_client.employee_employments.create_termination(employee_id="", effective_date="2020-06-30", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, run_termination_payroll=True) # Handle response print(res) @@ -68,7 +70,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -76,7 +80,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.employee_employments.delete_termination(employee_id="") + gai_client.employee_employments.delete_termination(employee_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -107,7 +111,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -115,7 +121,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_employments.update_termination(employee_id="", version="1928d0c378e519e9c03fb959bc959a6b", effective_date="2020-06-30", run_termination_payroll=True) + res = gai_client.employee_employments.update_termination(employee_id="", version="1928d0c378e519e9c03fb959bc959a6b", effective_date="2020-06-30", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, run_termination_payroll=True) # Handle response print(res) @@ -124,14 +130,14 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `effective_date` | *str* | :heavy_check_mark: | The employee's last day of work. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `run_termination_payroll` | *Optional[bool]* | :heavy_minus_sign: | If true, the employee should receive their final wages via an off-cycle payroll. If false, they should receive their final wages on their current pay schedule. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `effective_date` | *str* | :heavy_check_mark: | The employee's last day of work. | | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `run_termination_payroll` | *Optional[bool]* | :heavy_minus_sign: | If true, the employee should receive their final wages via an off-cycle payroll. If false, they should receive their final wages on their current pay schedule. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -152,7 +158,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -160,7 +168,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_employments.create_rehire(employee_id="", effective_date="2023-06-30", file_new_hire_report=True, work_location_uuid="b6ae9d93-d4b8-4119-8c96-dba595dd8c30") + res = gai_client.employee_employments.create_rehire(employee_id="", effective_date="2023-06-30", file_new_hire_report=True, work_location_uuid="b6ae9d93-d4b8-4119-8c96-dba595dd8c30", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -199,7 +207,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -207,7 +217,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_employments.update_rehire(employee_id="", version="1928d0c378e519e9c03fb959bc959a6b", effective_date="2023-06-30", file_new_hire_report=True, work_location_uuid="b6ae9d93-d4b8-4119-8c96-dba595dd8c30") + res = gai_client.employee_employments.update_rehire(employee_id="", version="1928d0c378e519e9c03fb959bc959a6b", effective_date="2023-06-30", file_new_hire_report=True, work_location_uuid="b6ae9d93-d4b8-4119-8c96-dba595dd8c30", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -216,17 +226,17 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `effective_date` | *str* | :heavy_check_mark: | The day when the employee returns to work. | -| `file_new_hire_report` | *bool* | :heavy_check_mark: | The boolean flag indicating whether Gusto will file a new hire report for the employee. | -| `work_location_uuid` | *str* | :heavy_check_mark: | The uuid of the employee's work location. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `employment_status` | [Optional[models.PutV1EmployeesEmployeeIDRehireEmploymentStatus]](../../models/putv1employeesemployeeidrehireemploymentstatus.md) | :heavy_minus_sign: | The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. | -| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `effective_date` | *str* | :heavy_check_mark: | The day when the employee returns to work. | | +| `file_new_hire_report` | *bool* | :heavy_check_mark: | The boolean flag indicating whether Gusto will file a new hire report for the employee. | | +| `work_location_uuid` | *str* | :heavy_check_mark: | The uuid of the employee's work location. | | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `employment_status` | [Optional[models.PutV1EmployeesEmployeeIDRehireEmploymentStatus]](../../models/putv1employeesemployeeidrehireemploymentstatus.md) | :heavy_minus_sign: | The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. | | +| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -247,7 +257,9 @@ scope: `employments:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -255,7 +267,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_employments.get_rehire(employee_id="") + res = gai_client.employee_employments.get_rehire(employee_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -289,7 +301,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -297,7 +311,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.employee_employments.delete_rehire(employee_id="") + gai_client.employee_employments.delete_rehire(employee_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -327,7 +341,9 @@ scope: `employments:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -335,7 +351,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employee_employments.get_history(employee_id="") + res = gai_client.employee_employments.get_history(employee_id="", x_gusto_api_version=gusto_app_integration.GetV1EmployeesEmployeeIDEmploymentHistoryHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/employees/README.md b/gusto_app_int/docs/sdks/employees/README.md index 05fe1a05..aac9b956 100644 --- a/gusto_app_int/docs/sdks/employees/README.md +++ b/gusto_app_int/docs/sdks/employees/README.md @@ -23,7 +23,9 @@ scope: `employees:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -31,7 +33,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employees.get(company_id="") + res = gai_client.employees.get(company_id="", x_gusto_api_version=gusto_app_integration.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -40,20 +42,27 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidemployeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | -| `include` | List[[models.Include](../../models/include.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options:
- all_compensations: Include all effective dated compensations for each job instead of only the current compensation
- custom_fields: Include employees' custom fields
| -| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by the provided boolean | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | -| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidemployeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Filter employees by a specific primary work location | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | Filter employees by a specific payroll | +| `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | +| `sort_by` | *Optional[str]* | :heavy_minus_sign: | Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status | +| `include` | List[[models.Include](../../models/include.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response. Multiple options are comma separated. | +| `onboarded` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have completed onboarding | +| `onboarded_active` | *Optional[bool]* | :heavy_minus_sign: | Filters employees who are ready to work (onboarded AND active today) | +| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have been or are scheduled to be terminated | +| `terminated_today` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated) | +| `uuids` | List[*str*] | :heavy_minus_sign: | Optional subset of employees to fetch. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[List[models.Employee]](../../models/.md)** +**[List[models.ShowEmployees]](../../models/.md)** ### Errors @@ -71,7 +80,9 @@ with GustoAppIntegration( ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -79,7 +90,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employees.create(company_id="", first_name="Karl", last_name="The Fog") + res = gai_client.employees.create(company_id="", first_name="Linda", last_name="Kautzer", x_gusto_api_version=gusto_app_integration.PostV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -96,6 +107,7 @@ with GustoAppIntegration( | `x_gusto_api_version` | [Optional[models.PostV1EmployeesHeaderXGustoAPIVersion]](../../models/postv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `middle_initial` | *Optional[str]* | :heavy_minus_sign: | N/A | | `email` | *Optional[str]* | :heavy_minus_sign: | The employee's personal email address. | +| `work_email` | *Optional[str]* | :heavy_minus_sign: | The employee's work email address. | | `date_of_birth` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | | `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | | `preferred_first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | @@ -122,7 +134,9 @@ scope: `employees:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -130,7 +144,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employees.get_by_id(employee_id="") + res = gai_client.employees.get_by_id(employee_id="", x_gusto_api_version=gusto_app_integration.GetV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -139,12 +153,12 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.GetV1EmployeesHeaderXGustoAPIVersion]](../../models/getv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `include` | List[[models.QueryParamInclude](../../models/queryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options:
- all_compensations: Include all effective dated compensations for each job instead of only the current compensation
- custom_fields: Include employees' custom fields
| -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesHeaderXGustoAPIVersion]](../../models/getv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `include` | List[[models.QueryParamInclude](../../models/queryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response. Multiple options are comma separated. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -152,9 +166,10 @@ with GustoAppIntegration( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update @@ -165,7 +180,9 @@ scope: `employees:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -173,7 +190,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employees.update(employee_id="", version="f0c06d303aab1fd909b40d4a1ad409ac", first_name="Weezy", middle_initial="F", last_name="Baby", email="tunechi@cashmoneyrecords.com", date_of_birth="1991-01-31", ssn="824920233") + res = gai_client.employees.update(employee_id="", version="56d00c178bc7393b2a206ed6a86afcb4", x_gusto_api_version=gusto_app_integration.PutV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, first_name="Weezy", middle_initial="F", last_name="Baby", email="tunechi@cashmoneyrecords.com", work_email="new.partner.work@example.com", date_of_birth="1991-01-31", ssn="824920233") # Handle response print(res) @@ -182,20 +199,21 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `x_gusto_api_version` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `last_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `email` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `date_of_birth` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `x_gusto_api_version` | [Optional[models.PutV1EmployeesHeaderXGustoAPIVersion]](../../models/putv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | Weezy | +| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | F | +| `last_name` | *Optional[str]* | :heavy_minus_sign: | N/A | Baby | +| `email` | *Optional[str]* | :heavy_minus_sign: | N/A | tunechi@cashmoneyrecords.com | +| `work_email` | *Optional[str]* | :heavy_minus_sign: | N/A | new.partner.work@example.com | +| `date_of_birth` | *Optional[str]* | :heavy_minus_sign: | N/A | 1991-01-31 | +| `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | 824920233 | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -219,7 +237,9 @@ scope: `employees:manage` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -227,7 +247,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.employees.delete(employee_id="") + gai_client.employees.delete(employee_id="", x_gusto_api_version=gusto_app_integration.DeleteV1EmployeeHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -255,7 +275,9 @@ scope: `employees:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -263,7 +285,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employees.get_custom_fields(employee_id="") + res = gai_client.employees.get_custom_fields(employee_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -298,7 +320,9 @@ scope: `employee_time_off_activities:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -306,7 +330,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employees.get_time_off_activities(employee_uuid="", time_off_type="") + res = gai_client.employees.get_time_off_activities(employee_uuid="", time_off_type="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -342,7 +366,9 @@ scope: `employments:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -350,7 +376,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.employees.get_terminations(employee_id="") + res = gai_client.employees.get_terminations(employee_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/events/README.md b/gusto_app_int/docs/sdks/events/README.md index 70e4e32d..ab9378ed 100644 --- a/gusto_app_int/docs/sdks/events/README.md +++ b/gusto_app_int/docs/sdks/events/README.md @@ -19,6 +19,7 @@ scope: `events:read` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -28,7 +29,7 @@ with GustoAppIntegration() as gai_client: res = gai_client.events.get_all(security=gusto_app_integration.GetEventsSecurity( system_access_auth="", - ), sort_order=gusto_app_integration.SortOrder.ASC) + ), sort_order=gusto_app_integration.SortOrder.ASC, x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/garnishments/README.md b/gusto_app_int/docs/sdks/garnishments/README.md index 661d39e8..c0177778 100644 --- a/gusto_app_int/docs/sdks/garnishments/README.md +++ b/gusto_app_int/docs/sdks/garnishments/README.md @@ -19,7 +19,9 @@ scope: `garnishments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -27,7 +29,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.garnishments.create(employee_id="", amount="150.00", court_ordered=True, description="Back taxes") + res = gai_client.garnishments.create(employee_id="", amount="150.00", court_ordered=True, x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, active=True, description="Back taxes", times=None, recurring=True, annual_maximum=None, pay_period_maximum=None, deduct_as_percentage=False) # Handle response print(res) @@ -73,7 +75,9 @@ scope: `garnishments:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -81,7 +85,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.garnishments.get(employee_id="") + res = gai_client.garnishments.get(employee_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -116,7 +120,9 @@ scope: `garnishments:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -124,7 +130,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.garnishments.get_by_id(garnishment_id="") + res = gai_client.garnishments.get_by_id(garnishment_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -157,7 +163,9 @@ scope: `garnishments:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -165,7 +173,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.garnishments.update(garnishment_id="", version="52b7c567242cb7452e89ba2bc02cb476") + res = gai_client.garnishments.update(garnishment_id="", version="52b7c567242cb7452e89ba2bc02cb476", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, active=False, times=None, recurring=False, annual_maximum=None, pay_period_maximum=None, deduct_as_percentage=False) # Handle response print(res) @@ -211,7 +219,9 @@ scope: `garnishments:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -219,7 +229,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.garnishments.get_child_support() + res = gai_client.garnishments.get_child_support(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/gustoappintegration/README.md b/gusto_app_int/docs/sdks/gustoappintegration/README.md deleted file mode 100644 index e7c9b2a1..00000000 --- a/gusto_app_int/docs/sdks/gustoappintegration/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# GustoAppIntegration SDK - -## Overview - -Gusto API: Welcome to Gusto's Embedded Payroll API documentation! - -### Available Operations diff --git a/gusto_app_int/docs/sdks/introspection/README.md b/gusto_app_int/docs/sdks/introspection/README.md index 45dd26b3..e4b19a65 100644 --- a/gusto_app_int/docs/sdks/introspection/README.md +++ b/gusto_app_int/docs/sdks/introspection/README.md @@ -16,7 +16,9 @@ Returns scope and resource information associated with the current access token. ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -24,7 +26,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.get_token_info() + res = gai_client.introspection.get_token_info(x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -54,7 +56,9 @@ Revokes the given access token. After revoking, this token can no longer be used ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -62,7 +66,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.introspection.revoke(client_id="", client_secret="", token="") + gai_client.introspection.revoke(client_id="", client_secret="", token="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -94,7 +98,9 @@ The `expires_in` value is provided in seconds from when the `access_token` was g ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -102,7 +108,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.introspection.refresh_access_token(client_id="", client_secret="", refresh_token="", grant_type="") + res = gai_client.introspection.refresh_access_token(client_id="", client_secret="", refresh_token="", grant_type="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -143,6 +149,7 @@ scope: `companies:disconnect_app_integration` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -152,7 +159,7 @@ with GustoAppIntegration() as gai_client: gai_client.introspection.disconnect_app_integration(security=gusto_app_integration.PostV1DisconnectAppIntegrationSecurity( system_access_auth="", - ), company_id="") + ), company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... diff --git a/gusto_app_int/docs/sdks/jobs/README.md b/gusto_app_int/docs/sdks/jobs/README.md index 0c6297c7..914a4b11 100644 --- a/gusto_app_int/docs/sdks/jobs/README.md +++ b/gusto_app_int/docs/sdks/jobs/README.md @@ -16,7 +16,9 @@ scope: `jobs:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -24,7 +26,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.jobs.create(employee_id="", title="Regional Manager", hire_date="2020-12-21") + res = gai_client.jobs.create(employee_id="", title="Regional Manager", hire_date="2020-12-21", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -63,6 +65,7 @@ scope: `jobs:write` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -72,7 +75,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.jobs.create_compensation(job_id="", payment_unit=gusto_app_integration.PostV1CompensationsCompensationIDPaymentUnit.YEAR, flsa_status=gusto_app_integration.FlsaStatusType.EXEMPT, rate="60000.00") + res = gai_client.jobs.create_compensation(job_id="", payment_unit=gusto_app_integration.PostV1CompensationsCompensationIDPaymentUnit.YEAR, flsa_status=gusto_app_integration.FlsaStatusType.EXEMPT, x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, rate="60000.00") # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/jobsandcompensations/README.md b/gusto_app_int/docs/sdks/jobsandcompensations/README.md index c35ab025..6b1a9b54 100644 --- a/gusto_app_int/docs/sdks/jobsandcompensations/README.md +++ b/gusto_app_int/docs/sdks/jobsandcompensations/README.md @@ -22,7 +22,9 @@ scope: `jobs:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -30,7 +32,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.jobs_and_compensations.get_jobs(employee_id="") + res = gai_client.jobs_and_compensations.get_jobs(employee_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -66,7 +68,9 @@ scope: `jobs:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -74,7 +78,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.jobs_and_compensations.get(job_id="") + res = gai_client.jobs_and_compensations.get(job_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -108,7 +112,9 @@ scope: `jobs:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -116,7 +122,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.jobs_and_compensations.update_job(job_id="", version="gr78930htutrz444kuytr3s5hgxykuveb523fwl8sir", title="Regional Manager", hire_date="2020-12-21") + res = gai_client.jobs_and_compensations.update_job(job_id="", version="gr78930htutrz444kuytr3s5hgxykuveb523fwl8sir", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, title="Regional Manager", hire_date="2020-12-21") # Handle response print(res) @@ -156,7 +162,9 @@ scope: `jobs:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -164,7 +172,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.jobs_and_compensations.delete(job_id="") + gai_client.jobs_and_compensations.delete(job_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -196,7 +204,9 @@ scope: `jobs:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -204,7 +214,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.jobs_and_compensations.get_compensations_for_job(job_id="") + res = gai_client.jobs_and_compensations.get_compensations_for_job(job_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -241,7 +251,9 @@ scope: `jobs:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -249,7 +261,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.jobs_and_compensations.get_compensation(compensation_id="") + res = gai_client.jobs_and_compensations.get_compensation(compensation_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -282,6 +294,7 @@ scope: `jobs:write` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -291,7 +304,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.jobs_and_compensations.update_compensation(compensation_id="", version="98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", rate="60000.00", payment_unit=gusto_app_integration.PutV1CompensationsCompensationIDPaymentUnit.YEAR, flsa_status=gusto_app_integration.FlsaStatusType.EXEMPT) + res = gai_client.jobs_and_compensations.update_compensation(compensation_id="", version="98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, rate="60000.00", payment_unit=gusto_app_integration.PutV1CompensationsCompensationIDPaymentUnit.YEAR, flsa_status=gusto_app_integration.FlsaStatusType.EXEMPT) # Handle response print(res) @@ -332,7 +345,9 @@ scope: `jobs:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -340,7 +355,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.jobs_and_compensations.delete_compensation(compensation_id="") + gai_client.jobs_and_compensations.delete_compensation(compensation_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... diff --git a/gusto_app_int/docs/sdks/locations/README.md b/gusto_app_int/docs/sdks/locations/README.md index ceae39e0..75ab347e 100644 --- a/gusto_app_int/docs/sdks/locations/README.md +++ b/gusto_app_int/docs/sdks/locations/README.md @@ -20,7 +20,9 @@ scope: `companies:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -28,7 +30,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.locations.create(company_id="", phone_number="8009360383", street_1="425 2nd Street", city="San Francisco", state="CA", zip_code="94107", street_2="Suite 602") + res = gai_client.locations.create(company_id="", phone_number="8009360383", street_1="425 2nd Street", city="San Francisco", state="CA", zip_code="94107", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_2="Suite 602") # Handle response print(res) @@ -71,7 +73,9 @@ scope: `companies:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -79,7 +83,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.locations.get(location_id="") + res = gai_client.locations.get(location_id="", x_gusto_api_version=gusto_app_integration.XGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -114,7 +118,9 @@ scope: `companies.write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -122,7 +128,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.locations.update(location_id="", version="aa2c4db94c2e968aa0cf51f346007c5f", phone_number="8009360383", street_1="300 3rd Street", street_2="Apartment 318", city="San Francisco", zip_code="94107", filing_address=True) + res = gai_client.locations.update(location_id="", version="56d00c178bc7393b2a206ed6a86afcb4", x_gusto_api_version=gusto_app_integration.HeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, phone_number="8009360383", street_1="300 3rd Street", street_2="Apartment 318", city="San Francisco", zip_code="94107") # Handle response print(res) @@ -131,21 +137,21 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `location_id` | *str* | :heavy_check_mark: | The UUID of the location | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `x_gusto_api_version` | [Optional[models.HeaderXGustoAPIVersion]](../../models/headerxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `phone_number` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `country` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mailing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's mailing address. A company has a single mailing address, so this designation will override any previous selection. | -| `filing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's filing address. A company has a single filing address, so this designation will override any previous selection. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `location_id` | *str* | :heavy_check_mark: | The UUID of the location | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `x_gusto_api_version` | [Optional[models.HeaderXGustoAPIVersion]](../../models/headerxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `phone_number` | *Optional[str]* | :heavy_minus_sign: | N/A | 8009360383 | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | 300 3rd Street | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | Apartment 318 | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | San Francisco | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | 94107 | +| `country` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `mailing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's mailing address. A company has a single mailing address, so this designation will override any previous selection. | | +| `filing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's filing address. A company has a single filing address, so this designation will override any previous selection. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -167,7 +173,9 @@ scope: `companies:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -175,7 +183,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.locations.get_minimum_wages(location_uuid="", effective_date="2020-01-31") + res = gai_client.locations.get_minimum_wages(location_uuid="", x_gusto_api_version=gusto_app_integration.GetV1LocationsLocationUUIDMinimumWagesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, effective_date="2020-01-31") # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/notifications/README.md b/gusto_app_int/docs/sdks/notifications/README.md new file mode 100644 index 00000000..45a89864 --- /dev/null +++ b/gusto_app_int/docs/sdks/notifications/README.md @@ -0,0 +1,55 @@ +# Notifications +(*notifications*) + +## Overview + +### Available Operations + +* [get_company_notifications](#get_company_notifications) - Get notifications for company + +## get_company_notifications + +Returns all notifications relevant for the given company. + +scope: `notifications:read` + + +### Example Usage + + +```python +import gusto_app_integration +from gusto_app_integration import GustoAppIntegration + + +with GustoAppIntegration( + company_access_auth="", +) as gai_client: + + res = gai_client.notifications.get_company_notifications(company_uuid="", x_gusto_api_version=gusto_app_integration.GetCompanyNotificationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company for which you would like to return notifications | +| `status` | [Optional[models.QueryParamStatus]](../../models/queryparamstatus.md) | :heavy_minus_sign: | N/A | +| `x_gusto_api_version` | [Optional[models.GetCompanyNotificationsHeaderXGustoAPIVersion]](../../models/getcompanynotificationsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.Notification]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_app_int/docs/sdks/payrolls/README.md b/gusto_app_int/docs/sdks/payrolls/README.md index 336aaea4..ad25b515 100644 --- a/gusto_app_int/docs/sdks/payrolls/README.md +++ b/gusto_app_int/docs/sdks/payrolls/README.md @@ -22,8 +22,10 @@ Notes: scope: `payrolls:read` + ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -33,7 +35,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.payrolls.get_for_company(company_id="", sort_order=gusto_app_integration.SortOrder.ASC) + res = gai_client.payrolls.get_for_company(company_id="", x_gusto_api_version=gusto_app_integration.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, start_date="2020-01-31", end_date="2020-01-31", sort_order=gusto_app_integration.QueryParamSortOrder.ASC) # Handle response print(res) @@ -42,29 +44,32 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | -| `processing_statuses` | List[[models.ProcessingStatuses](../../models/processingstatuses.md)] | :heavy_minus_sign: | Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` | | -| `payroll_types` | List[[models.PayrollTypes](../../models/payrolltypes.md)] | :heavy_minus_sign: | Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` | | -| `include` | List[[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude](../../models/getv1companiescompanyidpayrollsqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta` | | -| `start_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is after the start date | | -| `end_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. | | -| `sort_order` | [Optional[models.SortOrder]](../../models/sortorder.md) | :heavy_minus_sign: | A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. | asc | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | -| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `processing_statuses` | List[[models.ProcessingStatuses](../../models/processingstatuses.md)] | :heavy_minus_sign: | Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` | | +| `payroll_types` | List[[models.PayrollTypes](../../models/payrolltypes.md)] | :heavy_minus_sign: | Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` | | +| `processed` | *Optional[bool]* | :heavy_minus_sign: | Whether to return processed or unprocessed payrolls | | +| `include_off_cycle` | *Optional[bool]* | :heavy_minus_sign: | Whether to include off cycle payrolls in the response | | +| `include` | List[[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude](../../models/getv1companiescompanyidpayrollsqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` | | +| `start_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is after the start date | 2020-01-31 | +| `end_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. | 2020-01-31 | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | +| `sort_order` | [Optional[models.QueryParamSortOrder]](../../models/queryparamsortorder.md) | :heavy_minus_sign: | A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. | asc | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[List[models.PayrollMinimal]](../../models/.md)** +**[List[models.Payroll]](../../models/.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get @@ -79,9 +84,12 @@ Notes: scope: `payrolls:read` + ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -89,7 +97,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.payrolls.get(company_id="", payroll_id="") + res = gai_client.payrolls.get(company_id="", payroll_id="", x_gusto_api_version=gusto_app_integration.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -102,19 +110,23 @@ with GustoAppIntegration( | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `include` | List[[models.GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude](../../models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `sort_by` | [Optional[models.SortBy]](../../models/sortby.md) | :heavy_minus_sign: | Field to sort employee compensations by | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.Payroll](../../models/payroll.md)** +**[models.PayrollShow](../../models/payrollshow.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update @@ -125,9 +137,12 @@ will not be removed from the payroll. scope: `payrolls:write` + ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -137,9 +152,7 @@ with GustoAppIntegration( res = gai_client.payrolls.update(company_id="", payroll_id="", employee_compensations=[ {}, - {}, - {}, - ]) + ], x_gusto_api_version=gusto_app_integration.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -152,8 +165,8 @@ with GustoAppIntegration( | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | -| `employee_compensations` | List[[models.EmployeeCompensations](../../models/employeecompensations.md)] | :heavy_check_mark: | N/A | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `employee_compensations` | List[[models.PayrollUpdateEmployeeCompensations](../../models/payrollupdateemployeecompensations.md)] | :heavy_check_mark: | N/A | +| `x_gusto_api_version` | [Optional[models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../../models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `withholding_pay_period` | [Optional[models.WithholdingPayPeriod]](../../models/withholdingpayperiod.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. | | `skip_regular_deductions` | *Optional[bool]* | :heavy_minus_sign: | Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls. | | `fixed_withholding_rate` | *Optional[bool]* | :heavy_minus_sign: | Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls. | @@ -167,7 +180,7 @@ with GustoAppIntegration( | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | | models.APIError | 4XX, 5XX | \*/\* | ## prepare @@ -182,7 +195,9 @@ scope: `payrolls:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -190,7 +205,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.payrolls.prepare(company_id="", payroll_id="") + res = gai_client.payrolls.prepare(company_id="", payroll_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -203,7 +218,11 @@ with GustoAppIntegration( | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `sort_by` | [Optional[models.PayrollPrepareSortBy]](../../models/payrollpreparesortby.md) | :heavy_minus_sign: | Sort employee compenstations by name. Options: first_name, last_name | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `employee_uuids` | List[*str*] | :heavy_minus_sign: | An array of employee UUIDs. If passed, only those employees payroll items will be prepared. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/gusto_app_int/docs/sdks/payschedules/README.md b/gusto_app_int/docs/sdks/payschedules/README.md index fdb35d73..76b07446 100644 --- a/gusto_app_int/docs/sdks/payschedules/README.md +++ b/gusto_app_int/docs/sdks/payschedules/README.md @@ -19,7 +19,9 @@ scope: `pay_schedules:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -27,7 +29,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.pay_schedules.list(company_id="") + res = gai_client.pay_schedules.list(company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -62,7 +64,9 @@ scope: `pay_schedules:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -70,7 +74,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.pay_schedules.get(company_id="", pay_schedule_id="") + res = gai_client.pay_schedules.get(company_id="", pay_schedule_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -108,7 +112,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -116,7 +122,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.pay_schedules.get_pay_periods(company_id="", start_date="2020-01-01", end_date="2020-01-31") + res = gai_client.pay_schedules.get_pay_periods(company_id="", start_date="2020-01-01", end_date="2020-01-31", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -154,7 +160,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -162,7 +170,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.pay_schedules.get_unprocessed_termination_pay_periods(company_id="") + res = gai_client.pay_schedules.get_unprocessed_termination_pay_periods(company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -195,7 +203,9 @@ scope: `pay_schedules:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -203,7 +213,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.pay_schedules.get_assignments(company_id="") + res = gai_client.pay_schedules.get_assignments(company_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/reports/README.md b/gusto_app_int/docs/sdks/reports/README.md new file mode 100644 index 00000000..18de7d04 --- /dev/null +++ b/gusto_app_int/docs/sdks/reports/README.md @@ -0,0 +1,102 @@ +# Reports +(*reports*) + +## Overview + +### Available Operations + +* [post_payrolls_payroll_uuid_reports_general_ledger](#post_payrolls_payroll_uuid_reports_general_ledger) - Create a general ledger report +* [get_reports_request_uuid](#get_reports_request_uuid) - Get a report + +## post_payrolls_payroll_uuid_reports_general_ledger + +Create a general ledger report for a payroll. The report can be aggregated by different dimensions such as job or department. + +Use the `request_uuid` in the response with the [report GET endpoint](../reference/get-reports-request_uuid) to poll for the status and report URL upon completion. The retrieved report will be generated in a JSON format. + +scope: `company_reports:write` OR `company_reports:write:general_ledger` + +### Example Usage + + +```python +import gusto_app_integration +from gusto_app_integration import GustoAppIntegration + + +with GustoAppIntegration( + company_access_auth="", +) as gai_client: + + res = gai_client.reports.post_payrolls_payroll_uuid_reports_general_ledger(payroll_uuid="", aggregation=gusto_app_integration.PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation.DEFAULT, x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `payroll_uuid` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `aggregation` | [models.PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation](../../models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md) | :heavy_check_mark: | The breakdown of the report. Use 'default' for no split. | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `integration_type` | [OptionalNullable[models.PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType]](../../models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md) | :heavy_minus_sign: | The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GeneralLedgerReport](../../models/generalledgerreport.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_reports_request_uuid + +Get a company's report given the `request_uuid`. The response will include the report request's status and, if complete, the report URL. + +Reports containing PHI are inaccessible with `company_reports:read:tier_2_only` data scope + +scope: `company_reports:read` + +### Example Usage + + +```python +import gusto_app_integration +from gusto_app_integration import GustoAppIntegration + + +with GustoAppIntegration( + company_access_auth="", +) as gai_client: + + res = gai_client.reports.get_reports_request_uuid(request_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `request_uuid` | *str* | :heavy_check_mark: | The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint. | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Report](../../models/report.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_app_int/docs/sdks/timeoffpolicies/README.md b/gusto_app_int/docs/sdks/timeoffpolicies/README.md index 4f5af038..11edcf06 100644 --- a/gusto_app_int/docs/sdks/timeoffpolicies/README.md +++ b/gusto_app_int/docs/sdks/timeoffpolicies/README.md @@ -23,7 +23,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -31,7 +33,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.time_off_policies.calculate_accruing_time_off_hours(payroll_id="", employee_id="", regular_hours_worked=30.25, overtime_hours_worked=10, double_overtime_hours_worked=0, pto_hours_used=5.5, sick_hours_used=0) + res = gai_client.time_off_policies.calculate_accruing_time_off_hours(payroll_id="", employee_id="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, regular_hours_worked=30.25, overtime_hours_worked=10, double_overtime_hours_worked=0, pto_hours_used=5.5, sick_hours_used=0) # Handle response print(res) diff --git a/gusto_app_int/docs/sdks/timeoffrequests/README.md b/gusto_app_int/docs/sdks/timeoffrequests/README.md new file mode 100644 index 00000000..12369666 --- /dev/null +++ b/gusto_app_int/docs/sdks/timeoffrequests/README.md @@ -0,0 +1,70 @@ +# TimeOffRequests +(*time_off_requests*) + +## Overview + +### Available Operations + +* [get_v1_companies_company_id_time_off_requests](#get_v1_companies_company_id_time_off_requests) - Get time off requests for a company + +## get_v1_companies_company_id_time_off_requests + +Get all time off requests, past and present, for a company. + +In order to reduce the number of time off requests returned in a single response, or to retrieve time off requests from a time period of interest, you may use the `start_date` and `end_date` parameters. + +You may provide both or either parameters to scope the returned data. For example: + +`?start_date=2019-01-01` + +Returns all time off requests where the request start date is equal to or after January 1, 2019. + +`?end_date=2019-01-01` + +Returns all time off requests where the request end date is equal to or before January 1, 2019. + +`?start_date=2019-05-01&end_date=2019-08-31` + +Returns all time off requests where the request start date is equal to or after May 1, 2019 and the request end date is equal to or before August 31, 2019. + +`scope: time_off_requests:read` + + +### Example Usage + + +```python +import gusto_app_integration +from gusto_app_integration import GustoAppIntegration + + +with GustoAppIntegration( + company_access_auth="", +) as gai_client: + + res = gai_client.time_off_requests.get_v1_companies_company_id_time_off_requests(company_id="", x_gusto_api_version=gusto_app_integration.GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The company UUID | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidtimeoffrequestsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `start_date` | *Optional[str]* | :heavy_minus_sign: | Filter time off requests starting on or after this date | +| `end_date` | *Optional[str]* | :heavy_minus_sign: | Filter time off requests ending on or before this date | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.TimeOffRequest]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_app_int/docs/sdks/timetracking/README.md b/gusto_app_int/docs/sdks/timetracking/README.md index da6ab501..caa8b006 100644 --- a/gusto_app_int/docs/sdks/timetracking/README.md +++ b/gusto_app_int/docs/sdks/timetracking/README.md @@ -22,7 +22,9 @@ scope: `time_sheet:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -30,7 +32,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.time_tracking.get_companies_company_uuid_time_tracking_time_sheets(company_uuid="") + res = gai_client.time_tracking.get_companies_company_uuid_time_tracking_time_sheets(company_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -46,7 +48,7 @@ with GustoAppIntegration( | `entity_type` | [Optional[models.EntityType]](../../models/entitytype.md) | :heavy_minus_sign: | Type of entities to filter. One of: "Employee", "Contractor" | | `status` | [Optional[models.Status]](../../models/status.md) | :heavy_minus_sign: | Status of time sheets. One of: "approved", "pending", "rejected" | | `sort_by` | [Optional[models.TimeSheetSortBy]](../../models/timesheetsortby.md) | :heavy_minus_sign: | Field to sort by. One of: "created_at", "updated_at", "shift_started_at", "shift_ended_at" | -| `sort_order` | [Optional[models.TimeSheetSortOrder]](../../models/timesheetsortorder.md) | :heavy_minus_sign: | Sortinng order. One of: "asc", "desc" | +| `sort_order` | [Optional[models.TimeSheetSortOrder]](../../models/timesheetsortorder.md) | :heavy_minus_sign: | Sorting order. One of: "asc", "desc" | | `before` | *Optional[str]* | :heavy_minus_sign: | time sheets that were created before ISO 8601 timestamp. Filtering by "created_at" | | `after` | *Optional[str]* | :heavy_minus_sign: | time sheets that were created before ISO 8601 timestamp. Filtering by "created_at" | | `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | @@ -75,6 +77,7 @@ scope: `time_sheet:write` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -85,7 +88,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.time_tracking.post_companies_company_uuid_time_tracking_time_sheets(company_uuid="", entity_uuid="123e4567-e89b-12d3-a456-426614174000", entity_type="Employee", time_zone="America/New_York", shift_started_at=parse_datetime("2024-06-10T09:00:00Z"), job_uuid="123e4567-e89b-12d3-a456-426614174000", shift_ended_at=parse_datetime("2024-06-10T17:00:00Z"), metadata={ + res = gai_client.time_tracking.post_companies_company_uuid_time_tracking_time_sheets(company_uuid="", entity_uuid="123e4567-e89b-12d3-a456-426614174000", entity_type="Employee", time_zone="America/New_York", shift_started_at=parse_datetime("2024-06-10T09:00:00Z"), x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, job_uuid="123e4567-e89b-12d3-a456-426614174000", shift_ended_at=parse_datetime("2024-06-10T17:00:00Z"), metadata={ "custom_field": "custom value", }, entries=[ { @@ -137,7 +140,9 @@ scope: `time_sheet:read` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -145,7 +150,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.time_tracking.get_time_tracking_time_sheets_time_sheet_uuid(time_sheet_uuid="") + res = gai_client.time_tracking.get_time_tracking_time_sheets_time_sheet_uuid(time_sheet_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -181,7 +186,9 @@ scope: `time_sheet:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration from gusto_app_integration.utils import parse_datetime @@ -190,7 +197,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - res = gai_client.time_tracking.put_time_tracking_time_sheets_time_sheet_uuid(time_sheet_uuid="", version="72deb67e16f7b92713c00d3582fa6c68", entity_uuid="123e4567-e89b-12d3-a456-426614174000", entity_type="Employee", job_uuid="123e4567-e89b-12d3-a456-426614174000", time_zone="America/New_York", shift_started_at=parse_datetime("2024-06-10T09:00:00Z"), shift_ended_at=parse_datetime("2024-06-10T17:00:00Z"), metadata={ + res = gai_client.time_tracking.put_time_tracking_time_sheets_time_sheet_uuid(time_sheet_uuid="", version="72deb67e16f7b92713c00d3582fa6c68", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, entity_uuid="123e4567-e89b-12d3-a456-426614174000", entity_type="Employee", job_uuid="123e4567-e89b-12d3-a456-426614174000", time_zone="America/New_York", shift_started_at=parse_datetime("2024-06-10T09:00:00Z"), shift_ended_at=parse_datetime("2024-06-10T17:00:00Z"), metadata={ "custom_field": "custom value", }, entries=[ { @@ -206,20 +213,20 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `time_sheet_uuid` | *str* | :heavy_check_mark: | UUID of the time sheet | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `entity_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the entity associated with the time sheet. | -| `entity_type` | *Optional[str]* | :heavy_minus_sign: | Type of entity associated with the time sheet. | -| `job_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the job for which time was tracked. Currently is only supported for employees. | -| `time_zone` | *Optional[str]* | :heavy_minus_sign: | Time zone of where the time was tracked. | -| `shift_started_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The start time of the shift. Timestamp should be in ISO8601 | -| `shift_ended_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The end time of the shift. If the shift is still ongoing this will be null. | -| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata associated with the time sheet. Key-value pairs of arbitrary data. Both keys and values must be strings. | -| `entries` | List[[models.PutTimeTrackingTimeSheetsTimeSheetUUIDEntries](../../models/puttimetrackingtimesheetstimesheetuuidentries.md)] | :heavy_minus_sign: | Entries associated with the time sheet. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `time_sheet_uuid` | *str* | :heavy_check_mark: | UUID of the time sheet | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `entity_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the entity associated with the time sheet. | | +| `entity_type` | *Optional[str]* | :heavy_minus_sign: | Type of entity associated with the time sheet. | | +| `job_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the job for which time was tracked. Currently is only supported for employees. | | +| `time_zone` | *Optional[str]* | :heavy_minus_sign: | Time zone of where the time was tracked. | | +| `shift_started_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The start time of the shift. Timestamp should be in ISO8601 | | +| `shift_ended_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The end time of the shift. If the shift is still ongoing this will be null. | | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata associated with the time sheet. Key-value pairs of arbitrary data. Both keys and values must be strings. | | +| `entries` | List[[models.PutTimeTrackingTimeSheetsTimeSheetUUIDEntries](../../models/puttimetrackingtimesheetstimesheetuuidentries.md)] | :heavy_minus_sign: | Entries associated with the time sheet. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -243,7 +250,9 @@ scope: `time_sheet:write` ### Example Usage + ```python +import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -251,7 +260,7 @@ with GustoAppIntegration( company_access_auth="", ) as gai_client: - gai_client.time_tracking.delete_time_tracking_time_sheets_time_sheet_uuid(time_sheet_uuid="", version="") + gai_client.time_tracking.delete_time_tracking_time_sheets_time_sheet_uuid(time_sheet_uuid="", version="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... diff --git a/gusto_app_int/docs/sdks/webhooks/README.md b/gusto_app_int/docs/sdks/webhooks/README.md index eb68576b..658a45da 100644 --- a/gusto_app_int/docs/sdks/webhooks/README.md +++ b/gusto_app_int/docs/sdks/webhooks/README.md @@ -12,6 +12,7 @@ * [delete_subscription](#delete_subscription) - Delete a webhook subscription * [verify](#verify) - Verify the webhook subscription * [request_verification_token](#request_verification_token) - Request the webhook subscription verification_token +* [get_v1_webhooks_health_check](#get_v1_webhooks_health_check) - Get the webhooks health status ## create @@ -25,6 +26,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -37,7 +39,7 @@ with GustoAppIntegration() as gai_client: ), url="https://partner-app.com/subscriber", subscription_types=[ gusto_app_integration.PostV1WebhookSubscriptionSubscriptionTypes.COMPANY, gusto_app_integration.PostV1WebhookSubscriptionSubscriptionTypes.EMPLOYEE, - ]) + ], x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -77,6 +79,7 @@ scope: `webhook_subscriptions:read` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -86,7 +89,7 @@ with GustoAppIntegration() as gai_client: res = gai_client.webhooks.list_subscriptions(security=gusto_app_integration.GetV1WebhookSubscriptionsSecurity( system_access_auth="", - )) + ), x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -124,6 +127,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -136,7 +140,7 @@ with GustoAppIntegration() as gai_client: ), webhook_subscription_uuid="", subscription_types=[ gusto_app_integration.PutV1WebhookSubscriptionUUIDSubscriptionTypes.COMPANY, gusto_app_integration.PutV1WebhookSubscriptionUUIDSubscriptionTypes.EMPLOYEE, - ]) + ], x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -177,6 +181,7 @@ scope: `webhook_subscriptions:read` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -186,7 +191,7 @@ with GustoAppIntegration() as gai_client: res = gai_client.webhooks.get_subscription(security=gusto_app_integration.GetV1WebhookSubscriptionUUIDSecurity( system_access_auth="", - ), webhook_subscription_uuid="") + ), webhook_subscription_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -225,6 +230,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -234,7 +240,7 @@ with GustoAppIntegration() as gai_client: gai_client.webhooks.delete_subscription(security=gusto_app_integration.DeleteV1WebhookSubscriptionUUIDSecurity( system_access_auth="", - ), webhook_subscription_uuid="") + ), webhook_subscription_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -270,6 +276,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -279,7 +286,7 @@ with GustoAppIntegration() as gai_client: res = gai_client.webhooks.verify(security=gusto_app_integration.PutV1VerifyWebhookSubscriptionUUIDSecurity( system_access_auth="", - ), webhook_subscription_uuid="", verification_token="asefasedfe23e234easd") + ), webhook_subscription_uuid="", verification_token="asefasedfe23e234easd", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -320,6 +327,7 @@ scope: `webhook_subscriptions:read` ### Example Usage + ```python import gusto_app_integration from gusto_app_integration import GustoAppIntegration @@ -329,7 +337,7 @@ with GustoAppIntegration() as gai_client: gai_client.webhooks.request_verification_token(security=gusto_app_integration.GetV1WebhookSubscriptionVerificationTokenUUIDSecurity( system_access_auth="", - ), webhook_subscription_uuid="") + ), webhook_subscription_uuid="", x_gusto_api_version=gusto_app_integration.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -346,6 +354,50 @@ with GustoAppIntegration() as gai_client: ### Errors +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_v1_webhooks_health_check + +Returns the health status (`healthy`, `unhealthy`, or `unknown`) of the webhooks system based on the last ten minutes of activity. + +scope: `webhook_subscriptions:read` + + +### Example Usage + + +```python +import gusto_app_integration +from gusto_app_integration import GustoAppIntegration + + +with GustoAppIntegration() as gai_client: + + res = gai_client.webhooks.get_v1_webhooks_health_check(security=gusto_app_integration.GetV1WebhooksHealthCheckSecurity( + system_access_auth="", + ), x_gusto_api_version=gusto_app_integration.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [models.GetV1WebhooksHealthCheckSecurity](../../models/getv1webhookshealthchecksecurity.md) | :heavy_check_mark: | N/A | +| `x_gusto_api_version` | [Optional[models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion]](../../models/getv1webhookshealthcheckheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WebhooksHealthCheckStatus](../../models/webhookshealthcheckstatus.md)** + +### Errors + | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_app_int/poetry.lock b/gusto_app_int/poetry.lock index 0db38f95..1454332b 100644 --- a/gusto_app_int/poetry.lock +++ b/gusto_app_int/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -109,31 +109,31 @@ test = ["pytest (>=6)"] [[package]] name = "h11" -version = "0.14.0" +version = "0.16.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, ] [[package]] name = "httpcore" -version = "1.0.7" +version = "1.0.9" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, - {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, ] [package.dependencies] certifi = "*" -h11 = ">=0.13,<0.15" +h11 = ">=0.16" [package.extras] asyncio = ["anyio (>=4.0,<5.0)"] @@ -553,4 +553,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.1" python-versions = ">=3.9.2" -content-hash = "e8a1f9e6b4c81b04603e502642fd940846ce892668f7cbd96fa85f9ad8d353fc" +content-hash = "fd5d2a9148a00cbc5258586b48c24f763e191bdc12367f4e92abdbfc15e30679" diff --git a/gusto_app_int/poetry.toml b/gusto_app_int/poetry.toml index ab1033bd..cd3492ac 100644 --- a/gusto_app_int/poetry.toml +++ b/gusto_app_int/poetry.toml @@ -1,2 +1,3 @@ + [virtualenvs] in-project = true diff --git a/gusto_app_int/pyproject.toml b/gusto_app_int/pyproject.toml index 8a149dfb..d577d36b 100644 --- a/gusto_app_int/pyproject.toml +++ b/gusto_app_int/pyproject.toml @@ -1,11 +1,13 @@ + [project] name = "gusto_app_integration" -version = "0.3.0" +version = "0.4.0" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" requires-python = ">=3.9.2" dependencies = [ + "httpcore >=1.0.9", "httpx >=0.28.1", "pydantic >=2.11.2", ] @@ -37,6 +39,8 @@ pythonpath = ["src"] [tool.mypy] disable_error_code = "misc" +explicit_package_bases = true +mypy_path = "src" [[tool.mypy.overrides]] module = "typing_inspect" diff --git a/gusto_app_int/scripts/prepare_readme.py b/gusto_app_int/scripts/prepare_readme.py index caba51d6..27f38bc7 100644 --- a/gusto_app_int/scripts/prepare_readme.py +++ b/gusto_app_int/scripts/prepare_readme.py @@ -10,12 +10,17 @@ GITHUB_URL = ( GITHUB_URL[: -len(".git")] if GITHUB_URL.endswith(".git") else GITHUB_URL ) + REPO_SUBDIR = "gusto_app_int" + # Ensure the subdirectory has a trailing slash + if not REPO_SUBDIR.endswith("/"): + REPO_SUBDIR += "/" # links on PyPI should have absolute URLs readme_contents = re.sub( r"(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))", lambda m: m.group(1) + GITHUB_URL + "/blob/master/" + + REPO_SUBDIR + m.group(2) + m.group(3), readme_contents, diff --git a/gusto_app_int/scripts/publish.sh b/gusto_app_int/scripts/publish.sh index f2f2cf2c..2a3ead70 100755 --- a/gusto_app_int/scripts/publish.sh +++ b/gusto_app_int/scripts/publish.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash - export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN} poetry run python scripts/prepare_readme.py diff --git a/gusto_app_int/src/gusto_app_integration/_hooks/types.py b/gusto_app_int/src/gusto_app_integration/_hooks/types.py index 91c35bb7..18fa74cb 100644 --- a/gusto_app_int/src/gusto_app_integration/_hooks/types.py +++ b/gusto_app_int/src/gusto_app_integration/_hooks/types.py @@ -2,11 +2,13 @@ from abc import ABC, abstractmethod from gusto_app_integration.httpclient import HttpClient +from gusto_app_integration.sdkconfiguration import SDKConfiguration import httpx from typing import Any, Callable, List, Optional, Tuple, Union class HookContext: + config: SDKConfiguration base_url: str operation_id: str oauth2_scopes: Optional[List[str]] = None @@ -14,11 +16,13 @@ class HookContext: def __init__( self, + config: SDKConfiguration, base_url: str, operation_id: str, oauth2_scopes: Optional[List[str]], security_source: Optional[Union[Any, Callable[[], Any]]], ): + self.config = config self.base_url = base_url self.operation_id = operation_id self.oauth2_scopes = oauth2_scopes @@ -28,6 +32,7 @@ def __init__( class BeforeRequestContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( + hook_ctx.config, hook_ctx.base_url, hook_ctx.operation_id, hook_ctx.oauth2_scopes, @@ -38,6 +43,7 @@ def __init__(self, hook_ctx: HookContext): class AfterSuccessContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( + hook_ctx.config, hook_ctx.base_url, hook_ctx.operation_id, hook_ctx.oauth2_scopes, @@ -48,6 +54,7 @@ def __init__(self, hook_ctx: HookContext): class AfterErrorContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( + hook_ctx.config, hook_ctx.base_url, hook_ctx.operation_id, hook_ctx.oauth2_scopes, diff --git a/gusto_app_int/src/gusto_app_integration/_version.py b/gusto_app_int/src/gusto_app_integration/_version.py index 604e9ce1..e926f25a 100644 --- a/gusto_app_int/src/gusto_app_integration/_version.py +++ b/gusto_app_int/src/gusto_app_integration/_version.py @@ -3,11 +3,11 @@ import importlib.metadata __title__: str = "gusto_app_integration" -__version__: str = "0.3.0" +__version__: str = "0.4.0" __openapi_doc_version__: str = "2024-04-01" -__gen_version__: str = "2.599.0" +__gen_version__: str = "2.730.5" __user_agent__: str = ( - "speakeasy-sdk/python 0.3.0 2.599.0 2024-04-01 gusto_app_integration" + "speakeasy-sdk/python 0.4.0 2.730.5 2024-04-01 gusto_app_integration" ) try: diff --git a/gusto_app_int/src/gusto_app_integration/basesdk.py b/gusto_app_int/src/gusto_app_integration/basesdk.py index a7b6a0c4..b9feb02b 100644 --- a/gusto_app_int/src/gusto_app_integration/basesdk.py +++ b/gusto_app_int/src/gusto_app_integration/basesdk.py @@ -19,9 +19,19 @@ class BaseSDK: sdk_configuration: SDKConfiguration + parent_ref: Optional[object] = None + """ + Reference to the root SDK instance, if any. This will prevent it from + being garbage collected while there are active streams. + """ - def __init__(self, sdk_config: SDKConfiguration) -> None: + def __init__( + self, + sdk_config: SDKConfiguration, + parent_ref: Optional[object] = None, + ) -> None: self.sdk_configuration = sdk_config + self.parent_ref = parent_ref def _get_url(self, base_url, url_variables): sdk_url, sdk_variables = self.sdk_configuration.get_server_details() @@ -222,12 +232,12 @@ def do_request( client = self.sdk_configuration.client logger = self.sdk_configuration.debug_logger + hooks = self.sdk_configuration.__dict__["_hooks"] + def do(): http_res = None try: - req = self.sdk_configuration.get_hooks().before_request( - BeforeRequestContext(hook_ctx), request - ) + req = hooks.before_request(BeforeRequestContext(hook_ctx), request) logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -241,16 +251,14 @@ def do(): http_res = client.send(req, stream=stream) except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error( - AfterErrorContext(hook_ctx), None, e - ) + _, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e) if e is not None: logger.debug("Request Exception", exc_info=True) raise e if http_res is None: logger.debug("Raising no response SDK error") - raise models.APIError("No response received") + raise models.NoResponseError("No response received") logger.debug( "Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s", @@ -261,7 +269,7 @@ def do(): ) if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = self.sdk_configuration.get_hooks().after_error( + result, err = hooks.after_error( AfterErrorContext(hook_ctx), http_res, None ) if err is not None: @@ -271,7 +279,7 @@ def do(): http_res = result else: logger.debug("Raising unexpected SDK error") - raise models.APIError("Unexpected error occurred") + raise models.APIError("Unexpected error occurred", http_res) return http_res @@ -281,9 +289,7 @@ def do(): http_res = do() if not utils.match_status_codes(error_status_codes, http_res.status_code): - http_res = self.sdk_configuration.get_hooks().after_success( - AfterSuccessContext(hook_ctx), http_res - ) + http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) return http_res @@ -298,12 +304,12 @@ async def do_request_async( client = self.sdk_configuration.async_client logger = self.sdk_configuration.debug_logger + hooks = self.sdk_configuration.__dict__["_hooks"] + async def do(): http_res = None try: - req = self.sdk_configuration.get_hooks().before_request( - BeforeRequestContext(hook_ctx), request - ) + req = hooks.before_request(BeforeRequestContext(hook_ctx), request) logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -317,16 +323,14 @@ async def do(): http_res = await client.send(req, stream=stream) except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error( - AfterErrorContext(hook_ctx), None, e - ) + _, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e) if e is not None: logger.debug("Request Exception", exc_info=True) raise e if http_res is None: logger.debug("Raising no response SDK error") - raise models.APIError("No response received") + raise models.NoResponseError("No response received") logger.debug( "Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s", @@ -337,7 +341,7 @@ async def do(): ) if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = self.sdk_configuration.get_hooks().after_error( + result, err = hooks.after_error( AfterErrorContext(hook_ctx), http_res, None ) if err is not None: @@ -347,7 +351,7 @@ async def do(): http_res = result else: logger.debug("Raising unexpected SDK error") - raise models.APIError("Unexpected error occurred") + raise models.APIError("Unexpected error occurred", http_res) return http_res @@ -359,8 +363,6 @@ async def do(): http_res = await do() if not utils.match_status_codes(error_status_codes, http_res.status_code): - http_res = self.sdk_configuration.get_hooks().after_success( - AfterSuccessContext(hook_ctx), http_res - ) + http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) return http_res diff --git a/gusto_app_int/src/gusto_app_integration/companies.py b/gusto_app_int/src/gusto_app_integration/companies.py index 9875b753..f6256a91 100644 --- a/gusto_app_int/src/gusto_app_integration/companies.py +++ b/gusto_app_int/src/gusto_app_integration/companies.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -104,6 +105,7 @@ def provision( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-provision", oauth2_scopes=None, @@ -116,33 +118,20 @@ def provision( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, models.PostV1ProvisionResponseBody - ) + return unmarshal_json_response(models.PostV1ProvisionResponseBody, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["401", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def provision_async( self, @@ -240,6 +229,7 @@ async def provision_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-provision", oauth2_scopes=None, @@ -252,33 +242,20 @@ async def provision_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, models.PostV1ProvisionResponseBody - ) + return unmarshal_json_response(models.PostV1ProvisionResponseBody, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["401", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -349,9 +326,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -360,26 +338,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Company) + return unmarshal_json_response(models.Company, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -450,9 +417,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -461,26 +429,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Company) + return unmarshal_json_response(models.Company, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -560,9 +517,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -572,31 +530,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Company) + return unmarshal_json_response(models.Company, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -676,9 +623,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -688,31 +636,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Company) + return unmarshal_json_response(models.Company, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_admins( self, @@ -786,9 +723,10 @@ def get_admins( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-admins", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -797,26 +735,15 @@ def get_admins( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Admin]) + return unmarshal_json_response(List[models.Admin], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_admins_async( self, @@ -890,9 +817,10 @@ async def get_admins_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-admins", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -901,26 +829,15 @@ async def get_admins_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Admin]) + return unmarshal_json_response(List[models.Admin], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_custom_fields( self, @@ -994,9 +911,10 @@ def get_custom_fields( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-custom_fields", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1005,26 +923,15 @@ def get_custom_fields( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyCustomFieldList) + return unmarshal_json_response(models.CompanyCustomFieldList, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_custom_fields_async( self, @@ -1098,9 +1005,10 @@ async def get_custom_fields_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-custom_fields", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1109,23 +1017,12 @@ async def get_custom_fields_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyCustomFieldList) + return unmarshal_json_response(models.CompanyCustomFieldList, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/companybenefits.py b/gusto_app_int/src/gusto_app_integration/companybenefits.py index 2dd949f1..64425087 100644 --- a/gusto_app_int/src/gusto_app_integration/companybenefits.py +++ b/gusto_app_int/src/gusto_app_integration/companybenefits.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -31,6 +32,8 @@ def create( Note that company benefits can be deactivated only when no employees are enrolled. + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only create company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_id: The UUID of the company @@ -100,9 +103,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-company_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -112,31 +116,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBenefit) + return unmarshal_json_response(models.CompanyBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -161,6 +154,8 @@ async def create_async( Note that company benefits can be deactivated only when no employees are enrolled. + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only create company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_id: The UUID of the company @@ -230,9 +225,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-company_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -242,31 +238,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBenefit) + return unmarshal_json_response(models.CompanyBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list( self, @@ -344,9 +329,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-company_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -355,26 +341,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.CompanyBenefit]) + return unmarshal_json_response(List[models.CompanyBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -452,9 +427,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-company_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -463,26 +439,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.CompanyBenefit]) + return unmarshal_json_response(List[models.CompanyBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_by_id( self, @@ -557,9 +522,10 @@ def get_by_id( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -568,28 +534,17 @@ def get_by_id( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.CompanyBenefitWithEmployeeBenefits + return unmarshal_json_response( + models.CompanyBenefitWithEmployeeBenefits, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_by_id_async( self, @@ -664,9 +619,10 @@ async def get_by_id_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -675,28 +631,17 @@ async def get_by_id_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.CompanyBenefitWithEmployeeBenefits + return unmarshal_json_response( + models.CompanyBenefitWithEmployeeBenefits, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -719,6 +664,8 @@ def update( Note that company benefits can be deactivated only when no employees are enrolled. + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only update company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -784,9 +731,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -796,31 +744,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBenefit) + return unmarshal_json_response(models.CompanyBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -843,6 +780,8 @@ async def update_async( Note that company benefits can be deactivated only when no employees are enrolled. + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only update company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -908,9 +847,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -920,31 +860,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBenefit) + return unmarshal_json_response(models.CompanyBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -965,6 +894,8 @@ def delete( - There are no payroll items associated with the company benefit - The benefit is not managed by a Partner or by Gusto (type must be 'External') + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only delete company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -1015,9 +946,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1029,32 +961,20 @@ def delete( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, - models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, + response_data = unmarshal_json_response( + models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, http_res ) raise models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody( - data=response_data + response_data, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1075,6 +995,8 @@ async def delete_async( - There are no payroll items associated with the company benefit - The benefit is not managed by a Partner or by Gusto (type must be 'External') + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only delete company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -1125,9 +1047,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1139,32 +1062,20 @@ async def delete_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, - models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, + response_data = unmarshal_json_response( + models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, http_res ) raise models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody( - data=response_data + response_data, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list_supported( self, @@ -1231,9 +1142,10 @@ def list_supported( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1242,26 +1154,15 @@ def list_supported( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.SupportedBenefit]) + return unmarshal_json_response(List[models.SupportedBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_supported_async( self, @@ -1328,9 +1229,10 @@ async def list_supported_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1339,26 +1241,15 @@ async def list_supported_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.SupportedBenefit]) + return unmarshal_json_response(List[models.SupportedBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -1428,9 +1319,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1439,26 +1331,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.SupportedBenefit) + return unmarshal_json_response(models.SupportedBenefit, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -1528,9 +1409,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1539,26 +1421,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.SupportedBenefit) + return unmarshal_json_response(models.SupportedBenefit, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_summary( self, @@ -1637,9 +1508,10 @@ def get_summary( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-company_benefit_id-summary", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1648,26 +1520,15 @@ def get_summary( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.BenefitSummary) + return unmarshal_json_response(models.BenefitSummary, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_summary_async( self, @@ -1746,9 +1607,10 @@ async def get_summary_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-company_benefit_id-summary", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1757,26 +1619,15 @@ async def get_summary_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.BenefitSummary) + return unmarshal_json_response(models.BenefitSummary, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_employee_benefits( self, @@ -1854,9 +1705,10 @@ def get_employee_benefits( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company_benefits-company_benefit_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1865,26 +1717,15 @@ def get_employee_benefits( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_employee_benefits_async( self, @@ -1962,9 +1803,10 @@ async def get_employee_benefits_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company_benefits-company_benefit_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1973,26 +1815,15 @@ async def get_employee_benefits_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def bulk_update_employee_benefits( self, @@ -2018,6 +1849,8 @@ def bulk_update_employee_benefits( Benefits containing PHI are only visible to applications with the `employee_benefits:read:phi` scope. + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create or update employee benefits for benefit types that are permitted for the application. + scope: `employee_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -2081,9 +1914,10 @@ def bulk_update_employee_benefits( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company_benefits-company_benefit_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -2093,31 +1927,20 @@ def bulk_update_employee_benefits( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def bulk_update_employee_benefits_async( self, @@ -2143,6 +1966,8 @@ async def bulk_update_employee_benefits_async( Benefits containing PHI are only visible to applications with the `employee_benefits:read:phi` scope. + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create or update employee benefits for benefit types that are permitted for the application. + scope: `employee_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -2206,9 +2031,10 @@ async def bulk_update_employee_benefits_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company_benefits-company_benefit_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -2218,31 +2044,20 @@ async def bulk_update_employee_benefits_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_requirements( self, @@ -2310,9 +2125,10 @@ def get_requirements( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-benefits_id-requirements", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -2321,26 +2137,15 @@ def get_requirements( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.BenefitTypeRequirements) + return unmarshal_json_response(models.BenefitTypeRequirements, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_requirements_async( self, @@ -2408,9 +2213,10 @@ async def get_requirements_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-benefits_id-requirements", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -2419,23 +2225,422 @@ async def get_requirements_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.BenefitTypeRequirements) + return unmarshal_json_response(models.BenefitTypeRequirements, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_v1_company_benefits_company_benefit_id_contribution_exclusions( + self, + *, + company_benefit_id: str, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContributionExclusion]: + r"""Get contribution exclusions for a company benefit + + Returns all contributions for a given company benefit and whether they are excluded or not. + + Currently this endpoint only works for 401-k and Roth 401-k benefit types. + + scope: `company_benefits:read` + + :param company_benefit_id: The UUID of the company benefit + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest( + company_benefit_id=company_benefit_id, + x_gusto_api_version=x_gusto_api_version, + ) + ) + + req = self._build_request( + method="GET", + path="/v1/company_benefits/{company_benefit_id}/contribution_exclusions", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-company_benefits-company_benefit_id-contribution_exclusions", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.ContributionExclusion], http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_company_benefits_company_benefit_id_contribution_exclusions_async( + self, + *, + company_benefit_id: str, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContributionExclusion]: + r"""Get contribution exclusions for a company benefit + + Returns all contributions for a given company benefit and whether they are excluded or not. + + Currently this endpoint only works for 401-k and Roth 401-k benefit types. + + scope: `company_benefits:read` + + :param company_benefit_id: The UUID of the company benefit + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest( + company_benefit_id=company_benefit_id, + x_gusto_api_version=x_gusto_api_version, ) + ) + + req = self._build_request_async( + method="GET", + path="/v1/company_benefits/{company_benefit_id}/contribution_exclusions", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-company_benefits-company_benefit_id-contribution_exclusions", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.ContributionExclusion], http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def put_v1_company_benefits_company_benefit_id_contribution_exclusions( + self, + *, + company_benefit_id: str, + contribution_exclusions: Union[ + List[models.ContributionExclusion], + List[models.ContributionExclusionTypedDict], + ], + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContributionExclusion]: + r"""Update contribution exclusions for a company benefit + + Updates contribution exclusions for a given company benefit. + + Currently this endpoint only works for 401-k and Roth 401-k benefit types. + + scope: `company_benefits:write` + + :param company_benefit_id: The UUID of the company benefit + :param contribution_exclusions: The list of contribution exclusions to update + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest( + company_benefit_id=company_benefit_id, + x_gusto_api_version=x_gusto_api_version, + request_body=models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody( + contribution_exclusions=utils.get_pydantic_model( + contribution_exclusions, List[models.ContributionExclusion] + ), + ), + ) + + req = self._build_request( + method="PUT", + path="/v1/company_benefits/{company_benefit_id}/contribution_exclusions", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="put-v1-company_benefits-company_benefit_id-contribution_exclusions", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.ContributionExclusion], http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def put_v1_company_benefits_company_benefit_id_contribution_exclusions_async( + self, + *, + company_benefit_id: str, + contribution_exclusions: Union[ + List[models.ContributionExclusion], + List[models.ContributionExclusionTypedDict], + ], + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContributionExclusion]: + r"""Update contribution exclusions for a company benefit + + Updates contribution exclusions for a given company benefit. + + Currently this endpoint only works for 401-k and Roth 401-k benefit types. + + scope: `company_benefits:write` + + :param company_benefit_id: The UUID of the company benefit + :param contribution_exclusions: The list of contribution exclusions to update + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest( + company_benefit_id=company_benefit_id, + x_gusto_api_version=x_gusto_api_version, + request_body=models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody( + contribution_exclusions=utils.get_pydantic_model( + contribution_exclusions, List[models.ContributionExclusion] + ), + ), + ) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, + req = self._build_request_async( + method="PUT", + path="/v1/company_benefits/{company_benefit_id}/contribution_exclusions", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody, + ), + timeout_ms=timeout_ms, ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="put-v1-company_benefits-company_benefit_id-contribution_exclusions", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.ContributionExclusion], http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/companylocations.py b/gusto_app_int/src/gusto_app_integration/companylocations.py index 51d99d10..43e409ee 100644 --- a/gusto_app_int/src/gusto_app_integration/companylocations.py +++ b/gusto_app_int/src/gusto_app_integration/companylocations.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import List, Mapping, Optional @@ -82,9 +83,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-locations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -93,26 +95,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Location]) + return unmarshal_json_response(List[models.Location], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -188,9 +179,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-locations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -199,23 +191,12 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Location]) + return unmarshal_json_response(List[models.Location], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/contractorpaymentgroups.py b/gusto_app_int/src/gusto_app_integration/contractorpaymentgroups.py deleted file mode 100644 index 01681d1c..00000000 --- a/gusto_app_int/src/gusto_app_integration/contractorpaymentgroups.py +++ /dev/null @@ -1,698 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from .basesdk import BaseSDK -from datetime import date -from gusto_app_integration import models, utils -from gusto_app_integration._hooks import HookContext -from gusto_app_integration.types import OptionalNullable, UNSET -from typing import Any, List, Mapping, Optional, Union - - -class ContractorPaymentGroups(BaseSDK): - def get( - self, - *, - company_id: str, - start_date: Optional[str] = None, - end_date: Optional[str] = None, - page: Optional[int] = None, - per: Optional[int] = None, - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.ContractorPaymentGroupMinimal]: - r"""Get contractor payment groups for a company - - Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. - - scope: `payrolls:read` - - :param company_id: The UUID of the company - :param start_date: The time period for which to retrieve contractor payment groups. Defaults to 6 months ago. - :param end_date: The time period for which to retrieve contractor payment groups. Defaults to today's date. - :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. - :param per: Number of objects per page. For majority of endpoints will default to 25 - :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.GetV1CompaniesCompanyIDContractorPaymentGroupsRequest( - company_id=company_id, - start_date=start_date, - end_date=end_date, - page=page, - per=per, - x_gusto_api_version=x_gusto_api_version, - ) - - req = self._build_request( - method="GET", - path="/v1/companies/{company_id}/contractor_payment_groups", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=True, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = self.do_request( - hook_ctx=HookContext( - base_url=base_url or "", - operation_id="get-v1-companies-company_id-contractor_payment_groups", - oauth2_scopes=[], - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["404", "4XX", "5XX"], - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.ContractorPaymentGroupMinimal] - ) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) - - async def get_async( - self, - *, - company_id: str, - start_date: Optional[str] = None, - end_date: Optional[str] = None, - page: Optional[int] = None, - per: Optional[int] = None, - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.ContractorPaymentGroupMinimal]: - r"""Get contractor payment groups for a company - - Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. - - scope: `payrolls:read` - - :param company_id: The UUID of the company - :param start_date: The time period for which to retrieve contractor payment groups. Defaults to 6 months ago. - :param end_date: The time period for which to retrieve contractor payment groups. Defaults to today's date. - :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. - :param per: Number of objects per page. For majority of endpoints will default to 25 - :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.GetV1CompaniesCompanyIDContractorPaymentGroupsRequest( - company_id=company_id, - start_date=start_date, - end_date=end_date, - page=page, - per=per, - x_gusto_api_version=x_gusto_api_version, - ) - - req = self._build_request_async( - method="GET", - path="/v1/companies/{company_id}/contractor_payment_groups", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=True, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - base_url=base_url or "", - operation_id="get-v1-companies-company_id-contractor_payment_groups", - oauth2_scopes=[], - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["404", "4XX", "5XX"], - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.ContractorPaymentGroupMinimal] - ) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) - - def preview( - self, - *, - company_id: str, - check_date: date, - contractor_payments: Union[ - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments - ], - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict - ], - ], - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - creation_token: Optional[str] = None, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ContractorPaymentGroup: - r"""Preview a contractor payment group - - Preview a group of contractor payments. Request will validate inputs and return preview of the contractor payment group including the expected debit_date. Uuid will be null in the response. - - scope: `payrolls:read` - - :param company_id: The UUID of the company - :param check_date: The payment check date - :param contractor_payments: - :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param creation_token: Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest( - company_id=company_id, - x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody( - check_date=check_date, - creation_token=creation_token, - contractor_payments=utils.get_pydantic_model( - contractor_payments, - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments - ], - ), - ), - ) - - req = self._build_request( - method="POST", - path="/v1/companies/{company_id}/contractor_payment_groups/preview", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=True, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody, - ), - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = self.do_request( - hook_ctx=HookContext( - base_url=base_url or "", - operation_id="post-v1-companies-company_id-contractor_payment_groups-preview", - oauth2_scopes=[], - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["404", "422", "4XX", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData - ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) - - async def preview_async( - self, - *, - company_id: str, - check_date: date, - contractor_payments: Union[ - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments - ], - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict - ], - ], - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - creation_token: Optional[str] = None, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ContractorPaymentGroup: - r"""Preview a contractor payment group - - Preview a group of contractor payments. Request will validate inputs and return preview of the contractor payment group including the expected debit_date. Uuid will be null in the response. - - scope: `payrolls:read` - - :param company_id: The UUID of the company - :param check_date: The payment check date - :param contractor_payments: - :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param creation_token: Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest( - company_id=company_id, - x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody( - check_date=check_date, - creation_token=creation_token, - contractor_payments=utils.get_pydantic_model( - contractor_payments, - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments - ], - ), - ), - ) - - req = self._build_request_async( - method="POST", - path="/v1/companies/{company_id}/contractor_payment_groups/preview", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=True, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody, - ), - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - base_url=base_url or "", - operation_id="post-v1-companies-company_id-contractor_payment_groups-preview", - oauth2_scopes=[], - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["404", "422", "4XX", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData - ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) - - def fetch( - self, - *, - contractor_payment_group_uuid: str, - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ContractorPaymentGroup: - r"""Fetch a contractor payment group - - Returns a contractor payment group with all associated contractor payments. - - scope: `payrolls:read` - - :param contractor_payment_group_uuid: The UUID of the contractor payment group - :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest( - contractor_payment_group_uuid=contractor_payment_group_uuid, - x_gusto_api_version=x_gusto_api_version, - ) - - req = self._build_request( - method="GET", - path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=True, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = self.do_request( - hook_ctx=HookContext( - base_url=base_url or "", - operation_id="get-v1-contractor_payment_groups-contractor_payment_group_id", - oauth2_scopes=[], - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["404", "4XX", "5XX"], - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) - - async def fetch_async( - self, - *, - contractor_payment_group_uuid: str, - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ContractorPaymentGroup: - r"""Fetch a contractor payment group - - Returns a contractor payment group with all associated contractor payments. - - scope: `payrolls:read` - - :param contractor_payment_group_uuid: The UUID of the contractor payment group - :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest( - contractor_payment_group_uuid=contractor_payment_group_uuid, - x_gusto_api_version=x_gusto_api_version, - ) - - req = self._build_request_async( - method="GET", - path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=True, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - base_url=base_url or "", - operation_id="get-v1-contractor_payment_groups-contractor_payment_group_id", - oauth2_scopes=[], - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["404", "4XX", "5XX"], - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) diff --git a/gusto_app_int/src/gusto_app_integration/contractorpayments.py b/gusto_app_int/src/gusto_app_integration/contractorpayments.py index d6f52f2d..b9bd0531 100644 --- a/gusto_app_int/src/gusto_app_integration/contractorpayments.py +++ b/gusto_app_int/src/gusto_app_integration/contractorpayments.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional @@ -92,9 +93,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-contractor_payments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -103,29 +105,17 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, - models.GetV1CompaniesCompanyIDContractorPaymentsResponseBody, + return unmarshal_json_response( + models.GetV1CompaniesCompanyIDContractorPaymentsResponseBody, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -211,9 +201,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-contractor_payments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -222,29 +213,17 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, - models.GetV1CompaniesCompanyIDContractorPaymentsResponseBody, + return unmarshal_json_response( + models.GetV1CompaniesCompanyIDContractorPaymentsResponseBody, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_by_id( self, @@ -316,9 +295,10 @@ def get_by_id( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-contractor_payment-contractor-payment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -327,26 +307,15 @@ def get_by_id( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPayment) + return unmarshal_json_response(models.ContractorPayment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_by_id_async( self, @@ -418,9 +387,10 @@ async def get_by_id_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-contractor_payment-contractor-payment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -429,23 +399,12 @@ async def get_by_id_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPayment) + return unmarshal_json_response(models.ContractorPayment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/contractors.py b/gusto_app_int/src/gusto_app_integration/contractors.py index e9669feb..a7b61220 100644 --- a/gusto_app_int/src/gusto_app_integration/contractors.py +++ b/gusto_app_int/src/gusto_app_integration/contractors.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -130,9 +131,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_uuid-contractors", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -142,31 +144,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -290,9 +281,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_uuid-contractors", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -302,31 +294,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -335,6 +316,7 @@ def get( page: Optional[int] = None, per: Optional[int] = None, search_term: Optional[str] = None, + sort_by: Optional[models.ContractorsSortBy] = None, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -353,6 +335,7 @@ def get( :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 :param search_term: A string to search for in the object's names + :param sort_by: Sort contractors. Options: type, onboarding_status, name, created_at :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -374,6 +357,7 @@ def get( page=page, per=per, search_term=search_term, + sort_by=sort_by, x_gusto_api_version=x_gusto_api_version, ) @@ -403,9 +387,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_uuid-contractors", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -414,26 +399,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Contractor]) + return unmarshal_json_response(List[models.Contractor], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -442,6 +416,7 @@ async def get_async( page: Optional[int] = None, per: Optional[int] = None, search_term: Optional[str] = None, + sort_by: Optional[models.ContractorsSortBy] = None, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -460,6 +435,7 @@ async def get_async( :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 :param search_term: A string to search for in the object's names + :param sort_by: Sort contractors. Options: type, onboarding_status, name, created_at :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -481,6 +457,7 @@ async def get_async( page=page, per=per, search_term=search_term, + sort_by=sort_by, x_gusto_api_version=x_gusto_api_version, ) @@ -510,9 +487,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_uuid-contractors", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -521,26 +499,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Contractor]) + return unmarshal_json_response(List[models.Contractor], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_by_id( self, @@ -608,9 +575,10 @@ def get_by_id( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -619,26 +587,15 @@ def get_by_id( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_by_id_async( self, @@ -706,9 +663,10 @@ async def get_by_id_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -717,26 +675,15 @@ async def get_by_id_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -867,9 +814,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractors-contractor_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -879,31 +827,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -1034,9 +971,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractors-contractor_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1046,28 +984,271 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_v1_companies_company_id_contractors_payment_details( + self, + *, + company_id: str, + contractor_uuid: Optional[str] = None, + contractor_payment_group_uuid: Optional[str] = None, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContractorPaymentDetailsList]: + r"""List contractor payment details + + Get payment details for contractors in a company. This endpoint returns a list of all contractors + associated with the specified company, including their payment methods and bank account details + if they are paid via direct deposit. + + For contractors paid by direct deposit, the response includes their bank account information + with sensitive data masked for security. The payment details also include information about + how their payments are split if they have multiple bank accounts configured. + + For contractors paid by check, only the basic payment method information is returned. + + ### Response Details + - For direct deposit contractors: + - Bank account details (masked) + - Payment splits configuration + - Routing numbers + - Account types + - For check payments: + - Basic payment method designation + + ### Common Use Cases + - Fetching contractor payment information for payroll processing + - Verifying contractor payment methods + - Reviewing payment split configurations + + `encrypted_account_number` is available only with the additional scope `contractor_payment_methods:read:account_numbers`. + + scope: `contractor_payment_methods:read` + + + :param company_id: The UUID of the company. This identifies the company whose contractor payment details you want to retrieve. + :param contractor_uuid: Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor. + :param contractor_payment_group_uuid: Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest( + company_id=company_id, + contractor_uuid=contractor_uuid, + contractor_payment_group_uuid=contractor_payment_group_uuid, + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request( + method="GET", + path="/v1/companies/{company_id}/contractors/payment_details", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-contractors-payment_details", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.ContractorPaymentDetailsList], http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_companies_company_id_contractors_payment_details_async( + self, + *, + company_id: str, + contractor_uuid: Optional[str] = None, + contractor_payment_group_uuid: Optional[str] = None, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContractorPaymentDetailsList]: + r"""List contractor payment details + + Get payment details for contractors in a company. This endpoint returns a list of all contractors + associated with the specified company, including their payment methods and bank account details + if they are paid via direct deposit. + + For contractors paid by direct deposit, the response includes their bank account information + with sensitive data masked for security. The payment details also include information about + how their payments are split if they have multiple bank accounts configured. + + For contractors paid by check, only the basic payment method information is returned. + + ### Response Details + - For direct deposit contractors: + - Bank account details (masked) + - Payment splits configuration + - Routing numbers + - Account types + - For check payments: + - Basic payment method designation + + ### Common Use Cases + - Fetching contractor payment information for payroll processing + - Verifying contractor payment methods + - Reviewing payment split configurations + + `encrypted_account_number` is available only with the additional scope `contractor_payment_methods:read:account_numbers`. + + scope: `contractor_payment_methods:read` + + + :param company_id: The UUID of the company. This identifies the company whose contractor payment details you want to retrieve. + :param contractor_uuid: Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor. + :param contractor_payment_group_uuid: Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, + request = models.GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest( + company_id=company_id, + contractor_uuid=contractor_uuid, + contractor_payment_group_uuid=contractor_payment_group_uuid, + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request_async( + method="GET", + path="/v1/companies/{company_id}/contractors/payment_details", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-contractors-payment_details", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.ContractorPaymentDetailsList], http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/departments.py b/gusto_app_int/src/gusto_app_integration/departments.py index 99805fcc..f1951466 100644 --- a/gusto_app_int/src/gusto_app_integration/departments.py +++ b/gusto_app_int/src/gusto_app_integration/departments.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -86,9 +87,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -98,31 +100,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -202,9 +193,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -214,31 +206,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_all( self, @@ -306,9 +287,10 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -317,26 +299,15 @@ def get_all( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Department]) + return unmarshal_json_response(List[models.Department], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_all_async( self, @@ -404,9 +375,10 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -415,26 +387,15 @@ async def get_all_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Department]) + return unmarshal_json_response(List[models.Department], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -503,9 +464,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -514,26 +476,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -602,9 +553,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -613,26 +565,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -715,9 +656,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -727,31 +669,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -834,9 +765,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -846,31 +778,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -939,9 +860,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -953,29 +875,18 @@ def delete( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1044,9 +955,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1058,29 +970,18 @@ async def delete_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def add_people( self, @@ -1182,9 +1083,10 @@ def add_people( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-add-people-to-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1193,26 +1095,15 @@ def add_people( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def add_people_async( self, @@ -1314,9 +1205,10 @@ async def add_people_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-add-people-to-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1325,26 +1217,15 @@ async def add_people_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def remove_people( self, @@ -1447,9 +1328,10 @@ def remove_people( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-remove-people-from-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1458,26 +1340,15 @@ def remove_people( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def remove_people_async( self, @@ -1580,9 +1451,10 @@ async def remove_people_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-remove-people-from-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1591,23 +1463,12 @@ async def remove_people_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/earningtypes.py b/gusto_app_int/src/gusto_app_integration/earningtypes.py index 2574f45e..eb8d9910 100644 --- a/gusto_app_int/src/gusto_app_integration/earningtypes.py +++ b/gusto_app_int/src/gusto_app_integration/earningtypes.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Mapping, Optional @@ -88,9 +89,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-earning_types", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -100,31 +102,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningType) + return unmarshal_json_response(models.EarningType, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -206,9 +197,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-earning_types", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -218,31 +210,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningType) + return unmarshal_json_response(models.EarningType, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -316,9 +297,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-earning_types", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -327,26 +309,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningTypeList) + return unmarshal_json_response(models.EarningTypeList, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -420,9 +391,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-earning_types", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -431,26 +403,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningTypeList) + return unmarshal_json_response(models.EarningTypeList, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -533,9 +494,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-earning_types-earning_type_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -545,31 +507,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningType) + return unmarshal_json_response(models.EarningType, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -652,9 +603,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-earning_types-earning_type_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -664,31 +616,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningType) + return unmarshal_json_response(models.EarningType, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def deactivate( self, @@ -759,9 +700,10 @@ def deactivate( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-companies-company_id-earning_types-earning_type_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -773,23 +715,12 @@ def deactivate( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def deactivate_async( self, @@ -860,9 +791,10 @@ async def deactivate_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-companies-company_id-earning_types-earning_type_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -874,20 +806,9 @@ async def deactivate_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/employeeaddresses.py b/gusto_app_int/src/gusto_app_integration/employeeaddresses.py index 07f4a2ab..665923b4 100644 --- a/gusto_app_int/src/gusto_app_integration/employeeaddresses.py +++ b/gusto_app_int/src/gusto_app_integration/employeeaddresses.py @@ -5,6 +5,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -14,8 +15,8 @@ def list_home_addresses( *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -29,6 +30,7 @@ def list_home_addresses( scope: `employees:read` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -77,9 +79,10 @@ def list_home_addresses( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-home_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -87,35 +90,30 @@ def list_home_addresses( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeAddress]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.EmployeeAddress], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_home_addresses_async( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -129,6 +127,7 @@ async def list_home_addresses_async( scope: `employees:read` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -177,9 +176,10 @@ async def list_home_addresses_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-home_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -187,41 +187,36 @@ async def list_home_addresses_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeAddress]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.EmployeeAddress], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_1: Optional[str] = None, street_2: OptionalNullable[str] = UNSET, city: Optional[str] = None, state: Optional[str] = None, zip_code: Optional[str] = None, - effective_date: Optional[date] = None, + effective_date: OptionalNullable[date] = UNSET, courtesy_withholding: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -236,6 +231,7 @@ def create( scope: `employees:write` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param street_1: @@ -307,9 +303,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-home_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -319,45 +316,34 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_1: Optional[str] = None, street_2: OptionalNullable[str] = UNSET, city: Optional[str] = None, state: Optional[str] = None, zip_code: Optional[str] = None, - effective_date: Optional[date] = None, + effective_date: OptionalNullable[date] = UNSET, courtesy_withholding: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -372,6 +358,7 @@ async def create_async( scope: `employees:write` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param street_1: @@ -443,9 +430,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-home_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -455,39 +443,28 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, *, home_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -501,6 +478,7 @@ def get( scope: `employees:read` + :param home_address_uuid: The UUID of the home address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -549,9 +527,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -559,35 +538,30 @@ def get( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, *, home_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -601,6 +575,7 @@ async def get_async( scope: `employees:read` + :param home_address_uuid: The UUID of the home address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -649,9 +624,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -659,27 +635,22 @@ async def get_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -687,14 +658,14 @@ def update( home_address_uuid: str, version: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_1: Optional[str] = None, street_2: OptionalNullable[str] = UNSET, city: Optional[str] = None, state: Optional[str] = None, zip_code: Optional[str] = None, - effective_date: Optional[date] = None, + effective_date: OptionalNullable[date] = UNSET, courtesy_withholding: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -709,8 +680,9 @@ def update( scope: `employees:write` + :param home_address_uuid: The UUID of the home address - :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param street_1: :param street_2: @@ -735,8 +707,8 @@ def update( base_url = self._get_url(base_url, url_variables) request = models.PutV1HomeAddressesHomeAddressUUIDRequest( - home_address_uuid=home_address_uuid, x_gusto_api_version=x_gusto_api_version, + home_address_uuid=home_address_uuid, request_body=models.PutV1HomeAddressesHomeAddressUUIDRequestBody( version=version, street_1=street_1, @@ -782,9 +754,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -794,31 +767,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -826,14 +788,14 @@ async def update_async( home_address_uuid: str, version: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_1: Optional[str] = None, street_2: OptionalNullable[str] = UNSET, city: Optional[str] = None, state: Optional[str] = None, zip_code: Optional[str] = None, - effective_date: Optional[date] = None, + effective_date: OptionalNullable[date] = UNSET, courtesy_withholding: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -848,8 +810,9 @@ async def update_async( scope: `employees:write` + :param home_address_uuid: The UUID of the home address - :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param street_1: :param street_2: @@ -874,8 +837,8 @@ async def update_async( base_url = self._get_url(base_url, url_variables) request = models.PutV1HomeAddressesHomeAddressUUIDRequest( - home_address_uuid=home_address_uuid, x_gusto_api_version=x_gusto_api_version, + home_address_uuid=home_address_uuid, request_body=models.PutV1HomeAddressesHomeAddressUUIDRequestBody( version=version, street_1=street_1, @@ -921,9 +884,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -933,39 +897,28 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_home_address( self, *, home_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -973,10 +926,11 @@ def delete_home_address( ): r"""Delete an employee's home address - Used for deleting an employee's home address. Cannot delete the employee's active home address. + Used for deleting an employee's home address. Cannot delete the employee's active home address. scope: `employees:write` + :param home_address_uuid: The UUID of the home address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -995,8 +949,8 @@ def delete_home_address( base_url = self._get_url(base_url, url_variables) request = models.DeleteV1HomeAddressesHomeAddressUUIDRequest( - home_address_uuid=home_address_uuid, x_gusto_api_version=x_gusto_api_version, + home_address_uuid=home_address_uuid, ) req = self._build_request( @@ -1009,7 +963,7 @@ def delete_home_address( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value="*/*", http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, @@ -1025,9 +979,10 @@ def delete_home_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1035,41 +990,24 @@ def delete_home_address( retry_config=retry_config, ) - response_data: Any = None if utils.match_response(http_res, "204", "*"): return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData - ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + if utils.match_response(http_res, ["404", "422", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_home_address_async( self, *, home_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1077,10 +1015,11 @@ async def delete_home_address_async( ): r"""Delete an employee's home address - Used for deleting an employee's home address. Cannot delete the employee's active home address. + Used for deleting an employee's home address. Cannot delete the employee's active home address. scope: `employees:write` + :param home_address_uuid: The UUID of the home address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -1099,8 +1038,8 @@ async def delete_home_address_async( base_url = self._get_url(base_url, url_variables) request = models.DeleteV1HomeAddressesHomeAddressUUIDRequest( - home_address_uuid=home_address_uuid, x_gusto_api_version=x_gusto_api_version, + home_address_uuid=home_address_uuid, ) req = self._build_request_async( @@ -1113,7 +1052,7 @@ async def delete_home_address_async( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value="*/*", http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, @@ -1129,9 +1068,10 @@ async def delete_home_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1139,41 +1079,24 @@ async def delete_home_address_async( retry_config=retry_config, ) - response_data: Any = None if utils.match_response(http_res, "204", "*"): return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData - ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + if utils.match_response(http_res, ["404", "422", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_work_addresses( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1181,11 +1104,12 @@ def get_work_addresses( ) -> List[models.EmployeeWorkAddress]: r"""Get an employee's work addresses - Returns a list of an employee's work addresses. Each address includes its effective date and a boolean - signifying if it is the currently active work address. + Returns a list of an employee's work addresses. Each address includes its effective + date and a boolean signifying if it is the currently active work address. scope: `employees:read` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -1234,9 +1158,10 @@ def get_work_addresses( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-work_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1244,35 +1169,30 @@ def get_work_addresses( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeWorkAddress]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.EmployeeWorkAddress], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_work_addresses_async( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1280,11 +1200,12 @@ async def get_work_addresses_async( ) -> List[models.EmployeeWorkAddress]: r"""Get an employee's work addresses - Returns a list of an employee's work addresses. Each address includes its effective date and a boolean - signifying if it is the currently active work address. + Returns a list of an employee's work addresses. Each address includes its effective + date and a boolean signifying if it is the currently active work address. scope: `employees:read` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -1333,9 +1254,10 @@ async def get_work_addresses_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-work_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1343,35 +1265,30 @@ async def get_work_addresses_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeWorkAddress]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.EmployeeWorkAddress], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create_work_address( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid: Optional[str] = None, effective_date: Optional[date] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1385,6 +1302,7 @@ def create_work_address( scope: `employees:manage` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param location_uuid: Reference to a company location @@ -1446,9 +1364,10 @@ def create_work_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-work_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1458,39 +1377,28 @@ def create_work_address( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_work_address_async( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid: Optional[str] = None, effective_date: Optional[date] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1504,6 +1412,7 @@ async def create_work_address_async( scope: `employees:manage` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param location_uuid: Reference to a company location @@ -1565,9 +1474,10 @@ async def create_work_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-work_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1577,39 +1487,28 @@ async def create_work_address_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_work_address( self, *, work_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1621,6 +1520,7 @@ def get_work_address( scope: `employees:read` + :param work_address_uuid: The UUID of the work address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -1669,9 +1569,10 @@ def get_work_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1679,35 +1580,30 @@ def get_work_address( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_work_address_async( self, *, work_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1719,6 +1615,7 @@ async def get_work_address_async( scope: `employees:read` + :param work_address_uuid: The UUID of the work address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -1767,9 +1664,10 @@ async def get_work_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1777,27 +1675,22 @@ async def get_work_address_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_work_address( self, @@ -1805,8 +1698,8 @@ def update_work_address( work_address_uuid: str, version: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid: Optional[str] = None, effective_date: Optional[date] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1820,8 +1713,9 @@ def update_work_address( scope: `employees:manage` + :param work_address_uuid: The UUID of the work address - :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param location_uuid: Reference to a company location :param effective_date: @@ -1844,9 +1738,9 @@ def update_work_address( work_address_uuid=work_address_uuid, x_gusto_api_version=x_gusto_api_version, request_body=models.PutV1WorkAddressesWorkAddressUUIDRequestBody( + version=version, location_uuid=location_uuid, effective_date=effective_date, - version=version, ), ) @@ -1883,9 +1777,10 @@ def update_work_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1895,31 +1790,20 @@ def update_work_address( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_work_address_async( self, @@ -1927,8 +1811,8 @@ async def update_work_address_async( work_address_uuid: str, version: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid: Optional[str] = None, effective_date: Optional[date] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1942,8 +1826,9 @@ async def update_work_address_async( scope: `employees:manage` + :param work_address_uuid: The UUID of the work address - :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param location_uuid: Reference to a company location :param effective_date: @@ -1966,9 +1851,9 @@ async def update_work_address_async( work_address_uuid=work_address_uuid, x_gusto_api_version=x_gusto_api_version, request_body=models.PutV1WorkAddressesWorkAddressUUIDRequestBody( + version=version, location_uuid=location_uuid, effective_date=effective_date, - version=version, ), ) @@ -2005,9 +1890,10 @@ async def update_work_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -2017,39 +1903,28 @@ async def update_work_address_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_work_address( self, *, work_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2057,10 +1932,11 @@ def delete_work_address( ): r"""Delete an employee's work address - Used for deleting an employee's work address. Cannot delete the employee's active work address. + Used for deleting an employee's work address. Cannot delete the employee's active work address. scope: `employees:manage` + :param work_address_uuid: The UUID of the work address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -2109,9 +1985,10 @@ def delete_work_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -2122,38 +1999,27 @@ def delete_work_address( response_data: Any = None if utils.match_response(http_res, "204", "*"): return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_work_address_async( self, *, work_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2161,10 +2027,11 @@ async def delete_work_address_async( ): r"""Delete an employee's work address - Used for deleting an employee's work address. Cannot delete the employee's active work address. + Used for deleting an employee's work address. Cannot delete the employee's active work address. scope: `employees:manage` + :param work_address_uuid: The UUID of the work address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -2213,9 +2080,10 @@ async def delete_work_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -2226,27 +2094,16 @@ async def delete_work_address_async( response_data: Any = None if utils.match_response(http_res, "204", "*"): return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/employeebenefits.py b/gusto_app_int/src/gusto_app_integration/employeebenefits.py index 4eacd101..088eb16e 100644 --- a/gusto_app_int/src/gusto_app_integration/employeebenefits.py +++ b/gusto_app_int/src/gusto_app_integration/employeebenefits.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -46,7 +47,9 @@ def create( ) -> models.EmployeeBenefit: r"""Create an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -142,9 +145,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -154,31 +158,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -218,7 +211,9 @@ async def create_async( ) -> models.EmployeeBenefit: r"""Create an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -314,9 +309,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -326,31 +322,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_all( self, @@ -428,9 +413,10 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -439,26 +425,15 @@ def get_all( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_all_async( self, @@ -536,9 +511,10 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -547,26 +523,15 @@ async def get_all_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -636,9 +601,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -647,26 +613,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -736,9 +691,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -747,26 +703,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -806,7 +751,9 @@ def update( ) -> models.EmployeeBenefit: r"""Update an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only update employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -900,9 +847,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -912,31 +860,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -976,7 +913,9 @@ async def update_async( ) -> models.EmployeeBenefit: r"""Update an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only update employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -1070,9 +1009,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1082,31 +1022,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -1122,7 +1051,9 @@ def delete( ): r"""Delete an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only delete employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -1174,9 +1105,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1188,23 +1120,12 @@ def delete( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1220,7 +1141,9 @@ async def delete_async( ): r"""Delete an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only delete employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -1272,9 +1195,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1286,23 +1210,12 @@ async def delete_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_ytd_benefit_amounts_from_different_company( self, @@ -1376,9 +1289,10 @@ def get_ytd_benefit_amounts_from_different_company( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-employee-ytd-benefit-amounts-from-different-company", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1387,28 +1301,17 @@ def get_ytd_benefit_amounts_from_different_company( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.YtdBenefitAmountsFromDifferentCompany] + return unmarshal_json_response( + List[models.YtdBenefitAmountsFromDifferentCompany], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_ytd_benefit_amounts_from_different_company_async( self, @@ -1482,9 +1385,10 @@ async def get_ytd_benefit_amounts_from_different_company_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-employee-ytd-benefit-amounts-from-different-company", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1493,28 +1397,17 @@ async def get_ytd_benefit_amounts_from_different_company_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.YtdBenefitAmountsFromDifferentCompany] + return unmarshal_json_response( + List[models.YtdBenefitAmountsFromDifferentCompany], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create_ytd_benefit_amounts_from_different_company( self, @@ -1605,9 +1498,10 @@ def create_ytd_benefit_amounts_from_different_company( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-employee-ytd-benefit-amounts-from-different-company", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1619,29 +1513,18 @@ def create_ytd_benefit_amounts_from_different_company( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_ytd_benefit_amounts_from_different_company_async( self, @@ -1732,9 +1615,10 @@ async def create_ytd_benefit_amounts_from_different_company_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-employee-ytd-benefit-amounts-from-different-company", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1746,26 +1630,15 @@ async def create_ytd_benefit_amounts_from_different_company_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/employeeemployments.py b/gusto_app_int/src/gusto_app_integration/employeeemployments.py index 0b27f911..3ea592f9 100644 --- a/gusto_app_int/src/gusto_app_integration/employeeemployments.py +++ b/gusto_app_int/src/gusto_app_integration/employeeemployments.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -91,9 +92,10 @@ def create_termination( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -103,31 +105,20 @@ def create_termination( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Termination) + return unmarshal_json_response(models.Termination, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_termination_async( self, @@ -212,9 +203,10 @@ async def create_termination_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -224,31 +216,20 @@ async def create_termination_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Termination) + return unmarshal_json_response(models.Termination, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_termination( self, @@ -316,9 +297,10 @@ def delete_termination( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -330,29 +312,18 @@ def delete_termination( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_termination_async( self, @@ -420,9 +391,10 @@ async def delete_termination_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -434,29 +406,18 @@ async def delete_termination_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_termination( self, @@ -544,9 +505,10 @@ def update_termination( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-terminations-employee_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -556,31 +518,20 @@ def update_termination( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Termination) + return unmarshal_json_response(models.Termination, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_termination_async( self, @@ -668,9 +619,10 @@ async def update_termination_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-terminations-employee_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -680,31 +632,20 @@ async def update_termination_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Termination) + return unmarshal_json_response(models.Termination, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create_rehire( self, @@ -792,9 +733,10 @@ def create_rehire( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -804,31 +746,20 @@ def create_rehire( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_rehire_async( self, @@ -916,9 +847,10 @@ async def create_rehire_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -928,31 +860,20 @@ async def create_rehire_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_rehire( self, @@ -1049,9 +970,10 @@ def update_rehire( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1061,31 +983,20 @@ def update_rehire( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_rehire_async( self, @@ -1182,9 +1093,10 @@ async def update_rehire_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1194,31 +1106,20 @@ async def update_rehire_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_rehire( self, @@ -1286,9 +1187,10 @@ def get_rehire( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1298,31 +1200,20 @@ def get_rehire( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_rehire_async( self, @@ -1390,9 +1281,10 @@ async def get_rehire_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1402,31 +1294,20 @@ async def get_rehire_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_rehire( self, @@ -1494,9 +1375,10 @@ def delete_rehire( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1508,29 +1390,18 @@ def delete_rehire( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_rehire_async( self, @@ -1598,9 +1469,10 @@ async def delete_rehire_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1612,29 +1484,18 @@ async def delete_rehire_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_history( self, @@ -1703,9 +1564,10 @@ def get_history( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-employment_history", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1715,33 +1577,20 @@ def get_history( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.EmploymentHistoryList] - ) + return unmarshal_json_response(List[models.EmploymentHistoryList], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_history_async( self, @@ -1810,9 +1659,10 @@ async def get_history_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-employment_history", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1822,30 +1672,17 @@ async def get_history_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.EmploymentHistoryList] - ) + return unmarshal_json_response(List[models.EmploymentHistoryList], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/employees.py b/gusto_app_int/src/gusto_app_integration/employees.py index 220730b6..d565eebe 100644 --- a/gusto_app_int/src/gusto_app_integration/employees.py +++ b/gusto_app_int/src/gusto_app_integration/employees.py @@ -5,6 +5,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -16,16 +17,23 @@ def get( x_gusto_api_version: Optional[ models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion ] = models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + location_uuid: Optional[str] = None, + payroll_uuid: Optional[str] = None, search_term: Optional[str] = None, + sort_by: Optional[str] = None, include: Optional[List[models.Include]] = None, + onboarded: Optional[bool] = None, + onboarded_active: Optional[bool] = None, terminated: Optional[bool] = None, + terminated_today: Optional[bool] = None, + uuids: Optional[List[str]] = None, page: Optional[int] = None, per: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.Employee]: + ) -> List[models.ShowEmployees]: r"""Get employees of a company Get all of the employees, onboarding, active and terminated, for a given company. @@ -35,9 +43,16 @@ def get( :param company_id: The UUID of the company :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param location_uuid: Filter employees by a specific primary work location + :param payroll_uuid: Filter employees by a specific payroll :param search_term: A string to search for in the object's names - :param include: Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - custom_fields: Include employees' custom fields - :param terminated: Filters employees by the provided boolean + :param sort_by: Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status + :param include: Include the requested attribute(s) in each employee response. Multiple options are comma separated. + :param onboarded: Filters employees by those who have completed onboarding + :param onboarded_active: Filters employees who are ready to work (onboarded AND active today) + :param terminated: Filters employees by those who have been or are scheduled to be terminated + :param terminated_today: Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated) + :param uuids: Optional subset of employees to fetch. :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 :param retries: Override the default retry configuration for this method @@ -58,9 +73,16 @@ def get( request = models.GetV1CompaniesCompanyIDEmployeesRequest( x_gusto_api_version=x_gusto_api_version, company_id=company_id, + location_uuid=location_uuid, + payroll_uuid=payroll_uuid, search_term=search_term, + sort_by=sort_by, include=include, + onboarded=onboarded, + onboarded_active=onboarded_active, terminated=terminated, + terminated_today=terminated_today, + uuids=uuids, page=page, per=per, ) @@ -91,9 +113,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -103,31 +126,20 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Employee]) + return unmarshal_json_response(List[models.ShowEmployees], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -136,16 +148,23 @@ async def get_async( x_gusto_api_version: Optional[ models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion ] = models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + location_uuid: Optional[str] = None, + payroll_uuid: Optional[str] = None, search_term: Optional[str] = None, + sort_by: Optional[str] = None, include: Optional[List[models.Include]] = None, + onboarded: Optional[bool] = None, + onboarded_active: Optional[bool] = None, terminated: Optional[bool] = None, + terminated_today: Optional[bool] = None, + uuids: Optional[List[str]] = None, page: Optional[int] = None, per: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.Employee]: + ) -> List[models.ShowEmployees]: r"""Get employees of a company Get all of the employees, onboarding, active and terminated, for a given company. @@ -155,9 +174,16 @@ async def get_async( :param company_id: The UUID of the company :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param location_uuid: Filter employees by a specific primary work location + :param payroll_uuid: Filter employees by a specific payroll :param search_term: A string to search for in the object's names - :param include: Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - custom_fields: Include employees' custom fields - :param terminated: Filters employees by the provided boolean + :param sort_by: Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status + :param include: Include the requested attribute(s) in each employee response. Multiple options are comma separated. + :param onboarded: Filters employees by those who have completed onboarding + :param onboarded_active: Filters employees who are ready to work (onboarded AND active today) + :param terminated: Filters employees by those who have been or are scheduled to be terminated + :param terminated_today: Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated) + :param uuids: Optional subset of employees to fetch. :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 :param retries: Override the default retry configuration for this method @@ -178,9 +204,16 @@ async def get_async( request = models.GetV1CompaniesCompanyIDEmployeesRequest( x_gusto_api_version=x_gusto_api_version, company_id=company_id, + location_uuid=location_uuid, + payroll_uuid=payroll_uuid, search_term=search_term, + sort_by=sort_by, include=include, + onboarded=onboarded, + onboarded_active=onboarded_active, terminated=terminated, + terminated_today=terminated_today, + uuids=uuids, page=page, per=per, ) @@ -211,9 +244,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -223,31 +257,20 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Employee]) + return unmarshal_json_response(List[models.ShowEmployees], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create( self, @@ -260,6 +283,7 @@ def create( ] = models.PostV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, middle_initial: Optional[str] = None, email: Optional[str] = None, + work_email: Optional[str] = None, date_of_birth: Optional[date] = None, ssn: Optional[str] = None, preferred_first_name: Optional[str] = None, @@ -282,6 +306,7 @@ def create( :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param middle_initial: :param email: The employee's personal email address. + :param work_email: The employee's work email address. :param date_of_birth: :param ssn: :param preferred_first_name: @@ -309,6 +334,7 @@ def create( middle_initial=middle_initial, last_name=last_name, email=email, + work_email=work_email, date_of_birth=date_of_birth, ssn=ssn, preferred_first_name=preferred_first_name, @@ -349,9 +375,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -361,31 +388,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -398,6 +414,7 @@ async def create_async( ] = models.PostV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, middle_initial: Optional[str] = None, email: Optional[str] = None, + work_email: Optional[str] = None, date_of_birth: Optional[date] = None, ssn: Optional[str] = None, preferred_first_name: Optional[str] = None, @@ -420,6 +437,7 @@ async def create_async( :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param middle_initial: :param email: The employee's personal email address. + :param work_email: The employee's work email address. :param date_of_birth: :param ssn: :param preferred_first_name: @@ -447,6 +465,7 @@ async def create_async( middle_initial=middle_initial, last_name=last_name, email=email, + work_email=work_email, date_of_birth=date_of_birth, ssn=ssn, preferred_first_name=preferred_first_name, @@ -487,9 +506,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -499,31 +519,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_by_id( self, @@ -547,7 +556,7 @@ def get_by_id( :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param include: Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - custom_fields: Include employees' custom fields + :param include: Include the requested attribute(s) in each employee response. Multiple options are comma separated. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -595,9 +604,10 @@ def get_by_id( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -605,27 +615,22 @@ def get_by_id( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.Employee, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_by_id_async( self, @@ -649,7 +654,7 @@ async def get_by_id_async( :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param include: Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - custom_fields: Include employees' custom fields + :param include: Include the requested attribute(s) in each employee response. Multiple options are comma separated. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -697,9 +702,10 @@ async def get_by_id_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -707,38 +713,36 @@ async def get_by_id_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.Employee, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, *, employee_id: str, version: str, - x_gusto_api_version: Optional[str] = None, + x_gusto_api_version: Optional[ + models.PutV1EmployeesHeaderXGustoAPIVersion + ] = models.PutV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, first_name: Optional[str] = None, middle_initial: OptionalNullable[str] = UNSET, last_name: Optional[str] = None, email: Optional[str] = None, + work_email: Optional[str] = None, date_of_birth: Optional[str] = None, ssn: Optional[str] = None, preferred_first_name: OptionalNullable[str] = UNSET, @@ -757,11 +761,12 @@ def update( :param employee_id: The UUID of the employee :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. - :param x_gusto_api_version: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param first_name: :param middle_initial: :param last_name: :param email: + :param work_email: :param date_of_birth: :param ssn: :param preferred_first_name: @@ -790,6 +795,7 @@ def update( middle_initial=middle_initial, last_name=last_name, email=email, + work_email=work_email, date_of_birth=date_of_birth, ssn=ssn, preferred_first_name=preferred_first_name, @@ -830,9 +836,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -842,42 +849,34 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, ["404", "409", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, *, employee_id: str, version: str, - x_gusto_api_version: Optional[str] = None, + x_gusto_api_version: Optional[ + models.PutV1EmployeesHeaderXGustoAPIVersion + ] = models.PutV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, first_name: Optional[str] = None, middle_initial: OptionalNullable[str] = UNSET, last_name: Optional[str] = None, email: Optional[str] = None, + work_email: Optional[str] = None, date_of_birth: Optional[str] = None, ssn: Optional[str] = None, preferred_first_name: OptionalNullable[str] = UNSET, @@ -896,11 +895,12 @@ async def update_async( :param employee_id: The UUID of the employee :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. - :param x_gusto_api_version: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param first_name: :param middle_initial: :param last_name: :param email: + :param work_email: :param date_of_birth: :param ssn: :param preferred_first_name: @@ -929,6 +929,7 @@ async def update_async( middle_initial=middle_initial, last_name=last_name, email=email, + work_email=work_email, date_of_birth=date_of_birth, ssn=ssn, preferred_first_name=preferred_first_name, @@ -969,9 +970,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -981,31 +983,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, ["404", "409", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -1076,9 +1067,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employee", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1090,23 +1082,12 @@ def delete( return if utils.match_response(http_res, ["404", "422", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1177,9 +1158,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employee", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1191,23 +1173,12 @@ async def delete_async( return if utils.match_response(http_res, ["404", "422", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_custom_fields( self, @@ -1281,9 +1252,10 @@ def get_custom_fields( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-custom_fields", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1292,28 +1264,17 @@ def get_custom_fields( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.GetV1EmployeesEmployeeIDCustomFieldsResponseBody + return unmarshal_json_response( + models.GetV1EmployeesEmployeeIDCustomFieldsResponseBody, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_custom_fields_async( self, @@ -1387,9 +1348,10 @@ async def get_custom_fields_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-custom_fields", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1398,28 +1360,17 @@ async def get_custom_fields_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.GetV1EmployeesEmployeeIDCustomFieldsResponseBody + return unmarshal_json_response( + models.GetV1EmployeesEmployeeIDCustomFieldsResponseBody, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_time_off_activities( self, @@ -1490,9 +1441,10 @@ def get_time_off_activities( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-version-employees-time_off_activities", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1501,26 +1453,15 @@ def get_time_off_activities( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffActivity) + return unmarshal_json_response(models.TimeOffActivity, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_time_off_activities_async( self, @@ -1591,9 +1532,10 @@ async def get_time_off_activities_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-version-employees-time_off_activities", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1602,26 +1544,15 @@ async def get_time_off_activities_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffActivity) + return unmarshal_json_response(models.TimeOffActivity, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_terminations( self, @@ -1691,9 +1622,10 @@ def get_terminations( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1702,26 +1634,15 @@ def get_terminations( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Termination]) + return unmarshal_json_response(List[models.Termination], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_terminations_async( self, @@ -1791,9 +1712,10 @@ async def get_terminations_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1802,23 +1724,12 @@ async def get_terminations_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Termination]) + return unmarshal_json_response(List[models.Termination], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/events.py b/gusto_app_int/src/gusto_app_integration/events.py index 82f7aff6..08adcf97 100644 --- a/gusto_app_int/src/gusto_app_integration/events.py +++ b/gusto_app_int/src/gusto_app_integration/events.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import List, Mapping, Optional, Union @@ -92,6 +93,7 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-events", oauth2_scopes=None, @@ -103,26 +105,15 @@ def get_all( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Event]) + return unmarshal_json_response(List[models.Event], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def get_all_async( self, @@ -208,6 +199,7 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-events", oauth2_scopes=None, @@ -219,23 +211,12 @@ async def get_all_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Event]) + return unmarshal_json_response(List[models.Event], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/garnishments.py b/gusto_app_int/src/gusto_app_integration/garnishments.py index 84fbe622..4dfea5fa 100644 --- a/gusto_app_int/src/gusto_app_integration/garnishments.py +++ b/gusto_app_int/src/gusto_app_integration/garnishments.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -127,9 +128,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-garnishments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -139,31 +141,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -284,9 +275,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-garnishments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -296,31 +288,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -394,9 +375,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-garnishments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -405,26 +387,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Garnishment]) + return unmarshal_json_response(List[models.Garnishment], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -498,9 +469,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-garnishments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -509,26 +481,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Garnishment]) + return unmarshal_json_response(List[models.Garnishment], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_by_id( self, @@ -596,9 +557,10 @@ def get_by_id( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-garnishments-garnishment_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -607,26 +569,15 @@ def get_by_id( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_by_id_async( self, @@ -694,9 +645,10 @@ async def get_by_id_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-garnishments-garnishment_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -705,26 +657,15 @@ async def get_by_id_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -843,9 +784,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-garnishments-garnishment_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -855,31 +797,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -998,9 +929,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-garnishments-garnishment_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1010,31 +942,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_child_support( self, @@ -1099,9 +1020,10 @@ def get_child_support( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-garnishments-child_support", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1110,26 +1032,15 @@ def get_child_support( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ChildSupportData) + return unmarshal_json_response(models.ChildSupportData, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_child_support_async( self, @@ -1194,9 +1105,10 @@ async def get_child_support_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-garnishments-child_support", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1205,23 +1117,12 @@ async def get_child_support_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ChildSupportData) + return unmarshal_json_response(models.ChildSupportData, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/httpclient.py b/gusto_app_int/src/gusto_app_integration/httpclient.py index ad528d8d..89560b56 100644 --- a/gusto_app_int/src/gusto_app_integration/httpclient.py +++ b/gusto_app_int/src/gusto_app_integration/httpclient.py @@ -107,7 +107,6 @@ def close_clients( # to them from the owning SDK instance and they can be reaped. owner.client = None owner.async_client = None - if sync_client is not None and not sync_client_supplied: try: sync_client.close() @@ -115,42 +114,12 @@ def close_clients( pass if async_client is not None and not async_client_supplied: - # First, try the simplest approach - use asyncio.run() - # This works when we're not in an async context try: - asyncio.run(async_client.aclose()) - except RuntimeError as e: - # If we get "RuntimeError: This event loop is already running", - # it means we're in an async context - if "already running" in str(e): - try: - # We're in an async context, so get the running loop - loop = asyncio.get_running_loop() - # Create a task but don't wait for it - loop.create_task(async_client.aclose()) - except Exception: - # If we can't get the loop or create a task, just ignore - # The GC will eventually clean up the resources - pass - # If we get "RuntimeError: There is no current event loop in thread", - # we're not in an async context, but asyncio.run() failed for some reason - # In this case, we can try to create a new event loop explicitly - elif "no current event loop" in str(e): - try: - # Create a new event loop and run the coroutine - loop = asyncio.new_event_loop() - asyncio.set_event_loop(loop) - try: - loop.run_until_complete(async_client.aclose()) - finally: - loop.close() - asyncio.set_event_loop(None) - except Exception: - # If this also fails, just ignore - pass - # For any other RuntimeError, just ignore - else: + loop = asyncio.get_running_loop() + asyncio.run_coroutine_threadsafe(async_client.aclose(), loop) + except RuntimeError: + try: + asyncio.run(async_client.aclose()) + except RuntimeError: + # best effort pass - except Exception: - # For any other exception, just ignore - pass diff --git a/gusto_app_int/src/gusto_app_integration/introspection.py b/gusto_app_int/src/gusto_app_integration/introspection.py index 3485e214..01025b5b 100644 --- a/gusto_app_int/src/gusto_app_integration/introspection.py +++ b/gusto_app_int/src/gusto_app_integration/introspection.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union @@ -69,9 +70,10 @@ def get_token_info( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-token-info", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -80,28 +82,15 @@ def get_token_info( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.GetV1TokenInfoResponseBody - ) + return unmarshal_json_response(models.GetV1TokenInfoResponseBody, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def get_token_info_async( self, @@ -164,9 +153,10 @@ async def get_token_info_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-token-info", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -175,28 +165,15 @@ async def get_token_info_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.GetV1TokenInfoResponseBody - ) + return unmarshal_json_response(models.GetV1TokenInfoResponseBody, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) def revoke( self, @@ -277,9 +254,10 @@ def revoke( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="revoke-access-token", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -291,23 +269,12 @@ def revoke( return if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def revoke_async( self, @@ -388,9 +355,10 @@ async def revoke_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="revoke-access-token", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -402,23 +370,12 @@ async def revoke_async( return if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) def refresh_access_token( self, @@ -509,9 +466,10 @@ def refresh_access_token( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="refresh-access-token", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -520,26 +478,15 @@ def refresh_access_token( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Authentication) + return unmarshal_json_response(models.Authentication, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def refresh_access_token_async( self, @@ -630,9 +577,10 @@ async def refresh_access_token_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="refresh-access-token", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -641,26 +589,15 @@ async def refresh_access_token_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Authentication) + return unmarshal_json_response(models.Authentication, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) def disconnect_app_integration( self, @@ -739,6 +676,7 @@ def disconnect_app_integration( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-disconnect-app-integration", oauth2_scopes=None, @@ -753,23 +691,12 @@ def disconnect_app_integration( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def disconnect_app_integration_async( self, @@ -848,6 +775,7 @@ async def disconnect_app_integration_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-disconnect-app-integration", oauth2_scopes=None, @@ -862,20 +790,9 @@ async def disconnect_app_integration_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/jobs.py b/gusto_app_int/src/gusto_app_integration/jobs.py index 6d508c8b..f2b459ca 100644 --- a/gusto_app_int/src/gusto_app_integration/jobs.py +++ b/gusto_app_int/src/gusto_app_integration/jobs.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -98,9 +99,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -110,31 +112,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -226,9 +217,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -238,31 +230,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create_compensation( self, @@ -367,9 +348,10 @@ def create_compensation( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -379,31 +361,20 @@ def create_compensation( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_compensation_async( self, @@ -508,9 +479,10 @@ async def create_compensation_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -520,28 +492,17 @@ async def create_compensation_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/jobsandcompensations.py b/gusto_app_int/src/gusto_app_integration/jobsandcompensations.py index 6b835af6..b417c19e 100644 --- a/gusto_app_int/src/gusto_app_integration/jobsandcompensations.py +++ b/gusto_app_int/src/gusto_app_integration/jobsandcompensations.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -83,9 +84,10 @@ def get_jobs( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-jobs", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -94,26 +96,15 @@ def get_jobs( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Job]) + return unmarshal_json_response(List[models.Job], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_jobs_async( self, @@ -190,9 +181,10 @@ async def get_jobs_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-jobs", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -201,26 +193,15 @@ async def get_jobs_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Job]) + return unmarshal_json_response(List[models.Job], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -291,9 +272,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -302,26 +284,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -392,9 +363,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -403,26 +375,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_job( self, @@ -517,9 +478,10 @@ def update_job( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -529,31 +491,20 @@ def update_job( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_job_async( self, @@ -648,9 +599,10 @@ async def update_job_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -660,31 +612,20 @@ async def update_job_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -752,9 +693,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -766,23 +708,12 @@ def delete( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -850,9 +781,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -864,23 +796,12 @@ async def delete_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_compensations_for_job( self, @@ -961,9 +882,10 @@ def get_compensations_for_job( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-jobs-job_id-compensations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -972,26 +894,15 @@ def get_compensations_for_job( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Compensation]) + return unmarshal_json_response(List[models.Compensation], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_compensations_for_job_async( self, @@ -1072,9 +983,10 @@ async def get_compensations_for_job_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-jobs-job_id-compensations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1083,26 +995,15 @@ async def get_compensations_for_job_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Compensation]) + return unmarshal_json_response(List[models.Compensation], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_compensation( self, @@ -1171,9 +1072,10 @@ def get_compensation( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1182,26 +1084,15 @@ def get_compensation( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_compensation_async( self, @@ -1270,9 +1161,10 @@ async def get_compensation_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1281,26 +1173,15 @@ async def get_compensation_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_compensation( self, @@ -1405,9 +1286,10 @@ def update_compensation( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1417,31 +1299,20 @@ def update_compensation( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_compensation_async( self, @@ -1546,9 +1417,10 @@ async def update_compensation_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1558,31 +1430,20 @@ async def update_compensation_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_compensation( self, @@ -1651,9 +1512,10 @@ def delete_compensation( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1665,23 +1527,12 @@ def delete_compensation( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_compensation_async( self, @@ -1750,9 +1601,10 @@ async def delete_compensation_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1764,20 +1616,9 @@ async def delete_compensation_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/locations.py b/gusto_app_int/src/gusto_app_integration/locations.py index 3bc7b779..3e093af8 100644 --- a/gusto_app_int/src/gusto_app_integration/locations.py +++ b/gusto_app_int/src/gusto_app_integration/locations.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -109,9 +110,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-locations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -121,31 +123,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -248,9 +239,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-locations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -260,31 +252,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -353,9 +334,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-locations-location_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -365,31 +347,20 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -458,9 +429,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-locations-location_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -470,31 +442,20 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -602,9 +563,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-locations-location_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -614,31 +576,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, ["404", "409", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -746,9 +697,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-locations-location_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -758,31 +710,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, ["404", "409", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_minimum_wages( self, @@ -854,9 +795,10 @@ def get_minimum_wages( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-locations-location_uuid-minimum_wages", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -866,31 +808,20 @@ def get_minimum_wages( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.MinimumWage]) + return unmarshal_json_response(List[models.MinimumWage], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_minimum_wages_async( self, @@ -962,9 +893,10 @@ async def get_minimum_wages_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-locations-location_uuid-minimum_wages", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -974,28 +906,17 @@ async def get_minimum_wages_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.MinimumWage]) + return unmarshal_json_response(List[models.MinimumWage], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/models/__init__.py b/gusto_app_int/src/gusto_app_integration/models/__init__.py index 0b117a7a..8d2f4b4b 100644 --- a/gusto_app_int/src/gusto_app_integration/models/__init__.py +++ b/gusto_app_int/src/gusto_app_integration/models/__init__.py @@ -1,1046 +1,1176 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from .accruing_time_off_hour import AccruingTimeOffHour, AccruingTimeOffHourTypedDict -from .accruing_time_off_hour_object import ( - AccruingTimeOffHourObject, - AccruingTimeOffHourObjectTypedDict, -) -from .admin import Admin, AdminTypedDict -from .apierror import APIError -from .authentication import Authentication, AuthenticationTypedDict -from .benefit_summary import ( - BenefitSummary, - BenefitSummaryEmployees, - BenefitSummaryEmployeesTypedDict, - BenefitSummaryPayPeriod, - BenefitSummaryPayPeriodTypedDict, - BenefitSummaryTypedDict, - PayrollBenefits, - PayrollBenefitsTypedDict, -) -from .benefit_type_requirements import ( - BenefitTypeRequirements, - BenefitTypeRequirementsCatchUpDefaultValue, - BenefitTypeRequirementsCatchUpDefaultValueTypedDict, - BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValue, - BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValueTypedDict, - BenefitTypeRequirementsContribution, - BenefitTypeRequirementsContributionTypedDict, - BenefitTypeRequirementsCoverageAmountDefaultValue, - BenefitTypeRequirementsCoverageAmountDefaultValueTypedDict, - BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValue, - BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValueTypedDict, - BenefitTypeRequirementsDeductAsPercentageDefaultValue, - BenefitTypeRequirementsDeductAsPercentageDefaultValueTypedDict, - BenefitTypeRequirementsDefaultValue, - BenefitTypeRequirementsDefaultValueTypedDict, - BenefitTypeRequirementsLimitOptionDefaultValue, - BenefitTypeRequirementsLimitOptionDefaultValueTypedDict, - BenefitTypeRequirementsTypedDict, - CatchUp, - CatchUpTypedDict, - CompanyContributionAnnualMaximum, - CompanyContributionAnnualMaximumTypedDict, - CoverageAmount, - CoverageAmountTypedDict, - CoverageSalaryMultiplier, - CoverageSalaryMultiplierTypedDict, - DeductAsPercentage, - DeductAsPercentageTypedDict, - DefaultValue, - DefaultValueTypedDict, - EmployeeDeduction, - EmployeeDeductionTypedDict, - LimitOption, - LimitOptionTypedDict, -) -from .child_support_data import ( - Agencies, - AgenciesTypedDict, - ChildSupportData, - ChildSupportDataTypedDict, - FipsCodes, - FipsCodesTypedDict, - Key, - RequiredAttributes, - RequiredAttributesTypedDict, -) -from .company import ( - Company, - CompanyEntityType, - CompanyPaidTimeOff, - CompanyPaidTimeOffTypedDict, - CompanyStatus, - CompanyTypedDict, - Compensations, - CompensationsTypedDict, - Fixed, - FixedTypedDict, - FundingType, - HomeAddress, - HomeAddressTypedDict, - Hourly, - HourlyTypedDict, - PayScheduleType, - PrimaryPayrollAdmin, - PrimaryPayrollAdminTypedDict, - PrimarySignatory, - PrimarySignatoryTypedDict, - Tier, -) -from .company_address import CompanyAddress, CompanyAddressTypedDict -from .company_benefit import CompanyBenefit, CompanyBenefitTypedDict, Source -from .company_benefit_with_employee_benefits import ( - CompanyBenefitWithEmployeeBenefits, - CompanyBenefitWithEmployeeBenefitsContribution, - CompanyBenefitWithEmployeeBenefitsContributionTypedDict, - CompanyBenefitWithEmployeeBenefitsSource, - CompanyBenefitWithEmployeeBenefitsTypedDict, - CompanyBenefitWithEmployeeBenefitsValue, - CompanyBenefitWithEmployeeBenefitsValue2, - CompanyBenefitWithEmployeeBenefitsValue2TypedDict, - CompanyBenefitWithEmployeeBenefitsValueTiers, - CompanyBenefitWithEmployeeBenefitsValueTiersTypedDict, - CompanyBenefitWithEmployeeBenefitsValueTypedDict, - EmployeeBenefitsModel, - EmployeeBenefitsModelTypedDict, -) -from .company_custom_field import CompanyCustomField, CompanyCustomFieldTypedDict -from .company_custom_field_list import ( - CompanyCustomFieldList, - CompanyCustomFieldListTypedDict, -) -from .compensation import ( - Compensation, - CompensationTypedDict, - MinimumWages, - MinimumWagesTypedDict, - PaymentUnit, -) -from .contractor import ( - Address, - AddressTypedDict, - Contractor, - ContractorOnboardingStatus, - ContractorPaymentMethod, - ContractorType, - ContractorTypedDict, - WageType, -) -from .contractor_payment import ( - ContractorPayment, - ContractorPaymentPaymentMethod, - ContractorPaymentStatus, - ContractorPaymentTypedDict, - ContractorPaymentWageType, -) -from .contractor_payment_for_group import ( - ContractorPaymentForGroup, - ContractorPaymentForGroupPaymentMethod, - ContractorPaymentForGroupStatus, - ContractorPaymentForGroupTypedDict, - ContractorPaymentForGroupWageType, -) -from .contractor_payment_group import ( - ContractorPaymentGroup, - ContractorPaymentGroupStatus, - ContractorPaymentGroupTotals, - ContractorPaymentGroupTotalsTypedDict, - ContractorPaymentGroupTypedDict, -) -from .contractor_payment_group_minimal import ( - ContractorPaymentGroupMinimal, - ContractorPaymentGroupMinimalStatus, - ContractorPaymentGroupMinimalTypedDict, - Totals, - TotalsTypedDict, -) -from .contractor_payment_summary import ( - ContractorPaymentSummary, - ContractorPaymentSummaryTypedDict, - ContractorPaymentsModel, - ContractorPaymentsModelTypedDict, - Total, - TotalTypedDict, -) -from .contractor_payment_summary_by_dates import ( - ContractorPaymentSummaryByDates, - ContractorPaymentSummaryByDatesContractorPayments, - ContractorPaymentSummaryByDatesContractorPaymentsTypedDict, - ContractorPaymentSummaryByDatesTotal, - ContractorPaymentSummaryByDatesTotalTypedDict, - ContractorPaymentSummaryByDatesTypedDict, -) -from .custom_field_type import CustomFieldType -from .delete_departmentop import ( - DeleteDepartmentRequest, - DeleteDepartmentRequestTypedDict, -) -from .delete_time_tracking_time_sheets_time_sheet_uuidop import ( - DeleteTimeTrackingTimeSheetsTimeSheetUUIDRequest, - DeleteTimeTrackingTimeSheetsTimeSheetUUIDRequestTypedDict, -) -from .delete_v1_companies_company_id_earning_types_earning_type_uuidop import ( - DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest, - DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict, -) -from .delete_v1_company_benefits_company_benefit_idop import ( - Base, - BaseTypedDict, - DeleteV1CompanyBenefitsCompanyBenefitIDRequest, - DeleteV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, - DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody, - DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, - Errors, - ErrorsTypedDict, -) -from .delete_v1_compensations_compensation_idop import ( - DeleteV1CompensationsCompensationIDRequest, - DeleteV1CompensationsCompensationIDRequestTypedDict, -) -from .delete_v1_employee_benefits_employee_benefit_idop import ( - DeleteV1EmployeeBenefitsEmployeeBenefitIDRequest, - DeleteV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, -) -from .delete_v1_employeeop import ( - DeleteV1EmployeeHeaderXGustoAPIVersion, - DeleteV1EmployeeRequest, - DeleteV1EmployeeRequestTypedDict, -) -from .delete_v1_employees_employee_id_rehireop import ( - DeleteV1EmployeesEmployeeIDRehireRequest, - DeleteV1EmployeesEmployeeIDRehireRequestTypedDict, -) -from .delete_v1_employees_employee_id_terminationsop import ( - DeleteV1EmployeesEmployeeIDTerminationsRequest, - DeleteV1EmployeesEmployeeIDTerminationsRequestTypedDict, -) -from .delete_v1_home_addresses_home_address_uuidop import ( - DeleteV1HomeAddressesHomeAddressUUIDRequest, - DeleteV1HomeAddressesHomeAddressUUIDRequestTypedDict, -) -from .delete_v1_jobs_job_idop import ( - DeleteV1JobsJobIDRequest, - DeleteV1JobsJobIDRequestTypedDict, -) -from .delete_v1_webhook_subscription_uuidop import ( - DeleteV1WebhookSubscriptionUUIDRequest, - DeleteV1WebhookSubscriptionUUIDRequestTypedDict, - DeleteV1WebhookSubscriptionUUIDSecurity, - DeleteV1WebhookSubscriptionUUIDSecurityTypedDict, -) -from .delete_v1_work_addresses_work_address_uuidop import ( - DeleteV1WorkAddressesWorkAddressUUIDRequest, - DeleteV1WorkAddressesWorkAddressUUIDRequestTypedDict, -) -from .department import ( - ContractorsModel, - ContractorsModelTypedDict, - Department, - DepartmentTypedDict, - EmployeesModel, - EmployeesModelTypedDict, -) -from .earning_type import EarningType, EarningTypeTypedDict -from .earning_type_list import EarningTypeList, EarningTypeListTypedDict -from .employee import ( - CurrentEmploymentStatus, - Employee, - EmployeeTypedDict, - OnboardingDocumentsConfig, - OnboardingDocumentsConfigTypedDict, - OnboardingStatus, - PaymentMethod, -) -from .employee_address import EmployeeAddress, EmployeeAddressTypedDict -from .employee_benefit import ( - Contribution, - ContributionTypedDict, - DeductionReducesTaxableIncome, - EmployeeBenefit, - EmployeeBenefitTypedDict, - Tiers, - TiersTypedDict, - Two, - TwoTypedDict, - Value, - ValueTypedDict, -) -from .employee_benefit_for_company_benefit import ( - EmployeeBenefitForCompanyBenefit, - EmployeeBenefitForCompanyBenefitContribution, - EmployeeBenefitForCompanyBenefitContributionTypedDict, - EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome, - EmployeeBenefitForCompanyBenefitTypedDict, - EmployeeBenefitForCompanyBenefitValue, - EmployeeBenefitForCompanyBenefitValueTypedDict, - Value2, - Value2TypedDict, - ValueTiers, - ValueTiersTypedDict, -) -from .employee_custom_field import EmployeeCustomField, EmployeeCustomFieldTypedDict -from .employee_work_address import EmployeeWorkAddress, EmployeeWorkAddressTypedDict -from .employment_history_list import ( - EmploymentHistoryList, - EmploymentHistoryListEmploymentStatus, - EmploymentHistoryListTypedDict, -) -from .entity_error_object import ( - EntityErrorObject, - EntityErrorObjectTypedDict, - Metadata, - MetadataTypedDict, -) -from .entity_type import EntityType -from .event import Event, EventTypedDict, ResourceType -from .flsa_status_type import FlsaStatusType -from .garnishment import Garnishment, GarnishmentType, GarnishmentTypedDict -from .garnishment_child_support import ( - GarnishmentChildSupport, - GarnishmentChildSupportTypedDict, - PaymentPeriod, -) -from .get_companies_company_uuid_time_tracking_time_sheetsop import ( - GetCompaniesCompanyUUIDTimeTrackingTimeSheetsRequest, - GetCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestTypedDict, -) -from .get_companies_departmentsop import ( - GetCompaniesDepartmentsRequest, - GetCompaniesDepartmentsRequestTypedDict, -) -from .get_departmentop import GetDepartmentRequest, GetDepartmentRequestTypedDict -from .get_employee_ytd_benefit_amounts_from_different_companyop import ( - GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, - GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict, -) -from .get_eventsop import ( - GetEventsRequest, - GetEventsRequestTypedDict, - GetEventsSecurity, - GetEventsSecurityTypedDict, -) -from .get_time_tracking_time_sheets_time_sheet_uuidop import ( - GetTimeTrackingTimeSheetsTimeSheetUUIDRequest, - GetTimeTrackingTimeSheetsTimeSheetUUIDRequestTypedDict, -) -from .get_v1_benefits_benefit_idop import ( - GetV1BenefitsBenefitIDRequest, - GetV1BenefitsBenefitIDRequestTypedDict, -) -from .get_v1_benefits_benefits_id_requirementsop import ( - GetV1BenefitsBenefitsIDRequirementsRequest, - GetV1BenefitsBenefitsIDRequirementsRequestTypedDict, -) -from .get_v1_benefits_company_benefit_id_summaryop import ( - GetV1BenefitsCompanyBenefitIDSummaryRequest, - GetV1BenefitsCompanyBenefitIDSummaryRequestTypedDict, -) -from .get_v1_benefitsop import GetV1BenefitsRequest, GetV1BenefitsRequestTypedDict -from .get_v1_companies_company_id_adminsop import ( - GetV1CompaniesCompanyIDAdminsRequest, - GetV1CompaniesCompanyIDAdminsRequestTypedDict, -) -from .get_v1_companies_company_id_company_benefitsop import ( - GetV1CompaniesCompanyIDCompanyBenefitsRequest, - GetV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict, -) -from .get_v1_companies_company_id_contractor_payment_contractor_paymentop import ( - GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest, - GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict, -) -from .get_v1_companies_company_id_contractor_payment_groupsop import ( - GetV1CompaniesCompanyIDContractorPaymentGroupsRequest, - GetV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict, -) -from .get_v1_companies_company_id_contractor_paymentsop import ( - GetV1CompaniesCompanyIDContractorPaymentsRequest, - GetV1CompaniesCompanyIDContractorPaymentsRequestTypedDict, - GetV1CompaniesCompanyIDContractorPaymentsResponseBody, - GetV1CompaniesCompanyIDContractorPaymentsResponseBodyTypedDict, -) -from .get_v1_companies_company_id_custom_fieldsop import ( - GetV1CompaniesCompanyIDCustomFieldsRequest, - GetV1CompaniesCompanyIDCustomFieldsRequestTypedDict, -) -from .get_v1_companies_company_id_earning_typesop import ( - GetV1CompaniesCompanyIDEarningTypesRequest, - GetV1CompaniesCompanyIDEarningTypesRequestTypedDict, -) -from .get_v1_companies_company_id_employeesop import ( - GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion, - GetV1CompaniesCompanyIDEmployeesRequest, - GetV1CompaniesCompanyIDEmployeesRequestTypedDict, - Include, -) -from .get_v1_companies_company_id_locationsop import ( - GetV1CompaniesCompanyIDLocationsRequest, - GetV1CompaniesCompanyIDLocationsRequestTypedDict, -) -from .get_v1_companies_company_id_pay_periodsop import ( - GetV1CompaniesCompanyIDPayPeriodsRequest, - GetV1CompaniesCompanyIDPayPeriodsRequestTypedDict, -) -from .get_v1_companies_company_id_pay_schedules_assignmentsop import ( - GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequest, - GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequestTypedDict, -) -from .get_v1_companies_company_id_pay_schedules_pay_schedule_idop import ( - GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequest, - GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestTypedDict, -) -from .get_v1_companies_company_id_pay_schedulesop import ( - GetV1CompaniesCompanyIDPaySchedulesRequest, - GetV1CompaniesCompanyIDPaySchedulesRequestTypedDict, -) -from .get_v1_companies_company_id_payrolls_payroll_idop import ( - GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude, - GetV1CompaniesCompanyIDPayrollsPayrollIDRequest, - GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict, -) -from .get_v1_companies_company_id_payrollsop import ( - GetV1CompaniesCompanyIDPayrollsQueryParamInclude, - GetV1CompaniesCompanyIDPayrollsRequest, - GetV1CompaniesCompanyIDPayrollsRequestTypedDict, - PayrollTypes, - ProcessingStatuses, -) -from .get_v1_companies_company_id_unprocessed_termination_pay_periodsop import ( - GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequest, - GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequestTypedDict, -) -from .get_v1_companies_company_uuid_contractorsop import ( - GetV1CompaniesCompanyUUIDContractorsRequest, - GetV1CompaniesCompanyUUIDContractorsRequestTypedDict, -) -from .get_v1_companiesop import GetV1CompaniesRequest, GetV1CompaniesRequestTypedDict -from .get_v1_company_benefits_company_benefit_id_employee_benefitsop import ( - GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest, - GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict, -) -from .get_v1_company_benefits_company_benefit_idop import ( - GetV1CompanyBenefitsCompanyBenefitIDRequest, - GetV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, -) -from .get_v1_compensations_compensation_idop import ( - GetV1CompensationsCompensationIDRequest, - GetV1CompensationsCompensationIDRequestTypedDict, -) -from .get_v1_contractor_payment_groups_contractor_payment_group_idop import ( - GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest, - GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict, -) -from .get_v1_contractors_contractor_uuidop import ( - GetV1ContractorsContractorUUIDRequest, - GetV1ContractorsContractorUUIDRequestTypedDict, -) -from .get_v1_employee_benefits_employee_benefit_idop import ( - GetV1EmployeeBenefitsEmployeeBenefitIDRequest, - GetV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, -) -from .get_v1_employees_employee_id_custom_fieldsop import ( - GetV1EmployeesEmployeeIDCustomFieldsRequest, - GetV1EmployeesEmployeeIDCustomFieldsRequestTypedDict, - GetV1EmployeesEmployeeIDCustomFieldsResponseBody, - GetV1EmployeesEmployeeIDCustomFieldsResponseBodyTypedDict, -) -from .get_v1_employees_employee_id_employee_benefitsop import ( - GetV1EmployeesEmployeeIDEmployeeBenefitsRequest, - GetV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict, -) -from .get_v1_employees_employee_id_employment_historyop import ( - GetV1EmployeesEmployeeIDEmploymentHistoryHeaderXGustoAPIVersion, - GetV1EmployeesEmployeeIDEmploymentHistoryRequest, - GetV1EmployeesEmployeeIDEmploymentHistoryRequestTypedDict, -) -from .get_v1_employees_employee_id_garnishmentsop import ( - GetV1EmployeesEmployeeIDGarnishmentsRequest, - GetV1EmployeesEmployeeIDGarnishmentsRequestTypedDict, -) -from .get_v1_employees_employee_id_home_addressesop import ( - GetV1EmployeesEmployeeIDHomeAddressesRequest, - GetV1EmployeesEmployeeIDHomeAddressesRequestTypedDict, -) -from .get_v1_employees_employee_id_jobsop import ( - GetV1EmployeesEmployeeIDJobsQueryParamInclude, - GetV1EmployeesEmployeeIDJobsRequest, - GetV1EmployeesEmployeeIDJobsRequestTypedDict, -) -from .get_v1_employees_employee_id_rehireop import ( - GetV1EmployeesEmployeeIDRehireRequest, - GetV1EmployeesEmployeeIDRehireRequestTypedDict, -) -from .get_v1_employees_employee_id_terminationsop import ( - GetV1EmployeesEmployeeIDTerminationsRequest, - GetV1EmployeesEmployeeIDTerminationsRequestTypedDict, -) -from .get_v1_employees_employee_id_work_addressesop import ( - GetV1EmployeesEmployeeIDWorkAddressesRequest, - GetV1EmployeesEmployeeIDWorkAddressesRequestTypedDict, -) -from .get_v1_employeesop import ( - GetV1EmployeesHeaderXGustoAPIVersion, - GetV1EmployeesRequest, - GetV1EmployeesRequestTypedDict, - QueryParamInclude, -) -from .get_v1_garnishments_child_supportop import ( - GetV1GarnishmentsChildSupportRequest, - GetV1GarnishmentsChildSupportRequestTypedDict, -) -from .get_v1_garnishments_garnishment_idop import ( - GetV1GarnishmentsGarnishmentIDRequest, - GetV1GarnishmentsGarnishmentIDRequestTypedDict, -) -from .get_v1_home_addresses_home_address_uuidop import ( - GetV1HomeAddressesHomeAddressUUIDRequest, - GetV1HomeAddressesHomeAddressUUIDRequestTypedDict, -) -from .get_v1_jobs_job_id_compensationsop import ( - GetV1JobsJobIDCompensationsQueryParamInclude, - GetV1JobsJobIDCompensationsRequest, - GetV1JobsJobIDCompensationsRequestTypedDict, -) -from .get_v1_jobs_job_idop import ( - GetV1JobsJobIDQueryParamInclude, - GetV1JobsJobIDRequest, - GetV1JobsJobIDRequestTypedDict, -) -from .get_v1_locations_location_idop import ( - GetV1LocationsLocationIDRequest, - GetV1LocationsLocationIDRequestTypedDict, - XGustoAPIVersion, -) -from .get_v1_locations_location_uuid_minimum_wagesop import ( - GetV1LocationsLocationUUIDMinimumWagesHeaderXGustoAPIVersion, - GetV1LocationsLocationUUIDMinimumWagesRequest, - GetV1LocationsLocationUUIDMinimumWagesRequestTypedDict, -) -from .get_v1_token_infoop import ( - GetV1TokenInfoRequest, - GetV1TokenInfoRequestTypedDict, - GetV1TokenInfoResponseBody, - GetV1TokenInfoResponseBodyTypedDict, - GetV1TokenInfoType, - Resource, - ResourceOwner, - ResourceOwnerTypedDict, - ResourceTypedDict, -) -from .get_v1_webhook_subscription_uuidop import ( - GetV1WebhookSubscriptionUUIDRequest, - GetV1WebhookSubscriptionUUIDRequestTypedDict, - GetV1WebhookSubscriptionUUIDSecurity, - GetV1WebhookSubscriptionUUIDSecurityTypedDict, -) -from .get_v1_webhook_subscription_verification_token_uuidop import ( - GetV1WebhookSubscriptionVerificationTokenUUIDRequest, - GetV1WebhookSubscriptionVerificationTokenUUIDRequestTypedDict, - GetV1WebhookSubscriptionVerificationTokenUUIDSecurity, - GetV1WebhookSubscriptionVerificationTokenUUIDSecurityTypedDict, -) -from .get_v1_webhook_subscriptionsop import ( - GetV1WebhookSubscriptionsRequest, - GetV1WebhookSubscriptionsRequestTypedDict, - GetV1WebhookSubscriptionsSecurity, - GetV1WebhookSubscriptionsSecurityTypedDict, -) -from .get_v1_work_addresses_work_address_uuidop import ( - GetV1WorkAddressesWorkAddressUUIDRequest, - GetV1WorkAddressesWorkAddressUUIDRequestTypedDict, -) -from .get_version_employees_time_off_activitiesop import ( - GetVersionEmployeesTimeOffActivitiesRequest, - GetVersionEmployeesTimeOffActivitiesRequestTypedDict, -) -from .job import Job, JobTypedDict -from .location import Location, LocationTypedDict -from .metadata_with_multiple_entities import ( - MetadataWithMultipleEntities, - MetadataWithMultipleEntitiesTypedDict, -) -from .metadata_with_one_entity import ( - MetadataWithOneEntity, - MetadataWithOneEntityTypedDict, -) -from .minimum_wage import MinimumWage, MinimumWageTypedDict -from .off_cycle_reason_type import OffCycleReasonType -from .paid_time_off import Name, PaidTimeOff, PaidTimeOffTypedDict -from .pay_period import ( - PayPeriod, - PayPeriodPayroll, - PayPeriodPayrollTypedDict, - PayPeriodTypedDict, - PayrollType, -) -from .pay_schedule_assignment import ( - PayScheduleAssignment, - PayScheduleAssignmentTypedDict, - Type, -) -from .pay_schedule_assignment_department import ( - PayScheduleAssignmentDepartment, - PayScheduleAssignmentDepartmentTypedDict, -) -from .pay_schedule_assignment_employee import ( - PayScheduleAssignmentEmployee, - PayScheduleAssignmentEmployeeTypedDict, -) -from .pay_schedule_frequency import PayScheduleFrequency -from .pay_schedule_list import PayScheduleList, PayScheduleListTypedDict -from .pay_schedule_object import PayScheduleObject, PayScheduleObjectTypedDict -from .payroll import Payroll, PayrollTypedDict -from .payroll_company_taxes_type import ( - PayrollCompanyTaxesType, - PayrollCompanyTaxesTypeTypedDict, -) -from .payroll_credit_blockers_type import ( - PayrollCreditBlockersType, - PayrollCreditBlockersTypeMetadata, - PayrollCreditBlockersTypeMetadataTypedDict, - PayrollCreditBlockersTypeStatus, - PayrollCreditBlockersTypeTypedDict, - PayrollCreditBlockersTypeUnblockOptions, - PayrollCreditBlockersTypeUnblockOptionsTypedDict, -) -from .payroll_employee_compensations_type import ( - Benefits, - BenefitsTypedDict, - Deductions, - DeductionsTypedDict, - FixedCompensations, - FixedCompensationsTypedDict, - HourlyCompensations, - HourlyCompensationsTypedDict, - PayrollEmployeeCompensationsType, - PayrollEmployeeCompensationsTypePaidTimeOff, - PayrollEmployeeCompensationsTypePaidTimeOffTypedDict, - PayrollEmployeeCompensationsTypePaymentMethod, - PayrollEmployeeCompensationsTypeTypedDict, - Taxes, - TaxesTypedDict, -) -from .payroll_fixed_compensation_types_type import ( - PayrollFixedCompensationTypesType, - PayrollFixedCompensationTypesTypeTypedDict, -) -from .payroll_minimal import PayrollMinimal, PayrollMinimalTypedDict -from .payroll_pay_period_type import PayrollPayPeriodType, PayrollPayPeriodTypeTypedDict -from .payroll_payment_speed_changed_type import ( - PayrollPaymentSpeedChangedType, - PayrollPaymentSpeedChangedTypeTypedDict, -) -from .payroll_payroll_status_meta_type import ( - PayrollPayrollStatusMetaType, - PayrollPayrollStatusMetaTypeTypedDict, -) -from .payroll_prepared import PayrollPrepared, PayrollPreparedTypedDict -from .payroll_processing_request import ( - PayrollProcessingRequest, - PayrollProcessingRequestStatus, - PayrollProcessingRequestTypedDict, -) -from .payroll_submission_blockers_type import ( - PayrollSubmissionBlockersType, - PayrollSubmissionBlockersTypeMetadata, - PayrollSubmissionBlockersTypeMetadataTypedDict, - PayrollSubmissionBlockersTypeStatus, - PayrollSubmissionBlockersTypeTypedDict, - UnblockOptions, - UnblockOptionsTypedDict, -) -from .payroll_totals_type import PayrollTotalsType, PayrollTotalsTypeTypedDict -from .payroll_withholding_pay_period_type import PayrollWithholdingPayPeriodType -from .post_companies_company_uuid_time_tracking_time_sheetsop import ( - PostCompaniesCompanyUUIDTimeTrackingTimeSheetsEntries, - PostCompaniesCompanyUUIDTimeTrackingTimeSheetsEntriesTypedDict, - PostCompaniesCompanyUUIDTimeTrackingTimeSheetsPayClassification, - PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequest, - PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestBody, - PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestBodyTypedDict, - PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestTypedDict, -) -from .post_departmentsop import ( - PostDepartmentsRequest, - PostDepartmentsRequestBody, - PostDepartmentsRequestBodyTypedDict, - PostDepartmentsRequestTypedDict, -) -from .post_employee_ytd_benefit_amounts_from_different_company import ( - PostEmployeeYtdBenefitAmountsFromDifferentCompany, - PostEmployeeYtdBenefitAmountsFromDifferentCompanyTypedDict, -) -from .post_employee_ytd_benefit_amounts_from_different_companyop import ( - PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, - PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict, -) -from .post_v1_companies_company_id_company_benefitsop import ( - PostV1CompaniesCompanyIDCompanyBenefitsRequest, - PostV1CompaniesCompanyIDCompanyBenefitsRequestBody, - PostV1CompaniesCompanyIDCompanyBenefitsRequestBodyTypedDict, - PostV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict, -) -from .post_v1_companies_company_id_contractor_payment_groups_previewop import ( - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBodyTypedDict, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestTypedDict, -) -from .post_v1_companies_company_id_earning_typesop import ( - PostV1CompaniesCompanyIDEarningTypesRequest, - PostV1CompaniesCompanyIDEarningTypesRequestBody, - PostV1CompaniesCompanyIDEarningTypesRequestBodyTypedDict, - PostV1CompaniesCompanyIDEarningTypesRequestTypedDict, -) -from .post_v1_companies_company_id_locationsop import ( - PostV1CompaniesCompanyIDLocationsRequest, - PostV1CompaniesCompanyIDLocationsRequestBody, - PostV1CompaniesCompanyIDLocationsRequestBodyTypedDict, - PostV1CompaniesCompanyIDLocationsRequestTypedDict, -) -from .post_v1_companies_company_uuid_contractorsop import ( - PostV1CompaniesCompanyUUIDContractorsRequest, - PostV1CompaniesCompanyUUIDContractorsRequestBody, - PostV1CompaniesCompanyUUIDContractorsRequestBodyTypedDict, - PostV1CompaniesCompanyUUIDContractorsRequestTypedDict, - PostV1CompaniesCompanyUUIDContractorsType, - PostV1CompaniesCompanyUUIDContractorsWageType, -) -from .post_v1_compensations_compensation_idop import ( - PostV1CompensationsCompensationIDMinimumWages, - PostV1CompensationsCompensationIDMinimumWagesTypedDict, - PostV1CompensationsCompensationIDPaymentUnit, - PostV1CompensationsCompensationIDRequest, - PostV1CompensationsCompensationIDRequestBody, - PostV1CompensationsCompensationIDRequestBodyTypedDict, - PostV1CompensationsCompensationIDRequestTypedDict, -) -from .post_v1_disconnect_app_integrationop import ( - PostV1DisconnectAppIntegrationRequest, - PostV1DisconnectAppIntegrationRequestTypedDict, - PostV1DisconnectAppIntegrationSecurity, - PostV1DisconnectAppIntegrationSecurityTypedDict, -) -from .post_v1_employees_employee_id_employee_benefitsop import ( - PostV1EmployeesEmployeeIDEmployeeBenefitsContribution, - PostV1EmployeesEmployeeIDEmployeeBenefitsContributionTypedDict, - PostV1EmployeesEmployeeIDEmployeeBenefitsDeductionReducesTaxableIncome, - PostV1EmployeesEmployeeIDEmployeeBenefitsLimitOption, - PostV1EmployeesEmployeeIDEmployeeBenefitsRequest, - PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBody, - PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBodyTypedDict, - PostV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict, - PostV1EmployeesEmployeeIDEmployeeBenefitsType, - PostV1EmployeesEmployeeIDEmployeeBenefitsValue, - PostV1EmployeesEmployeeIDEmployeeBenefitsValue2, - PostV1EmployeesEmployeeIDEmployeeBenefitsValue2TypedDict, - PostV1EmployeesEmployeeIDEmployeeBenefitsValueTypedDict, -) -from .post_v1_employees_employee_id_garnishmentsop import ( - PostV1EmployeesEmployeeIDGarnishmentsGarnishmentType, - PostV1EmployeesEmployeeIDGarnishmentsRequest, - PostV1EmployeesEmployeeIDGarnishmentsRequestBody, - PostV1EmployeesEmployeeIDGarnishmentsRequestBodyTypedDict, - PostV1EmployeesEmployeeIDGarnishmentsRequestTypedDict, -) -from .post_v1_employees_employee_id_home_addressesop import ( - PostV1EmployeesEmployeeIDHomeAddressesRequest, - PostV1EmployeesEmployeeIDHomeAddressesRequestBody, - PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict, - PostV1EmployeesEmployeeIDHomeAddressesRequestTypedDict, -) -from .post_v1_employees_employee_id_rehireop import ( - PostV1EmployeesEmployeeIDRehireRequest, - PostV1EmployeesEmployeeIDRehireRequestTypedDict, -) -from .post_v1_employees_employee_id_terminationsop import ( - PostV1EmployeesEmployeeIDTerminationsRequest, - PostV1EmployeesEmployeeIDTerminationsRequestBody, - PostV1EmployeesEmployeeIDTerminationsRequestBodyTypedDict, - PostV1EmployeesEmployeeIDTerminationsRequestTypedDict, -) -from .post_v1_employees_employee_id_work_addressesop import ( - PostV1EmployeesEmployeeIDWorkAddressesRequest, - PostV1EmployeesEmployeeIDWorkAddressesRequestBody, - PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict, - PostV1EmployeesEmployeeIDWorkAddressesRequestTypedDict, -) -from .post_v1_employeesop import ( - PostV1EmployeesHeaderXGustoAPIVersion, - PostV1EmployeesRequest, - PostV1EmployeesRequestBody, - PostV1EmployeesRequestBodyTypedDict, - PostV1EmployeesRequestTypedDict, -) -from .post_v1_jobs_job_idop import ( - PostV1JobsJobIDRequest, - PostV1JobsJobIDRequestBody, - PostV1JobsJobIDRequestBodyTypedDict, - PostV1JobsJobIDRequestTypedDict, -) -from .post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop import ( - PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequest, - PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBody, - PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBodyTypedDict, - PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestTypedDict, -) -from .post_v1_provisionop import ( - Addresses, - AddressesTypedDict, - PostV1ProvisionCompany, - PostV1ProvisionCompanyTypedDict, - PostV1ProvisionRequest, - PostV1ProvisionRequestBody, - PostV1ProvisionRequestBodyTypedDict, - PostV1ProvisionRequestTypedDict, - PostV1ProvisionResponseBody, - PostV1ProvisionResponseBodyTypedDict, - PostV1ProvisionSecurity, - PostV1ProvisionSecurityTypedDict, - User, - UserTypedDict, -) -from .post_v1_webhook_subscriptionop import ( - PostV1WebhookSubscriptionRequest, - PostV1WebhookSubscriptionRequestBody, - PostV1WebhookSubscriptionRequestBodyTypedDict, - PostV1WebhookSubscriptionRequestTypedDict, - PostV1WebhookSubscriptionSecurity, - PostV1WebhookSubscriptionSecurityTypedDict, - PostV1WebhookSubscriptionSubscriptionTypes, -) -from .put_add_people_to_departmentop import ( - PutAddPeopleToDepartmentContractors, - PutAddPeopleToDepartmentContractorsTypedDict, - PutAddPeopleToDepartmentEmployees, - PutAddPeopleToDepartmentEmployeesTypedDict, - PutAddPeopleToDepartmentRequest, - PutAddPeopleToDepartmentRequestBody, - PutAddPeopleToDepartmentRequestBodyTypedDict, - PutAddPeopleToDepartmentRequestTypedDict, -) -from .put_departmentsop import ( - PutDepartmentsRequest, - PutDepartmentsRequestBody, - PutDepartmentsRequestBodyTypedDict, - PutDepartmentsRequestTypedDict, -) -from .put_remove_people_from_departmentop import ( - PutRemovePeopleFromDepartmentContractors, - PutRemovePeopleFromDepartmentContractorsTypedDict, - PutRemovePeopleFromDepartmentEmployees, - PutRemovePeopleFromDepartmentEmployeesTypedDict, - PutRemovePeopleFromDepartmentRequest, - PutRemovePeopleFromDepartmentRequestBody, - PutRemovePeopleFromDepartmentRequestBodyTypedDict, - PutRemovePeopleFromDepartmentRequestTypedDict, -) -from .put_time_tracking_time_sheets_time_sheet_uuidop import ( - PutTimeTrackingTimeSheetsTimeSheetUUIDEntries, - PutTimeTrackingTimeSheetsTimeSheetUUIDEntriesTypedDict, - PutTimeTrackingTimeSheetsTimeSheetUUIDPayClassification, - PutTimeTrackingTimeSheetsTimeSheetUUIDRequest, - PutTimeTrackingTimeSheetsTimeSheetUUIDRequestBody, - PutTimeTrackingTimeSheetsTimeSheetUUIDRequestBodyTypedDict, - PutTimeTrackingTimeSheetsTimeSheetUUIDRequestTypedDict, -) -from .put_v1_companies_company_id_earning_types_earning_type_uuidop import ( - PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest, - PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBody, - PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBodyTypedDict, - PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict, -) -from .put_v1_companies_company_id_payrolls_payroll_id_prepareop import ( - PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest, - PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestTypedDict, -) -from .put_v1_companies_company_id_payrollsop import ( - EmployeeCompensations, - EmployeeCompensationsTypedDict, - PutV1CompaniesCompanyIDPayrollsFixedCompensations, - PutV1CompaniesCompanyIDPayrollsFixedCompensationsTypedDict, - PutV1CompaniesCompanyIDPayrollsHourlyCompensations, - PutV1CompaniesCompanyIDPayrollsHourlyCompensationsTypedDict, - PutV1CompaniesCompanyIDPayrollsPaidTimeOff, - PutV1CompaniesCompanyIDPayrollsPaidTimeOffTypedDict, - PutV1CompaniesCompanyIDPayrollsPaymentMethod, - PutV1CompaniesCompanyIDPayrollsRequest, - PutV1CompaniesCompanyIDPayrollsRequestBody, - PutV1CompaniesCompanyIDPayrollsRequestBodyTypedDict, - PutV1CompaniesCompanyIDPayrollsRequestTypedDict, - WithholdingPayPeriod, -) -from .put_v1_companiesop import ( - PutV1CompaniesRequest, - PutV1CompaniesRequestBody, - PutV1CompaniesRequestBodyTypedDict, - PutV1CompaniesRequestTypedDict, -) -from .put_v1_company_benefits_company_benefit_id_employee_benefitsop import ( - PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest, - PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBody, - PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBodyTypedDict, - PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict, -) -from .put_v1_company_benefits_company_benefit_idop import ( - PutV1CompanyBenefitsCompanyBenefitIDRequest, - PutV1CompanyBenefitsCompanyBenefitIDRequestBody, - PutV1CompanyBenefitsCompanyBenefitIDRequestBodyTypedDict, - PutV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, -) -from .put_v1_compensations_compensation_idop import ( - PutV1CompensationsCompensationIDMinimumWages, - PutV1CompensationsCompensationIDMinimumWagesTypedDict, - PutV1CompensationsCompensationIDPaymentUnit, - PutV1CompensationsCompensationIDRequest, - PutV1CompensationsCompensationIDRequestBody, - PutV1CompensationsCompensationIDRequestBodyTypedDict, - PutV1CompensationsCompensationIDRequestTypedDict, -) -from .put_v1_contractors_contractor_uuidop import ( - PutV1ContractorsContractorUUIDRequest, - PutV1ContractorsContractorUUIDRequestBody, - PutV1ContractorsContractorUUIDRequestBodyTypedDict, - PutV1ContractorsContractorUUIDRequestTypedDict, - PutV1ContractorsContractorUUIDType, - PutV1ContractorsContractorUUIDWageType, -) -from .put_v1_employee_benefits_employee_benefit_idop import ( - PutV1EmployeeBenefitsEmployeeBenefitIDContribution, - PutV1EmployeeBenefitsEmployeeBenefitIDContributionTypedDict, - PutV1EmployeeBenefitsEmployeeBenefitIDDeductionReducesTaxableIncome, - PutV1EmployeeBenefitsEmployeeBenefitIDLimitOption, - PutV1EmployeeBenefitsEmployeeBenefitIDRequest, - PutV1EmployeeBenefitsEmployeeBenefitIDRequestBody, - PutV1EmployeeBenefitsEmployeeBenefitIDRequestBodyTypedDict, - PutV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, - PutV1EmployeeBenefitsEmployeeBenefitIDType, - PutV1EmployeeBenefitsEmployeeBenefitIDValue, - PutV1EmployeeBenefitsEmployeeBenefitIDValue2, - PutV1EmployeeBenefitsEmployeeBenefitIDValue2TypedDict, - PutV1EmployeeBenefitsEmployeeBenefitIDValueTypedDict, -) -from .put_v1_employees_employee_id_rehireop import ( - PutV1EmployeesEmployeeIDRehireEmploymentStatus, - PutV1EmployeesEmployeeIDRehireRequest, - PutV1EmployeesEmployeeIDRehireRequestBody, - PutV1EmployeesEmployeeIDRehireRequestBodyTypedDict, - PutV1EmployeesEmployeeIDRehireRequestTypedDict, -) -from .put_v1_employeesop import ( - PutV1EmployeesRequest, - PutV1EmployeesRequestBody, - PutV1EmployeesRequestBodyTypedDict, - PutV1EmployeesRequestTypedDict, -) -from .put_v1_garnishments_garnishment_idop import ( - PutV1GarnishmentsGarnishmentIDRequest, - PutV1GarnishmentsGarnishmentIDRequestBody, - PutV1GarnishmentsGarnishmentIDRequestBodyTypedDict, - PutV1GarnishmentsGarnishmentIDRequestTypedDict, -) -from .put_v1_home_addresses_home_address_uuidop import ( - PutV1HomeAddressesHomeAddressUUIDRequest, - PutV1HomeAddressesHomeAddressUUIDRequestBody, - PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict, - PutV1HomeAddressesHomeAddressUUIDRequestTypedDict, -) -from .put_v1_jobs_job_idop import ( - PutV1JobsJobIDRequest, - PutV1JobsJobIDRequestBody, - PutV1JobsJobIDRequestBodyTypedDict, - PutV1JobsJobIDRequestTypedDict, -) -from .put_v1_locations_location_idop import ( - HeaderXGustoAPIVersion, - PutV1LocationsLocationIDRequest, - PutV1LocationsLocationIDRequestBody, - PutV1LocationsLocationIDRequestBodyTypedDict, - PutV1LocationsLocationIDRequestTypedDict, -) -from .put_v1_terminations_employee_idop import ( - PutV1TerminationsEmployeeIDRequest, - PutV1TerminationsEmployeeIDRequestBody, - PutV1TerminationsEmployeeIDRequestBodyTypedDict, - PutV1TerminationsEmployeeIDRequestTypedDict, -) -from .put_v1_verify_webhook_subscription_uuidop import ( - PutV1VerifyWebhookSubscriptionUUIDRequest, - PutV1VerifyWebhookSubscriptionUUIDRequestBody, - PutV1VerifyWebhookSubscriptionUUIDRequestBodyTypedDict, - PutV1VerifyWebhookSubscriptionUUIDRequestTypedDict, - PutV1VerifyWebhookSubscriptionUUIDSecurity, - PutV1VerifyWebhookSubscriptionUUIDSecurityTypedDict, -) -from .put_v1_webhook_subscription_uuidop import ( - PutV1WebhookSubscriptionUUIDRequest, - PutV1WebhookSubscriptionUUIDRequestBody, - PutV1WebhookSubscriptionUUIDRequestBodyTypedDict, - PutV1WebhookSubscriptionUUIDRequestTypedDict, - PutV1WebhookSubscriptionUUIDSecurity, - PutV1WebhookSubscriptionUUIDSecurityTypedDict, - PutV1WebhookSubscriptionUUIDSubscriptionTypes, -) -from .put_v1_work_addresses_work_address_uuidop import ( - PutV1WorkAddressesWorkAddressUUIDRequest, - PutV1WorkAddressesWorkAddressUUIDRequestBody, - PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict, - PutV1WorkAddressesWorkAddressUUIDRequestTypedDict, -) -from .refresh_access_tokenop import ( - RefreshAccessTokenRequest, - RefreshAccessTokenRequestBody, - RefreshAccessTokenRequestBodyTypedDict, - RefreshAccessTokenRequestTypedDict, -) -from .rehire import Rehire, RehireEmploymentStatus, RehireTypedDict -from .rehire_body import EmploymentStatus, RehireBody, RehireBodyTypedDict -from .revoke_access_tokenop import ( - RevokeAccessTokenRequest, - RevokeAccessTokenRequestBody, - RevokeAccessTokenRequestBodyTypedDict, - RevokeAccessTokenRequestTypedDict, -) -from .security import Security, SecurityTypedDict -from .sort_order import SortOrder -from .status import Status -from .supported_benefit import SupportedBenefit, SupportedBenefitTypedDict -from .termination import Termination, TerminationTypedDict -from .time_off_activity import TimeOffActivity, TimeOffActivityTypedDict, TimeOffType -from .time_sheet import ( - Entries, - EntriesTypedDict, - PayClassification, - TimeSheet, - TimeSheetEntityType, - TimeSheetStatus, - TimeSheetTypedDict, -) -from .time_sheet_sort_by import TimeSheetSortBy -from .time_sheet_sort_order import TimeSheetSortOrder -from .unprocessable_entity_error_object import ( - UnprocessableEntityErrorObject, - UnprocessableEntityErrorObjectData, -) -from .unprocessed_termination_pay_period import ( - UnprocessedTerminationPayPeriod, - UnprocessedTerminationPayPeriodTypedDict, -) -from .versionheader import VersionHeader -from .webhook_subscription import ( - SubscriptionTypes, - WebhookSubscription, - WebhookSubscriptionStatus, - WebhookSubscriptionTypedDict, -) -from .ytd_benefit_amounts_from_different_company import ( - YtdBenefitAmountsFromDifferentCompany, - YtdBenefitAmountsFromDifferentCompanyTypedDict, -) +from .gustoappintegrationerror import GustoAppIntegrationError +from typing import TYPE_CHECKING +from importlib import import_module +import builtins +import sys +if TYPE_CHECKING: + from .accruing_time_off_hour import ( + AccruingTimeOffHour, + AccruingTimeOffHourTypedDict, + ) + from .accruing_time_off_hour_object import ( + AccruingTimeOffHourObject, + AccruingTimeOffHourObjectTypedDict, + ) + from .admin import Admin, AdminTypedDict + from .apierror import APIError + from .authentication import Authentication, AuthenticationTypedDict + from .benefit_summary import ( + BenefitSummary, + BenefitSummaryEmployees, + BenefitSummaryEmployeesTypedDict, + BenefitSummaryPayPeriod, + BenefitSummaryPayPeriodTypedDict, + BenefitSummaryTypedDict, + PayrollBenefits, + PayrollBenefitsTypedDict, + ) + from .benefit_type_requirements import ( + BenefitTypeRequirements, + BenefitTypeRequirementsCatchUpDefaultValue, + BenefitTypeRequirementsCatchUpDefaultValueTypedDict, + BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValue, + BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValueTypedDict, + BenefitTypeRequirementsContribution, + BenefitTypeRequirementsContributionTypedDict, + BenefitTypeRequirementsCoverageAmountDefaultValue, + BenefitTypeRequirementsCoverageAmountDefaultValueTypedDict, + BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValue, + BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValueTypedDict, + BenefitTypeRequirementsDeductAsPercentageDefaultValue, + BenefitTypeRequirementsDeductAsPercentageDefaultValueTypedDict, + BenefitTypeRequirementsDefaultValue, + BenefitTypeRequirementsDefaultValueTypedDict, + BenefitTypeRequirementsLimitOptionDefaultValue, + BenefitTypeRequirementsLimitOptionDefaultValueTypedDict, + BenefitTypeRequirementsTypedDict, + CatchUp, + CatchUpTypedDict, + CompanyContributionAnnualMaximum, + CompanyContributionAnnualMaximumTypedDict, + CoverageAmount, + CoverageAmountTypedDict, + CoverageSalaryMultiplier, + CoverageSalaryMultiplierTypedDict, + DeductAsPercentage, + DeductAsPercentageTypedDict, + DefaultValue, + DefaultValueTypedDict, + EmployeeDeduction, + EmployeeDeductionTypedDict, + LimitOption, + LimitOptionTypedDict, + ) + from .child_support_data import ( + Agencies, + AgenciesTypedDict, + ChildSupportData, + ChildSupportDataTypedDict, + FipsCodes, + FipsCodesTypedDict, + Key, + RequiredAttributes, + RequiredAttributesTypedDict, + ) + from .company import ( + Company, + CompanyEntityType, + CompanyPaidTimeOff, + CompanyPaidTimeOffTypedDict, + CompanyStatus, + CompanyTypedDict, + Compensations, + CompensationsTypedDict, + Fixed, + FixedTypedDict, + FundingType, + HomeAddress, + HomeAddressTypedDict, + Hourly, + HourlyTypedDict, + PayScheduleType, + PrimaryPayrollAdmin, + PrimaryPayrollAdminTypedDict, + PrimarySignatory, + PrimarySignatoryTypedDict, + Tier, + ) + from .company_address import CompanyAddress, CompanyAddressTypedDict + from .company_benefit import CompanyBenefit, CompanyBenefitTypedDict, Source + from .company_benefit_with_employee_benefits import ( + CompanyBenefitWithEmployeeBenefits, + CompanyBenefitWithEmployeeBenefitsContribution, + CompanyBenefitWithEmployeeBenefitsContributionTypedDict, + CompanyBenefitWithEmployeeBenefitsSource, + CompanyBenefitWithEmployeeBenefitsTypedDict, + CompanyBenefitWithEmployeeBenefitsValue, + CompanyBenefitWithEmployeeBenefitsValue2, + CompanyBenefitWithEmployeeBenefitsValue2TypedDict, + CompanyBenefitWithEmployeeBenefitsValueTiers, + CompanyBenefitWithEmployeeBenefitsValueTiersTypedDict, + CompanyBenefitWithEmployeeBenefitsValueTypedDict, + EmployeeBenefitsModel, + EmployeeBenefitsModelTypedDict, + ) + from .company_custom_field import CompanyCustomField, CompanyCustomFieldTypedDict + from .company_custom_field_list import ( + CompanyCustomFieldList, + CompanyCustomFieldListTypedDict, + ) + from .compensation import ( + Compensation, + CompensationTypedDict, + MinimumWages, + MinimumWagesTypedDict, + PaymentUnit, + ) + from .contractor import ( + Address, + AddressTypedDict, + Contractor, + ContractorOnboardingStatus, + ContractorPaymentMethod, + ContractorType, + ContractorTypedDict, + WageType, + ) + from .contractor_payment import ( + ContractorPayment, + ContractorPaymentPaymentMethod, + ContractorPaymentStatus, + ContractorPaymentTypedDict, + ContractorPaymentWageType, + ) + from .contractor_payment_details_list import ( + ContractorPaymentDetailsList, + ContractorPaymentDetailsListPaymentMethod, + ContractorPaymentDetailsListTypedDict, + SplitBy, + Splits, + SplitsTypedDict, + ) + from .contractor_payment_summary import ( + ContractorPaymentSummary, + ContractorPaymentSummaryTypedDict, + ContractorPaymentsModel, + ContractorPaymentsModelTypedDict, + Total, + TotalTypedDict, + ) + from .contractor_payment_summary_by_dates import ( + ContractorPaymentSummaryByDates, + ContractorPaymentSummaryByDatesContractorPayments, + ContractorPaymentSummaryByDatesContractorPaymentsTypedDict, + ContractorPaymentSummaryByDatesTotal, + ContractorPaymentSummaryByDatesTotalTypedDict, + ContractorPaymentSummaryByDatesTypedDict, + ) + from .contractors_sort_by import ContractorsSortBy + from .contribution_exclusion import ( + ContributionExclusion, + ContributionExclusionTypedDict, + ) + from .custom_field_type import CustomFieldType + from .delete_departmentop import ( + DeleteDepartmentRequest, + DeleteDepartmentRequestTypedDict, + ) + from .delete_time_tracking_time_sheets_time_sheet_uuidop import ( + DeleteTimeTrackingTimeSheetsTimeSheetUUIDRequest, + DeleteTimeTrackingTimeSheetsTimeSheetUUIDRequestTypedDict, + ) + from .delete_v1_companies_company_id_earning_types_earning_type_uuidop import ( + DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest, + DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict, + ) + from .delete_v1_company_benefits_company_benefit_idop import ( + Base, + BaseTypedDict, + DeleteV1CompanyBenefitsCompanyBenefitIDRequest, + DeleteV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, + DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody, + DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, + Errors, + ErrorsTypedDict, + ) + from .delete_v1_compensations_compensation_idop import ( + DeleteV1CompensationsCompensationIDRequest, + DeleteV1CompensationsCompensationIDRequestTypedDict, + ) + from .delete_v1_employee_benefits_employee_benefit_idop import ( + DeleteV1EmployeeBenefitsEmployeeBenefitIDRequest, + DeleteV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, + ) + from .delete_v1_employeeop import ( + DeleteV1EmployeeHeaderXGustoAPIVersion, + DeleteV1EmployeeRequest, + DeleteV1EmployeeRequestTypedDict, + ) + from .delete_v1_employees_employee_id_rehireop import ( + DeleteV1EmployeesEmployeeIDRehireRequest, + DeleteV1EmployeesEmployeeIDRehireRequestTypedDict, + ) + from .delete_v1_employees_employee_id_terminationsop import ( + DeleteV1EmployeesEmployeeIDTerminationsRequest, + DeleteV1EmployeesEmployeeIDTerminationsRequestTypedDict, + ) + from .delete_v1_home_addresses_home_address_uuidop import ( + DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion, + DeleteV1HomeAddressesHomeAddressUUIDRequest, + DeleteV1HomeAddressesHomeAddressUUIDRequestTypedDict, + ) + from .delete_v1_jobs_job_idop import ( + DeleteV1JobsJobIDRequest, + DeleteV1JobsJobIDRequestTypedDict, + ) + from .delete_v1_webhook_subscription_uuidop import ( + DeleteV1WebhookSubscriptionUUIDRequest, + DeleteV1WebhookSubscriptionUUIDRequestTypedDict, + DeleteV1WebhookSubscriptionUUIDSecurity, + DeleteV1WebhookSubscriptionUUIDSecurityTypedDict, + ) + from .delete_v1_work_addresses_work_address_uuidop import ( + DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion, + DeleteV1WorkAddressesWorkAddressUUIDRequest, + DeleteV1WorkAddressesWorkAddressUUIDRequestTypedDict, + ) + from .department import ( + ContractorsModel, + ContractorsModelTypedDict, + Department, + DepartmentTypedDict, + EmployeesModel, + EmployeesModelTypedDict, + ) + from .earning_type import EarningType, EarningTypeTypedDict + from .earning_type_list import EarningTypeList, EarningTypeListTypedDict + from .employee import ( + Employee, + EmployeeCurrentEmploymentStatus, + EmployeeOnboardingDocumentsConfig, + EmployeeOnboardingDocumentsConfigTypedDict, + EmployeeOnboardingStatus, + EmployeePaymentMethod, + EmployeeTypedDict, + ) + from .employee_address import EmployeeAddress, EmployeeAddressTypedDict + from .employee_benefit import ( + Contribution, + ContributionTypedDict, + DeductionReducesTaxableIncome, + EmployeeBenefit, + EmployeeBenefitTypedDict, + Tiers, + TiersTypedDict, + Two, + TwoTypedDict, + Value, + ValueTypedDict, + ) + from .employee_benefit_for_company_benefit import ( + EmployeeBenefitForCompanyBenefit, + EmployeeBenefitForCompanyBenefitContribution, + EmployeeBenefitForCompanyBenefitContributionTypedDict, + EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome, + EmployeeBenefitForCompanyBenefitTypedDict, + EmployeeBenefitForCompanyBenefitValue, + EmployeeBenefitForCompanyBenefitValueTypedDict, + Value2, + Value2TypedDict, + ValueTiers, + ValueTiersTypedDict, + ) + from .employee_custom_field import EmployeeCustomField, EmployeeCustomFieldTypedDict + from .employee_home_address import EmployeeHomeAddress, EmployeeHomeAddressTypedDict + from .employee_work_address import EmployeeWorkAddress, EmployeeWorkAddressTypedDict + from .employment_history_list import ( + EmploymentHistoryList, + EmploymentHistoryListEmploymentStatus, + EmploymentHistoryListTypedDict, + ) + from .entity_error_object import ( + EntityErrorObject, + EntityErrorObjectTypedDict, + Metadata, + MetadataTypedDict, + ) + from .entity_type import EntityType + from .event import Event, EventTypedDict, ResourceType + from .flsa_status_type import FlsaStatusType + from .garnishment import Garnishment, GarnishmentType, GarnishmentTypedDict + from .garnishment_child_support import ( + GarnishmentChildSupport, + GarnishmentChildSupportTypedDict, + PaymentPeriod, + ) + from .general_ledger_report import ( + Aggregation, + GeneralLedgerReport, + GeneralLedgerReportTypedDict, + IntegrationType, + ) + from .get_companies_company_uuid_time_tracking_time_sheetsop import ( + GetCompaniesCompanyUUIDTimeTrackingTimeSheetsRequest, + GetCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestTypedDict, + ) + from .get_companies_departmentsop import ( + GetCompaniesDepartmentsRequest, + GetCompaniesDepartmentsRequestTypedDict, + ) + from .get_company_notificationsop import ( + GetCompanyNotificationsHeaderXGustoAPIVersion, + GetCompanyNotificationsRequest, + GetCompanyNotificationsRequestTypedDict, + QueryParamStatus, + ) + from .get_departmentop import GetDepartmentRequest, GetDepartmentRequestTypedDict + from .get_employee_ytd_benefit_amounts_from_different_companyop import ( + GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, + GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict, + ) + from .get_eventsop import ( + GetEventsRequest, + GetEventsRequestTypedDict, + GetEventsSecurity, + GetEventsSecurityTypedDict, + ) + from .get_reports_request_uuidop import ( + GetReportsRequestUUIDRequest, + GetReportsRequestUUIDRequestTypedDict, + ) + from .get_time_tracking_time_sheets_time_sheet_uuidop import ( + GetTimeTrackingTimeSheetsTimeSheetUUIDRequest, + GetTimeTrackingTimeSheetsTimeSheetUUIDRequestTypedDict, + ) + from .get_v1_benefits_benefit_idop import ( + GetV1BenefitsBenefitIDRequest, + GetV1BenefitsBenefitIDRequestTypedDict, + ) + from .get_v1_benefits_benefits_id_requirementsop import ( + GetV1BenefitsBenefitsIDRequirementsRequest, + GetV1BenefitsBenefitsIDRequirementsRequestTypedDict, + ) + from .get_v1_benefits_company_benefit_id_summaryop import ( + GetV1BenefitsCompanyBenefitIDSummaryRequest, + GetV1BenefitsCompanyBenefitIDSummaryRequestTypedDict, + ) + from .get_v1_benefitsop import GetV1BenefitsRequest, GetV1BenefitsRequestTypedDict + from .get_v1_companies_company_id_adminsop import ( + GetV1CompaniesCompanyIDAdminsRequest, + GetV1CompaniesCompanyIDAdminsRequestTypedDict, + ) + from .get_v1_companies_company_id_company_benefitsop import ( + GetV1CompaniesCompanyIDCompanyBenefitsRequest, + GetV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict, + ) + from .get_v1_companies_company_id_contractor_payment_contractor_paymentop import ( + GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest, + GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict, + ) + from .get_v1_companies_company_id_contractor_paymentsop import ( + GetV1CompaniesCompanyIDContractorPaymentsRequest, + GetV1CompaniesCompanyIDContractorPaymentsRequestTypedDict, + GetV1CompaniesCompanyIDContractorPaymentsResponseBody, + GetV1CompaniesCompanyIDContractorPaymentsResponseBodyTypedDict, + ) + from .get_v1_companies_company_id_contractors_payment_detailsop import ( + GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest, + GetV1CompaniesCompanyIDContractorsPaymentDetailsRequestTypedDict, + ) + from .get_v1_companies_company_id_custom_fieldsop import ( + GetV1CompaniesCompanyIDCustomFieldsRequest, + GetV1CompaniesCompanyIDCustomFieldsRequestTypedDict, + ) + from .get_v1_companies_company_id_earning_typesop import ( + GetV1CompaniesCompanyIDEarningTypesRequest, + GetV1CompaniesCompanyIDEarningTypesRequestTypedDict, + ) + from .get_v1_companies_company_id_employeesop import ( + GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDEmployeesRequest, + GetV1CompaniesCompanyIDEmployeesRequestTypedDict, + Include, + ) + from .get_v1_companies_company_id_locationsop import ( + GetV1CompaniesCompanyIDLocationsRequest, + GetV1CompaniesCompanyIDLocationsRequestTypedDict, + ) + from .get_v1_companies_company_id_pay_periodsop import ( + GetV1CompaniesCompanyIDPayPeriodsRequest, + GetV1CompaniesCompanyIDPayPeriodsRequestTypedDict, + ) + from .get_v1_companies_company_id_pay_schedules_assignmentsop import ( + GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequest, + GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequestTypedDict, + ) + from .get_v1_companies_company_id_pay_schedules_pay_schedule_idop import ( + GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequest, + GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestTypedDict, + ) + from .get_v1_companies_company_id_pay_schedulesop import ( + GetV1CompaniesCompanyIDPaySchedulesRequest, + GetV1CompaniesCompanyIDPaySchedulesRequestTypedDict, + ) + from .get_v1_companies_company_id_payrolls_payroll_idop import ( + GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude, + GetV1CompaniesCompanyIDPayrollsPayrollIDRequest, + GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict, + SortBy, + ) + from .get_v1_companies_company_id_payrollsop import ( + GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDPayrollsQueryParamInclude, + GetV1CompaniesCompanyIDPayrollsRequest, + GetV1CompaniesCompanyIDPayrollsRequestTypedDict, + PayrollTypes, + ProcessingStatuses, + QueryParamSortOrder, + ) + from .get_v1_companies_company_id_time_off_requestsop import ( + GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDTimeOffRequestsRequest, + GetV1CompaniesCompanyIDTimeOffRequestsRequestTypedDict, + ) + from .get_v1_companies_company_id_unprocessed_termination_pay_periodsop import ( + GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequest, + GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequestTypedDict, + ) + from .get_v1_companies_company_uuid_contractorsop import ( + GetV1CompaniesCompanyUUIDContractorsRequest, + GetV1CompaniesCompanyUUIDContractorsRequestTypedDict, + ) + from .get_v1_companiesop import ( + GetV1CompaniesRequest, + GetV1CompaniesRequestTypedDict, + ) + from .get_v1_company_benefits_company_benefit_id_contribution_exclusionsop import ( + GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest, + GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict, + ) + from .get_v1_company_benefits_company_benefit_id_employee_benefitsop import ( + GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest, + GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict, + ) + from .get_v1_company_benefits_company_benefit_idop import ( + GetV1CompanyBenefitsCompanyBenefitIDRequest, + GetV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, + ) + from .get_v1_compensations_compensation_idop import ( + GetV1CompensationsCompensationIDRequest, + GetV1CompensationsCompensationIDRequestTypedDict, + ) + from .get_v1_contractors_contractor_uuidop import ( + GetV1ContractorsContractorUUIDRequest, + GetV1ContractorsContractorUUIDRequestTypedDict, + ) + from .get_v1_employee_benefits_employee_benefit_idop import ( + GetV1EmployeeBenefitsEmployeeBenefitIDRequest, + GetV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, + ) + from .get_v1_employees_employee_id_custom_fieldsop import ( + GetV1EmployeesEmployeeIDCustomFieldsRequest, + GetV1EmployeesEmployeeIDCustomFieldsRequestTypedDict, + GetV1EmployeesEmployeeIDCustomFieldsResponseBody, + GetV1EmployeesEmployeeIDCustomFieldsResponseBodyTypedDict, + ) + from .get_v1_employees_employee_id_employee_benefitsop import ( + GetV1EmployeesEmployeeIDEmployeeBenefitsRequest, + GetV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict, + ) + from .get_v1_employees_employee_id_employment_historyop import ( + GetV1EmployeesEmployeeIDEmploymentHistoryHeaderXGustoAPIVersion, + GetV1EmployeesEmployeeIDEmploymentHistoryRequest, + GetV1EmployeesEmployeeIDEmploymentHistoryRequestTypedDict, + ) + from .get_v1_employees_employee_id_garnishmentsop import ( + GetV1EmployeesEmployeeIDGarnishmentsRequest, + GetV1EmployeesEmployeeIDGarnishmentsRequestTypedDict, + ) + from .get_v1_employees_employee_id_home_addressesop import ( + GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion, + GetV1EmployeesEmployeeIDHomeAddressesRequest, + GetV1EmployeesEmployeeIDHomeAddressesRequestTypedDict, + ) + from .get_v1_employees_employee_id_jobsop import ( + GetV1EmployeesEmployeeIDJobsQueryParamInclude, + GetV1EmployeesEmployeeIDJobsRequest, + GetV1EmployeesEmployeeIDJobsRequestTypedDict, + ) + from .get_v1_employees_employee_id_rehireop import ( + GetV1EmployeesEmployeeIDRehireRequest, + GetV1EmployeesEmployeeIDRehireRequestTypedDict, + ) + from .get_v1_employees_employee_id_terminationsop import ( + GetV1EmployeesEmployeeIDTerminationsRequest, + GetV1EmployeesEmployeeIDTerminationsRequestTypedDict, + ) + from .get_v1_employees_employee_id_work_addressesop import ( + GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion, + GetV1EmployeesEmployeeIDWorkAddressesRequest, + GetV1EmployeesEmployeeIDWorkAddressesRequestTypedDict, + ) + from .get_v1_employeesop import ( + GetV1EmployeesHeaderXGustoAPIVersion, + GetV1EmployeesRequest, + GetV1EmployeesRequestTypedDict, + QueryParamInclude, + ) + from .get_v1_garnishments_child_supportop import ( + GetV1GarnishmentsChildSupportRequest, + GetV1GarnishmentsChildSupportRequestTypedDict, + ) + from .get_v1_garnishments_garnishment_idop import ( + GetV1GarnishmentsGarnishmentIDRequest, + GetV1GarnishmentsGarnishmentIDRequestTypedDict, + ) + from .get_v1_home_addresses_home_address_uuidop import ( + GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion, + GetV1HomeAddressesHomeAddressUUIDRequest, + GetV1HomeAddressesHomeAddressUUIDRequestTypedDict, + ) + from .get_v1_jobs_job_id_compensationsop import ( + GetV1JobsJobIDCompensationsQueryParamInclude, + GetV1JobsJobIDCompensationsRequest, + GetV1JobsJobIDCompensationsRequestTypedDict, + ) + from .get_v1_jobs_job_idop import ( + GetV1JobsJobIDQueryParamInclude, + GetV1JobsJobIDRequest, + GetV1JobsJobIDRequestTypedDict, + ) + from .get_v1_locations_location_idop import ( + GetV1LocationsLocationIDRequest, + GetV1LocationsLocationIDRequestTypedDict, + XGustoAPIVersion, + ) + from .get_v1_locations_location_uuid_minimum_wagesop import ( + GetV1LocationsLocationUUIDMinimumWagesHeaderXGustoAPIVersion, + GetV1LocationsLocationUUIDMinimumWagesRequest, + GetV1LocationsLocationUUIDMinimumWagesRequestTypedDict, + ) + from .get_v1_token_infoop import ( + GetV1TokenInfoRequest, + GetV1TokenInfoRequestTypedDict, + GetV1TokenInfoResponseBody, + GetV1TokenInfoResponseBodyTypedDict, + GetV1TokenInfoType, + Resource, + ResourceOwner, + ResourceOwnerTypedDict, + ResourceTypedDict, + ) + from .get_v1_webhook_subscription_uuidop import ( + GetV1WebhookSubscriptionUUIDRequest, + GetV1WebhookSubscriptionUUIDRequestTypedDict, + GetV1WebhookSubscriptionUUIDSecurity, + GetV1WebhookSubscriptionUUIDSecurityTypedDict, + ) + from .get_v1_webhook_subscription_verification_token_uuidop import ( + GetV1WebhookSubscriptionVerificationTokenUUIDRequest, + GetV1WebhookSubscriptionVerificationTokenUUIDRequestTypedDict, + GetV1WebhookSubscriptionVerificationTokenUUIDSecurity, + GetV1WebhookSubscriptionVerificationTokenUUIDSecurityTypedDict, + ) + from .get_v1_webhook_subscriptionsop import ( + GetV1WebhookSubscriptionsRequest, + GetV1WebhookSubscriptionsRequestTypedDict, + GetV1WebhookSubscriptionsSecurity, + GetV1WebhookSubscriptionsSecurityTypedDict, + ) + from .get_v1_webhooks_health_checkop import ( + GetV1WebhooksHealthCheckHeaderXGustoAPIVersion, + GetV1WebhooksHealthCheckRequest, + GetV1WebhooksHealthCheckRequestTypedDict, + GetV1WebhooksHealthCheckSecurity, + GetV1WebhooksHealthCheckSecurityTypedDict, + ) + from .get_v1_work_addresses_work_address_uuidop import ( + GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion, + GetV1WorkAddressesWorkAddressUUIDRequest, + GetV1WorkAddressesWorkAddressUUIDRequestTypedDict, + ) + from .get_version_employees_time_off_activitiesop import ( + GetVersionEmployeesTimeOffActivitiesRequest, + GetVersionEmployeesTimeOffActivitiesRequestTypedDict, + ) + from .job import Job, JobTypedDict + from .location import Location, LocationTypedDict + from .metadata_with_multiple_entities import ( + MetadataWithMultipleEntities, + MetadataWithMultipleEntitiesTypedDict, + ) + from .metadata_with_one_entity import ( + MetadataWithOneEntity, + MetadataWithOneEntityTypedDict, + ) + from .minimum_wage import MinimumWage, MinimumWageTypedDict + from .no_response_error import NoResponseError + from .notification import ( + Notification, + NotificationEntityType, + NotificationStatus, + NotificationTypedDict, + Resources, + ResourcesTypedDict, + ) + from .off_cycle_reason_type import OffCycleReasonType + from .paid_time_off import Name, PaidTimeOff, PaidTimeOffTypedDict + from .pay_period import ( + PayPeriod, + PayPeriodPayroll, + PayPeriodPayrollTypedDict, + PayPeriodTypedDict, + PayrollType, + ) + from .pay_schedule_assignment import ( + PayScheduleAssignment, + PayScheduleAssignmentTypedDict, + Type, + ) + from .pay_schedule_assignment_department import ( + PayScheduleAssignmentDepartment, + PayScheduleAssignmentDepartmentTypedDict, + ) + from .pay_schedule_assignment_employee import ( + PayScheduleAssignmentEmployee, + PayScheduleAssignmentEmployeeTypedDict, + ) + from .pay_schedule_frequency import PayScheduleFrequency + from .pay_schedule_list import PayScheduleList, PayScheduleListTypedDict + from .pay_schedule_object import PayScheduleObject, PayScheduleObjectTypedDict + from .payroll import Payroll, PayrollTypedDict + from .payroll_company_taxes_type import ( + PayrollCompanyTaxesType, + PayrollCompanyTaxesTypeTypedDict, + ) + from .payroll_credit_blockers_type import ( + PayrollCreditBlockersType, + PayrollCreditBlockersTypeMetadata, + PayrollCreditBlockersTypeMetadataTypedDict, + PayrollCreditBlockersTypeStatus, + PayrollCreditBlockersTypeTypedDict, + PayrollCreditBlockersTypeUnblockOptions, + PayrollCreditBlockersTypeUnblockOptionsTypedDict, + ) + from .payroll_employee_compensations_type import ( + AmountType, + Deductions, + DeductionsTypedDict, + FixedCompensations, + FixedCompensationsTypedDict, + HourlyCompensations, + HourlyCompensationsTypedDict, + PayrollEmployeeCompensationsType, + PayrollEmployeeCompensationsTypePaidTimeOff, + PayrollEmployeeCompensationsTypePaidTimeOffTypedDict, + PayrollEmployeeCompensationsTypePaymentMethod, + PayrollEmployeeCompensationsTypeTypedDict, + Reimbursements, + ReimbursementsTypedDict, + ) + from .payroll_fixed_compensation_types_type import ( + PayrollFixedCompensationTypesType, + PayrollFixedCompensationTypesTypeTypedDict, + ) + from .payroll_pay_period_type import ( + PayrollPayPeriodType, + PayrollPayPeriodTypeTypedDict, + ) + from .payroll_payment_speed_changed_type import ( + PayrollPaymentSpeedChangedType, + PayrollPaymentSpeedChangedTypeTypedDict, + ) + from .payroll_payroll_status_meta_type import ( + PayrollPayrollStatusMetaType, + PayrollPayrollStatusMetaTypeTypedDict, + ) + from .payroll_prepare_sort_by import PayrollPrepareSortBy + from .payroll_prepared import PayrollPrepared, PayrollPreparedTypedDict + from .payroll_processing_request import ( + PayrollProcessingRequest, + PayrollProcessingRequestStatus, + PayrollProcessingRequestTypedDict, + ) + from .payroll_show import ( + Benefits, + BenefitsTypedDict, + EmployeeCompensations, + EmployeeCompensationsTypedDict, + PayrollShow, + PayrollShowAmountType, + PayrollShowDeductions, + PayrollShowDeductionsTypedDict, + PayrollShowFixedCompensations, + PayrollShowFixedCompensationsTypedDict, + PayrollShowHourlyCompensations, + PayrollShowHourlyCompensationsTypedDict, + PayrollShowPaidTimeOff, + PayrollShowPaidTimeOffTypedDict, + PayrollShowPaymentMethod, + PayrollShowReimbursements, + PayrollShowReimbursementsTypedDict, + PayrollShowTypedDict, + Taxes, + TaxesTypedDict, + ) + from .payroll_submission_blockers_type import ( + PayrollSubmissionBlockersType, + PayrollSubmissionBlockersTypeMetadata, + PayrollSubmissionBlockersTypeMetadataTypedDict, + PayrollSubmissionBlockersTypeStatus, + PayrollSubmissionBlockersTypeTypedDict, + UnblockOptions, + UnblockOptionsTypedDict, + ) + from .payroll_taxes_type import PayrollTaxesType, PayrollTaxesTypeTypedDict + from .payroll_totals_type import PayrollTotalsType, PayrollTotalsTypeTypedDict + from .payroll_update import ( + PayrollUpdate, + PayrollUpdateAmountType, + PayrollUpdateDeductions, + PayrollUpdateDeductionsTypedDict, + PayrollUpdateEmployeeCompensations, + PayrollUpdateEmployeeCompensationsTypedDict, + PayrollUpdateFixedCompensations, + PayrollUpdateFixedCompensationsTypedDict, + PayrollUpdateHourlyCompensations, + PayrollUpdateHourlyCompensationsTypedDict, + PayrollUpdatePaidTimeOff, + PayrollUpdatePaidTimeOffTypedDict, + PayrollUpdatePaymentMethod, + PayrollUpdateTypedDict, + WithholdingPayPeriod, + ) + from .payroll_withholding_pay_period_type import PayrollWithholdingPayPeriodType + from .post_companies_company_uuid_time_tracking_time_sheetsop import ( + PostCompaniesCompanyUUIDTimeTrackingTimeSheetsEntries, + PostCompaniesCompanyUUIDTimeTrackingTimeSheetsEntriesTypedDict, + PostCompaniesCompanyUUIDTimeTrackingTimeSheetsPayClassification, + PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequest, + PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestBody, + PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestBodyTypedDict, + PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestTypedDict, + ) + from .post_departmentsop import ( + PostDepartmentsRequest, + PostDepartmentsRequestBody, + PostDepartmentsRequestBodyTypedDict, + PostDepartmentsRequestTypedDict, + ) + from .post_employee_ytd_benefit_amounts_from_different_company import ( + PostEmployeeYtdBenefitAmountsFromDifferentCompany, + PostEmployeeYtdBenefitAmountsFromDifferentCompanyTypedDict, + ) + from .post_employee_ytd_benefit_amounts_from_different_companyop import ( + PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, + PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict, + ) + from .post_payrolls_payroll_uuid_reports_general_ledgerop import ( + PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation, + PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType, + PostPayrollsPayrollUUIDReportsGeneralLedgerRequest, + PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody, + PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBodyTypedDict, + PostPayrollsPayrollUUIDReportsGeneralLedgerRequestTypedDict, + ) + from .post_v1_companies_company_id_company_benefitsop import ( + PostV1CompaniesCompanyIDCompanyBenefitsRequest, + PostV1CompaniesCompanyIDCompanyBenefitsRequestBody, + PostV1CompaniesCompanyIDCompanyBenefitsRequestBodyTypedDict, + PostV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict, + ) + from .post_v1_companies_company_id_earning_typesop import ( + PostV1CompaniesCompanyIDEarningTypesRequest, + PostV1CompaniesCompanyIDEarningTypesRequestBody, + PostV1CompaniesCompanyIDEarningTypesRequestBodyTypedDict, + PostV1CompaniesCompanyIDEarningTypesRequestTypedDict, + ) + from .post_v1_companies_company_id_locationsop import ( + PostV1CompaniesCompanyIDLocationsRequest, + PostV1CompaniesCompanyIDLocationsRequestBody, + PostV1CompaniesCompanyIDLocationsRequestBodyTypedDict, + PostV1CompaniesCompanyIDLocationsRequestTypedDict, + ) + from .post_v1_companies_company_uuid_contractorsop import ( + PostV1CompaniesCompanyUUIDContractorsRequest, + PostV1CompaniesCompanyUUIDContractorsRequestBody, + PostV1CompaniesCompanyUUIDContractorsRequestBodyTypedDict, + PostV1CompaniesCompanyUUIDContractorsRequestTypedDict, + PostV1CompaniesCompanyUUIDContractorsType, + PostV1CompaniesCompanyUUIDContractorsWageType, + ) + from .post_v1_compensations_compensation_idop import ( + PostV1CompensationsCompensationIDMinimumWages, + PostV1CompensationsCompensationIDMinimumWagesTypedDict, + PostV1CompensationsCompensationIDPaymentUnit, + PostV1CompensationsCompensationIDRequest, + PostV1CompensationsCompensationIDRequestBody, + PostV1CompensationsCompensationIDRequestBodyTypedDict, + PostV1CompensationsCompensationIDRequestTypedDict, + ) + from .post_v1_disconnect_app_integrationop import ( + PostV1DisconnectAppIntegrationRequest, + PostV1DisconnectAppIntegrationRequestTypedDict, + PostV1DisconnectAppIntegrationSecurity, + PostV1DisconnectAppIntegrationSecurityTypedDict, + ) + from .post_v1_employees_employee_id_employee_benefitsop import ( + PostV1EmployeesEmployeeIDEmployeeBenefitsContribution, + PostV1EmployeesEmployeeIDEmployeeBenefitsContributionTypedDict, + PostV1EmployeesEmployeeIDEmployeeBenefitsDeductionReducesTaxableIncome, + PostV1EmployeesEmployeeIDEmployeeBenefitsLimitOption, + PostV1EmployeesEmployeeIDEmployeeBenefitsRequest, + PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBody, + PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBodyTypedDict, + PostV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict, + PostV1EmployeesEmployeeIDEmployeeBenefitsType, + PostV1EmployeesEmployeeIDEmployeeBenefitsValue, + PostV1EmployeesEmployeeIDEmployeeBenefitsValue2, + PostV1EmployeesEmployeeIDEmployeeBenefitsValue2TypedDict, + PostV1EmployeesEmployeeIDEmployeeBenefitsValueTypedDict, + ) + from .post_v1_employees_employee_id_garnishmentsop import ( + PostV1EmployeesEmployeeIDGarnishmentsGarnishmentType, + PostV1EmployeesEmployeeIDGarnishmentsRequest, + PostV1EmployeesEmployeeIDGarnishmentsRequestBody, + PostV1EmployeesEmployeeIDGarnishmentsRequestBodyTypedDict, + PostV1EmployeesEmployeeIDGarnishmentsRequestTypedDict, + ) + from .post_v1_employees_employee_id_home_addressesop import ( + PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion, + PostV1EmployeesEmployeeIDHomeAddressesRequest, + PostV1EmployeesEmployeeIDHomeAddressesRequestBody, + PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict, + PostV1EmployeesEmployeeIDHomeAddressesRequestTypedDict, + ) + from .post_v1_employees_employee_id_rehireop import ( + PostV1EmployeesEmployeeIDRehireRequest, + PostV1EmployeesEmployeeIDRehireRequestTypedDict, + ) + from .post_v1_employees_employee_id_terminationsop import ( + PostV1EmployeesEmployeeIDTerminationsRequest, + PostV1EmployeesEmployeeIDTerminationsRequestBody, + PostV1EmployeesEmployeeIDTerminationsRequestBodyTypedDict, + PostV1EmployeesEmployeeIDTerminationsRequestTypedDict, + ) + from .post_v1_employees_employee_id_work_addressesop import ( + PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion, + PostV1EmployeesEmployeeIDWorkAddressesRequest, + PostV1EmployeesEmployeeIDWorkAddressesRequestBody, + PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict, + PostV1EmployeesEmployeeIDWorkAddressesRequestTypedDict, + ) + from .post_v1_employeesop import ( + PostV1EmployeesHeaderXGustoAPIVersion, + PostV1EmployeesRequest, + PostV1EmployeesRequestBody, + PostV1EmployeesRequestBodyTypedDict, + PostV1EmployeesRequestTypedDict, + ) + from .post_v1_jobs_job_idop import ( + PostV1JobsJobIDRequest, + PostV1JobsJobIDRequestBody, + PostV1JobsJobIDRequestBodyTypedDict, + PostV1JobsJobIDRequestTypedDict, + ) + from .post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop import ( + PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequest, + PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBody, + PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBodyTypedDict, + PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestTypedDict, + ) + from .post_v1_provisionop import ( + Addresses, + AddressesTypedDict, + PostV1ProvisionCompany, + PostV1ProvisionCompanyTypedDict, + PostV1ProvisionRequest, + PostV1ProvisionRequestBody, + PostV1ProvisionRequestBodyTypedDict, + PostV1ProvisionRequestTypedDict, + PostV1ProvisionResponseBody, + PostV1ProvisionResponseBodyTypedDict, + PostV1ProvisionSecurity, + PostV1ProvisionSecurityTypedDict, + User, + UserTypedDict, + ) + from .post_v1_webhook_subscriptionop import ( + PostV1WebhookSubscriptionRequest, + PostV1WebhookSubscriptionRequestBody, + PostV1WebhookSubscriptionRequestBodyTypedDict, + PostV1WebhookSubscriptionRequestTypedDict, + PostV1WebhookSubscriptionSecurity, + PostV1WebhookSubscriptionSecurityTypedDict, + PostV1WebhookSubscriptionSubscriptionTypes, + ) + from .put_add_people_to_departmentop import ( + PutAddPeopleToDepartmentContractors, + PutAddPeopleToDepartmentContractorsTypedDict, + PutAddPeopleToDepartmentEmployees, + PutAddPeopleToDepartmentEmployeesTypedDict, + PutAddPeopleToDepartmentRequest, + PutAddPeopleToDepartmentRequestBody, + PutAddPeopleToDepartmentRequestBodyTypedDict, + PutAddPeopleToDepartmentRequestTypedDict, + ) + from .put_departmentsop import ( + PutDepartmentsRequest, + PutDepartmentsRequestBody, + PutDepartmentsRequestBodyTypedDict, + PutDepartmentsRequestTypedDict, + ) + from .put_remove_people_from_departmentop import ( + PutRemovePeopleFromDepartmentContractors, + PutRemovePeopleFromDepartmentContractorsTypedDict, + PutRemovePeopleFromDepartmentEmployees, + PutRemovePeopleFromDepartmentEmployeesTypedDict, + PutRemovePeopleFromDepartmentRequest, + PutRemovePeopleFromDepartmentRequestBody, + PutRemovePeopleFromDepartmentRequestBodyTypedDict, + PutRemovePeopleFromDepartmentRequestTypedDict, + ) + from .put_time_tracking_time_sheets_time_sheet_uuidop import ( + PutTimeTrackingTimeSheetsTimeSheetUUIDEntries, + PutTimeTrackingTimeSheetsTimeSheetUUIDEntriesTypedDict, + PutTimeTrackingTimeSheetsTimeSheetUUIDPayClassification, + PutTimeTrackingTimeSheetsTimeSheetUUIDRequest, + PutTimeTrackingTimeSheetsTimeSheetUUIDRequestBody, + PutTimeTrackingTimeSheetsTimeSheetUUIDRequestBodyTypedDict, + PutTimeTrackingTimeSheetsTimeSheetUUIDRequestTypedDict, + ) + from .put_v1_companies_company_id_earning_types_earning_type_uuidop import ( + PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest, + PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBody, + PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBodyTypedDict, + PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict, + ) + from .put_v1_companies_company_id_payrolls_payroll_id_prepareop import ( + PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest, + PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody, + PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBodyTypedDict, + PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestTypedDict, + ) + from .put_v1_companies_company_id_payrollsop import ( + PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion, + PutV1CompaniesCompanyIDPayrollsRequest, + PutV1CompaniesCompanyIDPayrollsRequestTypedDict, + ) + from .put_v1_companiesop import ( + PutV1CompaniesRequest, + PutV1CompaniesRequestBody, + PutV1CompaniesRequestBodyTypedDict, + PutV1CompaniesRequestTypedDict, + ) + from .put_v1_company_benefits_company_benefit_id_contribution_exclusionsop import ( + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest, + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody, + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBodyTypedDict, + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict, + ) + from .put_v1_company_benefits_company_benefit_id_employee_benefitsop import ( + PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest, + PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBody, + PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBodyTypedDict, + PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict, + ) + from .put_v1_company_benefits_company_benefit_idop import ( + PutV1CompanyBenefitsCompanyBenefitIDRequest, + PutV1CompanyBenefitsCompanyBenefitIDRequestBody, + PutV1CompanyBenefitsCompanyBenefitIDRequestBodyTypedDict, + PutV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, + ) + from .put_v1_compensations_compensation_idop import ( + PutV1CompensationsCompensationIDMinimumWages, + PutV1CompensationsCompensationIDMinimumWagesTypedDict, + PutV1CompensationsCompensationIDPaymentUnit, + PutV1CompensationsCompensationIDRequest, + PutV1CompensationsCompensationIDRequestBody, + PutV1CompensationsCompensationIDRequestBodyTypedDict, + PutV1CompensationsCompensationIDRequestTypedDict, + ) + from .put_v1_contractors_contractor_uuidop import ( + PutV1ContractorsContractorUUIDRequest, + PutV1ContractorsContractorUUIDRequestBody, + PutV1ContractorsContractorUUIDRequestBodyTypedDict, + PutV1ContractorsContractorUUIDRequestTypedDict, + PutV1ContractorsContractorUUIDType, + PutV1ContractorsContractorUUIDWageType, + ) + from .put_v1_employee_benefits_employee_benefit_idop import ( + PutV1EmployeeBenefitsEmployeeBenefitIDContribution, + PutV1EmployeeBenefitsEmployeeBenefitIDContributionTypedDict, + PutV1EmployeeBenefitsEmployeeBenefitIDDeductionReducesTaxableIncome, + PutV1EmployeeBenefitsEmployeeBenefitIDLimitOption, + PutV1EmployeeBenefitsEmployeeBenefitIDRequest, + PutV1EmployeeBenefitsEmployeeBenefitIDRequestBody, + PutV1EmployeeBenefitsEmployeeBenefitIDRequestBodyTypedDict, + PutV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, + PutV1EmployeeBenefitsEmployeeBenefitIDType, + PutV1EmployeeBenefitsEmployeeBenefitIDValue, + PutV1EmployeeBenefitsEmployeeBenefitIDValue2, + PutV1EmployeeBenefitsEmployeeBenefitIDValue2TypedDict, + PutV1EmployeeBenefitsEmployeeBenefitIDValueTypedDict, + ) + from .put_v1_employees_employee_id_rehireop import ( + PutV1EmployeesEmployeeIDRehireEmploymentStatus, + PutV1EmployeesEmployeeIDRehireRequest, + PutV1EmployeesEmployeeIDRehireRequestBody, + PutV1EmployeesEmployeeIDRehireRequestBodyTypedDict, + PutV1EmployeesEmployeeIDRehireRequestTypedDict, + ) + from .put_v1_employeesop import ( + PutV1EmployeesHeaderXGustoAPIVersion, + PutV1EmployeesRequest, + PutV1EmployeesRequestBody, + PutV1EmployeesRequestBodyTypedDict, + PutV1EmployeesRequestTypedDict, + ) + from .put_v1_garnishments_garnishment_idop import ( + PutV1GarnishmentsGarnishmentIDRequest, + PutV1GarnishmentsGarnishmentIDRequestBody, + PutV1GarnishmentsGarnishmentIDRequestBodyTypedDict, + PutV1GarnishmentsGarnishmentIDRequestTypedDict, + ) + from .put_v1_home_addresses_home_address_uuidop import ( + PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion, + PutV1HomeAddressesHomeAddressUUIDRequest, + PutV1HomeAddressesHomeAddressUUIDRequestBody, + PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict, + PutV1HomeAddressesHomeAddressUUIDRequestTypedDict, + ) + from .put_v1_jobs_job_idop import ( + PutV1JobsJobIDRequest, + PutV1JobsJobIDRequestBody, + PutV1JobsJobIDRequestBodyTypedDict, + PutV1JobsJobIDRequestTypedDict, + ) + from .put_v1_locations_location_idop import ( + HeaderXGustoAPIVersion, + PutV1LocationsLocationIDRequest, + PutV1LocationsLocationIDRequestBody, + PutV1LocationsLocationIDRequestBodyTypedDict, + PutV1LocationsLocationIDRequestTypedDict, + ) + from .put_v1_terminations_employee_idop import ( + PutV1TerminationsEmployeeIDRequest, + PutV1TerminationsEmployeeIDRequestBody, + PutV1TerminationsEmployeeIDRequestBodyTypedDict, + PutV1TerminationsEmployeeIDRequestTypedDict, + ) + from .put_v1_verify_webhook_subscription_uuidop import ( + PutV1VerifyWebhookSubscriptionUUIDRequest, + PutV1VerifyWebhookSubscriptionUUIDRequestBody, + PutV1VerifyWebhookSubscriptionUUIDRequestBodyTypedDict, + PutV1VerifyWebhookSubscriptionUUIDRequestTypedDict, + PutV1VerifyWebhookSubscriptionUUIDSecurity, + PutV1VerifyWebhookSubscriptionUUIDSecurityTypedDict, + ) + from .put_v1_webhook_subscription_uuidop import ( + PutV1WebhookSubscriptionUUIDRequest, + PutV1WebhookSubscriptionUUIDRequestBody, + PutV1WebhookSubscriptionUUIDRequestBodyTypedDict, + PutV1WebhookSubscriptionUUIDRequestTypedDict, + PutV1WebhookSubscriptionUUIDSecurity, + PutV1WebhookSubscriptionUUIDSecurityTypedDict, + PutV1WebhookSubscriptionUUIDSubscriptionTypes, + ) + from .put_v1_work_addresses_work_address_uuidop import ( + PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion, + PutV1WorkAddressesWorkAddressUUIDRequest, + PutV1WorkAddressesWorkAddressUUIDRequestBody, + PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict, + PutV1WorkAddressesWorkAddressUUIDRequestTypedDict, + ) + from .refresh_access_tokenop import ( + RefreshAccessTokenRequest, + RefreshAccessTokenRequestBody, + RefreshAccessTokenRequestBodyTypedDict, + RefreshAccessTokenRequestTypedDict, + ) + from .rehire import Rehire, RehireEmploymentStatus, RehireTypedDict + from .rehire_body import EmploymentStatus, RehireBody, RehireBodyTypedDict + from .report import Report, ReportTypedDict + from .responsevalidationerror import ResponseValidationError + from .revoke_access_tokenop import ( + RevokeAccessTokenRequest, + RevokeAccessTokenRequestBody, + RevokeAccessTokenRequestBodyTypedDict, + RevokeAccessTokenRequestTypedDict, + ) + from .security import Security, SecurityTypedDict + from .show_employees import ( + CurrentEmploymentStatus, + OnboardingDocumentsConfig, + OnboardingDocumentsConfigTypedDict, + OnboardingStatus, + PaymentMethod, + ShowEmployees, + ShowEmployeesTypedDict, + ) + from .sort_order import SortOrder + from .status import Status + from .supported_benefit import SupportedBenefit, SupportedBenefitTypedDict + from .termination import Termination, TerminationTypedDict + from .time_off_activity import ( + TimeOffActivity, + TimeOffActivityTypedDict, + TimeOffType, + ) + from .time_off_request import ( + Approver, + ApproverTypedDict, + Days, + DaysTypedDict, + Initiator, + InitiatorTypedDict, + RequestType, + TimeOffRequest, + TimeOffRequestEmployee, + TimeOffRequestEmployeeTypedDict, + TimeOffRequestStatus, + TimeOffRequestTypedDict, + ) + from .time_sheet import ( + Entries, + EntriesTypedDict, + PayClassification, + TimeSheet, + TimeSheetEntityType, + TimeSheetStatus, + TimeSheetTypedDict, + ) + from .time_sheet_sort_by import TimeSheetSortBy + from .time_sheet_sort_order import TimeSheetSortOrder + from .unprocessable_entity_error_object import ( + UnprocessableEntityErrorObject, + UnprocessableEntityErrorObjectData, + ) + from .unprocessed_termination_pay_period import ( + UnprocessedTerminationPayPeriod, + UnprocessedTerminationPayPeriodTypedDict, + ) + from .versionheader import VersionHeader + from .webhook_subscription import ( + SubscriptionTypes, + WebhookSubscription, + WebhookSubscriptionStatus, + WebhookSubscriptionTypedDict, + ) + from .webhooks_health_check_status import ( + WebhooksHealthCheckStatus, + WebhooksHealthCheckStatusStatus, + WebhooksHealthCheckStatusTypedDict, + ) + from .ytd_benefit_amounts_from_different_company import ( + YtdBenefitAmountsFromDifferentCompany, + YtdBenefitAmountsFromDifferentCompanyTypedDict, + ) __all__ = [ "APIError", @@ -1056,6 +1186,10 @@ "AdminTypedDict", "Agencies", "AgenciesTypedDict", + "Aggregation", + "AmountType", + "Approver", + "ApproverTypedDict", "Authentication", "AuthenticationTypedDict", "Base", @@ -1124,19 +1258,9 @@ "Contractor", "ContractorOnboardingStatus", "ContractorPayment", - "ContractorPaymentForGroup", - "ContractorPaymentForGroupPaymentMethod", - "ContractorPaymentForGroupStatus", - "ContractorPaymentForGroupTypedDict", - "ContractorPaymentForGroupWageType", - "ContractorPaymentGroup", - "ContractorPaymentGroupMinimal", - "ContractorPaymentGroupMinimalStatus", - "ContractorPaymentGroupMinimalTypedDict", - "ContractorPaymentGroupStatus", - "ContractorPaymentGroupTotals", - "ContractorPaymentGroupTotalsTypedDict", - "ContractorPaymentGroupTypedDict", + "ContractorPaymentDetailsList", + "ContractorPaymentDetailsListPaymentMethod", + "ContractorPaymentDetailsListTypedDict", "ContractorPaymentMethod", "ContractorPaymentPaymentMethod", "ContractorPaymentStatus", @@ -1156,7 +1280,10 @@ "ContractorTypedDict", "ContractorsModel", "ContractorsModelTypedDict", + "ContractorsSortBy", "Contribution", + "ContributionExclusion", + "ContributionExclusionTypedDict", "ContributionTypedDict", "CoverageAmount", "CoverageAmountTypedDict", @@ -1164,6 +1291,8 @@ "CoverageSalaryMultiplierTypedDict", "CurrentEmploymentStatus", "CustomFieldType", + "Days", + "DaysTypedDict", "DeductAsPercentage", "DeductAsPercentageTypedDict", "DeductionReducesTaxableIncome", @@ -1192,6 +1321,7 @@ "DeleteV1EmployeesEmployeeIDRehireRequestTypedDict", "DeleteV1EmployeesEmployeeIDTerminationsRequest", "DeleteV1EmployeesEmployeeIDTerminationsRequestTypedDict", + "DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion", "DeleteV1HomeAddressesHomeAddressUUIDRequest", "DeleteV1HomeAddressesHomeAddressUUIDRequestTypedDict", "DeleteV1JobsJobIDRequest", @@ -1200,6 +1330,7 @@ "DeleteV1WebhookSubscriptionUUIDRequestTypedDict", "DeleteV1WebhookSubscriptionUUIDSecurity", "DeleteV1WebhookSubscriptionUUIDSecurityTypedDict", + "DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion", "DeleteV1WorkAddressesWorkAddressUUIDRequest", "DeleteV1WorkAddressesWorkAddressUUIDRequestTypedDict", "Department", @@ -1224,10 +1355,17 @@ "EmployeeBenefitsModelTypedDict", "EmployeeCompensations", "EmployeeCompensationsTypedDict", + "EmployeeCurrentEmploymentStatus", "EmployeeCustomField", "EmployeeCustomFieldTypedDict", "EmployeeDeduction", "EmployeeDeductionTypedDict", + "EmployeeHomeAddress", + "EmployeeHomeAddressTypedDict", + "EmployeeOnboardingDocumentsConfig", + "EmployeeOnboardingDocumentsConfigTypedDict", + "EmployeeOnboardingStatus", + "EmployeePaymentMethod", "EmployeeTypedDict", "EmployeeWorkAddress", "EmployeeWorkAddressTypedDict", @@ -1259,10 +1397,15 @@ "GarnishmentChildSupportTypedDict", "GarnishmentType", "GarnishmentTypedDict", + "GeneralLedgerReport", + "GeneralLedgerReportTypedDict", "GetCompaniesCompanyUUIDTimeTrackingTimeSheetsRequest", "GetCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestTypedDict", "GetCompaniesDepartmentsRequest", "GetCompaniesDepartmentsRequestTypedDict", + "GetCompanyNotificationsHeaderXGustoAPIVersion", + "GetCompanyNotificationsRequest", + "GetCompanyNotificationsRequestTypedDict", "GetDepartmentRequest", "GetDepartmentRequestTypedDict", "GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequest", @@ -1271,6 +1414,8 @@ "GetEventsRequestTypedDict", "GetEventsSecurity", "GetEventsSecurityTypedDict", + "GetReportsRequestUUIDRequest", + "GetReportsRequestUUIDRequestTypedDict", "GetTimeTrackingTimeSheetsTimeSheetUUIDRequest", "GetTimeTrackingTimeSheetsTimeSheetUUIDRequestTypedDict", "GetV1BenefitsBenefitIDRequest", @@ -1287,12 +1432,13 @@ "GetV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict", "GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest", "GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict", - "GetV1CompaniesCompanyIDContractorPaymentGroupsRequest", - "GetV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict", "GetV1CompaniesCompanyIDContractorPaymentsRequest", "GetV1CompaniesCompanyIDContractorPaymentsRequestTypedDict", "GetV1CompaniesCompanyIDContractorPaymentsResponseBody", "GetV1CompaniesCompanyIDContractorPaymentsResponseBodyTypedDict", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsRequestTypedDict", "GetV1CompaniesCompanyIDCustomFieldsRequest", "GetV1CompaniesCompanyIDCustomFieldsRequestTypedDict", "GetV1CompaniesCompanyIDEarningTypesRequest", @@ -1310,26 +1456,31 @@ "GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestTypedDict", "GetV1CompaniesCompanyIDPaySchedulesRequest", "GetV1CompaniesCompanyIDPaySchedulesRequestTypedDict", + "GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion", + "GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion", "GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude", "GetV1CompaniesCompanyIDPayrollsPayrollIDRequest", "GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict", "GetV1CompaniesCompanyIDPayrollsQueryParamInclude", "GetV1CompaniesCompanyIDPayrollsRequest", "GetV1CompaniesCompanyIDPayrollsRequestTypedDict", + "GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion", + "GetV1CompaniesCompanyIDTimeOffRequestsRequest", + "GetV1CompaniesCompanyIDTimeOffRequestsRequestTypedDict", "GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequest", "GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequestTypedDict", "GetV1CompaniesCompanyUUIDContractorsRequest", "GetV1CompaniesCompanyUUIDContractorsRequestTypedDict", "GetV1CompaniesRequest", "GetV1CompaniesRequestTypedDict", + "GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest", + "GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict", "GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest", "GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict", "GetV1CompanyBenefitsCompanyBenefitIDRequest", "GetV1CompanyBenefitsCompanyBenefitIDRequestTypedDict", "GetV1CompensationsCompensationIDRequest", "GetV1CompensationsCompensationIDRequestTypedDict", - "GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest", - "GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict", "GetV1ContractorsContractorUUIDRequest", "GetV1ContractorsContractorUUIDRequestTypedDict", "GetV1EmployeeBenefitsEmployeeBenefitIDRequest", @@ -1345,6 +1496,7 @@ "GetV1EmployeesEmployeeIDEmploymentHistoryRequestTypedDict", "GetV1EmployeesEmployeeIDGarnishmentsRequest", "GetV1EmployeesEmployeeIDGarnishmentsRequestTypedDict", + "GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion", "GetV1EmployeesEmployeeIDHomeAddressesRequest", "GetV1EmployeesEmployeeIDHomeAddressesRequestTypedDict", "GetV1EmployeesEmployeeIDJobsQueryParamInclude", @@ -1354,6 +1506,7 @@ "GetV1EmployeesEmployeeIDRehireRequestTypedDict", "GetV1EmployeesEmployeeIDTerminationsRequest", "GetV1EmployeesEmployeeIDTerminationsRequestTypedDict", + "GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion", "GetV1EmployeesEmployeeIDWorkAddressesRequest", "GetV1EmployeesEmployeeIDWorkAddressesRequestTypedDict", "GetV1EmployeesHeaderXGustoAPIVersion", @@ -1363,6 +1516,7 @@ "GetV1GarnishmentsChildSupportRequestTypedDict", "GetV1GarnishmentsGarnishmentIDRequest", "GetV1GarnishmentsGarnishmentIDRequestTypedDict", + "GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion", "GetV1HomeAddressesHomeAddressUUIDRequest", "GetV1HomeAddressesHomeAddressUUIDRequestTypedDict", "GetV1JobsJobIDCompensationsQueryParamInclude", @@ -1393,10 +1547,17 @@ "GetV1WebhookSubscriptionsRequestTypedDict", "GetV1WebhookSubscriptionsSecurity", "GetV1WebhookSubscriptionsSecurityTypedDict", + "GetV1WebhooksHealthCheckHeaderXGustoAPIVersion", + "GetV1WebhooksHealthCheckRequest", + "GetV1WebhooksHealthCheckRequestTypedDict", + "GetV1WebhooksHealthCheckSecurity", + "GetV1WebhooksHealthCheckSecurityTypedDict", + "GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion", "GetV1WorkAddressesWorkAddressUUIDRequest", "GetV1WorkAddressesWorkAddressUUIDRequestTypedDict", "GetVersionEmployeesTimeOffActivitiesRequest", "GetVersionEmployeesTimeOffActivitiesRequestTypedDict", + "GustoAppIntegrationError", "HeaderXGustoAPIVersion", "HomeAddress", "HomeAddressTypedDict", @@ -1405,6 +1566,9 @@ "HourlyCompensationsTypedDict", "HourlyTypedDict", "Include", + "Initiator", + "InitiatorTypedDict", + "IntegrationType", "Job", "JobTypedDict", "Key", @@ -1423,6 +1587,11 @@ "MinimumWages", "MinimumWagesTypedDict", "Name", + "NoResponseError", + "Notification", + "NotificationEntityType", + "NotificationStatus", + "NotificationTypedDict", "OffCycleReasonType", "OnboardingDocumentsConfig", "OnboardingDocumentsConfigTypedDict", @@ -1468,29 +1637,58 @@ "PayrollEmployeeCompensationsTypeTypedDict", "PayrollFixedCompensationTypesType", "PayrollFixedCompensationTypesTypeTypedDict", - "PayrollMinimal", - "PayrollMinimalTypedDict", "PayrollPayPeriodType", "PayrollPayPeriodTypeTypedDict", "PayrollPaymentSpeedChangedType", "PayrollPaymentSpeedChangedTypeTypedDict", "PayrollPayrollStatusMetaType", "PayrollPayrollStatusMetaTypeTypedDict", + "PayrollPrepareSortBy", "PayrollPrepared", "PayrollPreparedTypedDict", "PayrollProcessingRequest", "PayrollProcessingRequestStatus", "PayrollProcessingRequestTypedDict", + "PayrollShow", + "PayrollShowAmountType", + "PayrollShowDeductions", + "PayrollShowDeductionsTypedDict", + "PayrollShowFixedCompensations", + "PayrollShowFixedCompensationsTypedDict", + "PayrollShowHourlyCompensations", + "PayrollShowHourlyCompensationsTypedDict", + "PayrollShowPaidTimeOff", + "PayrollShowPaidTimeOffTypedDict", + "PayrollShowPaymentMethod", + "PayrollShowReimbursements", + "PayrollShowReimbursementsTypedDict", + "PayrollShowTypedDict", "PayrollSubmissionBlockersType", "PayrollSubmissionBlockersTypeMetadata", "PayrollSubmissionBlockersTypeMetadataTypedDict", "PayrollSubmissionBlockersTypeStatus", "PayrollSubmissionBlockersTypeTypedDict", + "PayrollTaxesType", + "PayrollTaxesTypeTypedDict", "PayrollTotalsType", "PayrollTotalsTypeTypedDict", "PayrollType", "PayrollTypedDict", "PayrollTypes", + "PayrollUpdate", + "PayrollUpdateAmountType", + "PayrollUpdateDeductions", + "PayrollUpdateDeductionsTypedDict", + "PayrollUpdateEmployeeCompensations", + "PayrollUpdateEmployeeCompensationsTypedDict", + "PayrollUpdateFixedCompensations", + "PayrollUpdateFixedCompensationsTypedDict", + "PayrollUpdateHourlyCompensations", + "PayrollUpdateHourlyCompensationsTypedDict", + "PayrollUpdatePaidTimeOff", + "PayrollUpdatePaidTimeOffTypedDict", + "PayrollUpdatePaymentMethod", + "PayrollUpdateTypedDict", "PayrollWithholdingPayPeriodType", "PostCompaniesCompanyUUIDTimeTrackingTimeSheetsEntries", "PostCompaniesCompanyUUIDTimeTrackingTimeSheetsEntriesTypedDict", @@ -1507,17 +1705,16 @@ "PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest", "PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict", "PostEmployeeYtdBenefitAmountsFromDifferentCompanyTypedDict", + "PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation", + "PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequest", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBodyTypedDict", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestTypedDict", "PostV1CompaniesCompanyIDCompanyBenefitsRequest", "PostV1CompaniesCompanyIDCompanyBenefitsRequestBody", "PostV1CompaniesCompanyIDCompanyBenefitsRequestBodyTypedDict", "PostV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict", - "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments", - "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict", - "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod", - "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest", - "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody", - "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBodyTypedDict", - "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestTypedDict", "PostV1CompaniesCompanyIDEarningTypesRequest", "PostV1CompaniesCompanyIDEarningTypesRequestBody", "PostV1CompaniesCompanyIDEarningTypesRequestBodyTypedDict", @@ -1561,6 +1758,7 @@ "PostV1EmployeesEmployeeIDGarnishmentsRequestBody", "PostV1EmployeesEmployeeIDGarnishmentsRequestBodyTypedDict", "PostV1EmployeesEmployeeIDGarnishmentsRequestTypedDict", + "PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion", "PostV1EmployeesEmployeeIDHomeAddressesRequest", "PostV1EmployeesEmployeeIDHomeAddressesRequestBody", "PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict", @@ -1571,6 +1769,7 @@ "PostV1EmployeesEmployeeIDTerminationsRequestBody", "PostV1EmployeesEmployeeIDTerminationsRequestBodyTypedDict", "PostV1EmployeesEmployeeIDTerminationsRequestTypedDict", + "PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion", "PostV1EmployeesEmployeeIDWorkAddressesRequest", "PostV1EmployeesEmployeeIDWorkAddressesRequestBody", "PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict", @@ -1641,23 +1840,21 @@ "PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBody", "PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBodyTypedDict", "PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict", - "PutV1CompaniesCompanyIDPayrollsFixedCompensations", - "PutV1CompaniesCompanyIDPayrollsFixedCompensationsTypedDict", - "PutV1CompaniesCompanyIDPayrollsHourlyCompensations", - "PutV1CompaniesCompanyIDPayrollsHourlyCompensationsTypedDict", - "PutV1CompaniesCompanyIDPayrollsPaidTimeOff", - "PutV1CompaniesCompanyIDPayrollsPaidTimeOffTypedDict", - "PutV1CompaniesCompanyIDPayrollsPaymentMethod", + "PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion", "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBodyTypedDict", "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestTypedDict", "PutV1CompaniesCompanyIDPayrollsRequest", - "PutV1CompaniesCompanyIDPayrollsRequestBody", - "PutV1CompaniesCompanyIDPayrollsRequestBodyTypedDict", "PutV1CompaniesCompanyIDPayrollsRequestTypedDict", "PutV1CompaniesRequest", "PutV1CompaniesRequestBody", "PutV1CompaniesRequestBodyTypedDict", "PutV1CompaniesRequestTypedDict", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBodyTypedDict", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict", "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest", "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBody", "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBodyTypedDict", @@ -1697,6 +1894,7 @@ "PutV1EmployeesEmployeeIDRehireRequestBody", "PutV1EmployeesEmployeeIDRehireRequestBodyTypedDict", "PutV1EmployeesEmployeeIDRehireRequestTypedDict", + "PutV1EmployeesHeaderXGustoAPIVersion", "PutV1EmployeesRequest", "PutV1EmployeesRequestBody", "PutV1EmployeesRequestBodyTypedDict", @@ -1705,6 +1903,7 @@ "PutV1GarnishmentsGarnishmentIDRequestBody", "PutV1GarnishmentsGarnishmentIDRequestBodyTypedDict", "PutV1GarnishmentsGarnishmentIDRequestTypedDict", + "PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion", "PutV1HomeAddressesHomeAddressUUIDRequest", "PutV1HomeAddressesHomeAddressUUIDRequestBody", "PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict", @@ -1734,11 +1933,14 @@ "PutV1WebhookSubscriptionUUIDSecurity", "PutV1WebhookSubscriptionUUIDSecurityTypedDict", "PutV1WebhookSubscriptionUUIDSubscriptionTypes", + "PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion", "PutV1WorkAddressesWorkAddressUUIDRequest", "PutV1WorkAddressesWorkAddressUUIDRequestBody", "PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict", "PutV1WorkAddressesWorkAddressUUIDRequestTypedDict", "QueryParamInclude", + "QueryParamSortOrder", + "QueryParamStatus", "RefreshAccessTokenRequest", "RefreshAccessTokenRequestBody", "RefreshAccessTokenRequestBodyTypedDict", @@ -1748,6 +1950,11 @@ "RehireBodyTypedDict", "RehireEmploymentStatus", "RehireTypedDict", + "Reimbursements", + "ReimbursementsTypedDict", + "Report", + "ReportTypedDict", + "RequestType", "RequiredAttributes", "RequiredAttributesTypedDict", "Resource", @@ -1755,14 +1962,23 @@ "ResourceOwnerTypedDict", "ResourceType", "ResourceTypedDict", + "Resources", + "ResourcesTypedDict", + "ResponseValidationError", "RevokeAccessTokenRequest", "RevokeAccessTokenRequestBody", "RevokeAccessTokenRequestBodyTypedDict", "RevokeAccessTokenRequestTypedDict", "Security", "SecurityTypedDict", + "ShowEmployees", + "ShowEmployeesTypedDict", + "SortBy", "SortOrder", "Source", + "SplitBy", + "Splits", + "SplitsTypedDict", "Status", "SubscriptionTypes", "SupportedBenefit", @@ -1776,6 +1992,11 @@ "TiersTypedDict", "TimeOffActivity", "TimeOffActivityTypedDict", + "TimeOffRequest", + "TimeOffRequestEmployee", + "TimeOffRequestEmployeeTypedDict", + "TimeOffRequestStatus", + "TimeOffRequestTypedDict", "TimeOffType", "TimeSheet", "TimeSheetEntityType", @@ -1785,8 +2006,6 @@ "TimeSheetTypedDict", "Total", "TotalTypedDict", - "Totals", - "TotalsTypedDict", "Two", "TwoTypedDict", "Type", @@ -1809,8 +2028,913 @@ "WebhookSubscription", "WebhookSubscriptionStatus", "WebhookSubscriptionTypedDict", + "WebhooksHealthCheckStatus", + "WebhooksHealthCheckStatusStatus", + "WebhooksHealthCheckStatusTypedDict", "WithholdingPayPeriod", "XGustoAPIVersion", "YtdBenefitAmountsFromDifferentCompany", "YtdBenefitAmountsFromDifferentCompanyTypedDict", ] + +_dynamic_imports: dict[str, str] = { + "AccruingTimeOffHour": ".accruing_time_off_hour", + "AccruingTimeOffHourTypedDict": ".accruing_time_off_hour", + "AccruingTimeOffHourObject": ".accruing_time_off_hour_object", + "AccruingTimeOffHourObjectTypedDict": ".accruing_time_off_hour_object", + "Admin": ".admin", + "AdminTypedDict": ".admin", + "APIError": ".apierror", + "Authentication": ".authentication", + "AuthenticationTypedDict": ".authentication", + "BenefitSummary": ".benefit_summary", + "BenefitSummaryEmployees": ".benefit_summary", + "BenefitSummaryEmployeesTypedDict": ".benefit_summary", + "BenefitSummaryPayPeriod": ".benefit_summary", + "BenefitSummaryPayPeriodTypedDict": ".benefit_summary", + "BenefitSummaryTypedDict": ".benefit_summary", + "PayrollBenefits": ".benefit_summary", + "PayrollBenefitsTypedDict": ".benefit_summary", + "BenefitTypeRequirements": ".benefit_type_requirements", + "BenefitTypeRequirementsCatchUpDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsCatchUpDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsContribution": ".benefit_type_requirements", + "BenefitTypeRequirementsContributionTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsCoverageAmountDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsCoverageAmountDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsDeductAsPercentageDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsDeductAsPercentageDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsLimitOptionDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsLimitOptionDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsTypedDict": ".benefit_type_requirements", + "CatchUp": ".benefit_type_requirements", + "CatchUpTypedDict": ".benefit_type_requirements", + "CompanyContributionAnnualMaximum": ".benefit_type_requirements", + "CompanyContributionAnnualMaximumTypedDict": ".benefit_type_requirements", + "CoverageAmount": ".benefit_type_requirements", + "CoverageAmountTypedDict": ".benefit_type_requirements", + "CoverageSalaryMultiplier": ".benefit_type_requirements", + "CoverageSalaryMultiplierTypedDict": ".benefit_type_requirements", + "DeductAsPercentage": ".benefit_type_requirements", + "DeductAsPercentageTypedDict": ".benefit_type_requirements", + "DefaultValue": ".benefit_type_requirements", + "DefaultValueTypedDict": ".benefit_type_requirements", + "EmployeeDeduction": ".benefit_type_requirements", + "EmployeeDeductionTypedDict": ".benefit_type_requirements", + "LimitOption": ".benefit_type_requirements", + "LimitOptionTypedDict": ".benefit_type_requirements", + "Agencies": ".child_support_data", + "AgenciesTypedDict": ".child_support_data", + "ChildSupportData": ".child_support_data", + "ChildSupportDataTypedDict": ".child_support_data", + "FipsCodes": ".child_support_data", + "FipsCodesTypedDict": ".child_support_data", + "Key": ".child_support_data", + "RequiredAttributes": ".child_support_data", + "RequiredAttributesTypedDict": ".child_support_data", + "Company": ".company", + "CompanyEntityType": ".company", + "CompanyPaidTimeOff": ".company", + "CompanyPaidTimeOffTypedDict": ".company", + "CompanyStatus": ".company", + "CompanyTypedDict": ".company", + "Compensations": ".company", + "CompensationsTypedDict": ".company", + "Fixed": ".company", + "FixedTypedDict": ".company", + "FundingType": ".company", + "HomeAddress": ".company", + "HomeAddressTypedDict": ".company", + "Hourly": ".company", + "HourlyTypedDict": ".company", + "PayScheduleType": ".company", + "PrimaryPayrollAdmin": ".company", + "PrimaryPayrollAdminTypedDict": ".company", + "PrimarySignatory": ".company", + "PrimarySignatoryTypedDict": ".company", + "Tier": ".company", + "CompanyAddress": ".company_address", + "CompanyAddressTypedDict": ".company_address", + "CompanyBenefit": ".company_benefit", + "CompanyBenefitTypedDict": ".company_benefit", + "Source": ".company_benefit", + "CompanyBenefitWithEmployeeBenefits": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsContribution": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsContributionTypedDict": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsSource": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsTypedDict": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValue": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValue2": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValue2TypedDict": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValueTiers": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValueTiersTypedDict": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValueTypedDict": ".company_benefit_with_employee_benefits", + "EmployeeBenefitsModel": ".company_benefit_with_employee_benefits", + "EmployeeBenefitsModelTypedDict": ".company_benefit_with_employee_benefits", + "CompanyCustomField": ".company_custom_field", + "CompanyCustomFieldTypedDict": ".company_custom_field", + "CompanyCustomFieldList": ".company_custom_field_list", + "CompanyCustomFieldListTypedDict": ".company_custom_field_list", + "Compensation": ".compensation", + "CompensationTypedDict": ".compensation", + "MinimumWages": ".compensation", + "MinimumWagesTypedDict": ".compensation", + "PaymentUnit": ".compensation", + "Address": ".contractor", + "AddressTypedDict": ".contractor", + "Contractor": ".contractor", + "ContractorOnboardingStatus": ".contractor", + "ContractorPaymentMethod": ".contractor", + "ContractorType": ".contractor", + "ContractorTypedDict": ".contractor", + "WageType": ".contractor", + "ContractorPayment": ".contractor_payment", + "ContractorPaymentPaymentMethod": ".contractor_payment", + "ContractorPaymentStatus": ".contractor_payment", + "ContractorPaymentTypedDict": ".contractor_payment", + "ContractorPaymentWageType": ".contractor_payment", + "ContractorPaymentDetailsList": ".contractor_payment_details_list", + "ContractorPaymentDetailsListPaymentMethod": ".contractor_payment_details_list", + "ContractorPaymentDetailsListTypedDict": ".contractor_payment_details_list", + "SplitBy": ".contractor_payment_details_list", + "Splits": ".contractor_payment_details_list", + "SplitsTypedDict": ".contractor_payment_details_list", + "ContractorPaymentSummary": ".contractor_payment_summary", + "ContractorPaymentSummaryTypedDict": ".contractor_payment_summary", + "ContractorPaymentsModel": ".contractor_payment_summary", + "ContractorPaymentsModelTypedDict": ".contractor_payment_summary", + "Total": ".contractor_payment_summary", + "TotalTypedDict": ".contractor_payment_summary", + "ContractorPaymentSummaryByDates": ".contractor_payment_summary_by_dates", + "ContractorPaymentSummaryByDatesContractorPayments": ".contractor_payment_summary_by_dates", + "ContractorPaymentSummaryByDatesContractorPaymentsTypedDict": ".contractor_payment_summary_by_dates", + "ContractorPaymentSummaryByDatesTotal": ".contractor_payment_summary_by_dates", + "ContractorPaymentSummaryByDatesTotalTypedDict": ".contractor_payment_summary_by_dates", + "ContractorPaymentSummaryByDatesTypedDict": ".contractor_payment_summary_by_dates", + "ContractorsSortBy": ".contractors_sort_by", + "ContributionExclusion": ".contribution_exclusion", + "ContributionExclusionTypedDict": ".contribution_exclusion", + "CustomFieldType": ".custom_field_type", + "DeleteDepartmentRequest": ".delete_departmentop", + "DeleteDepartmentRequestTypedDict": ".delete_departmentop", + "DeleteTimeTrackingTimeSheetsTimeSheetUUIDRequest": ".delete_time_tracking_time_sheets_time_sheet_uuidop", + "DeleteTimeTrackingTimeSheetsTimeSheetUUIDRequestTypedDict": ".delete_time_tracking_time_sheets_time_sheet_uuidop", + "DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest": ".delete_v1_companies_company_id_earning_types_earning_type_uuidop", + "DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict": ".delete_v1_companies_company_id_earning_types_earning_type_uuidop", + "Base": ".delete_v1_company_benefits_company_benefit_idop", + "BaseTypedDict": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompanyBenefitsCompanyBenefitIDRequest": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompanyBenefitsCompanyBenefitIDRequestTypedDict": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData": ".delete_v1_company_benefits_company_benefit_idop", + "Errors": ".delete_v1_company_benefits_company_benefit_idop", + "ErrorsTypedDict": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompensationsCompensationIDRequest": ".delete_v1_compensations_compensation_idop", + "DeleteV1CompensationsCompensationIDRequestTypedDict": ".delete_v1_compensations_compensation_idop", + "DeleteV1EmployeeBenefitsEmployeeBenefitIDRequest": ".delete_v1_employee_benefits_employee_benefit_idop", + "DeleteV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict": ".delete_v1_employee_benefits_employee_benefit_idop", + "DeleteV1EmployeeHeaderXGustoAPIVersion": ".delete_v1_employeeop", + "DeleteV1EmployeeRequest": ".delete_v1_employeeop", + "DeleteV1EmployeeRequestTypedDict": ".delete_v1_employeeop", + "DeleteV1EmployeesEmployeeIDRehireRequest": ".delete_v1_employees_employee_id_rehireop", + "DeleteV1EmployeesEmployeeIDRehireRequestTypedDict": ".delete_v1_employees_employee_id_rehireop", + "DeleteV1EmployeesEmployeeIDTerminationsRequest": ".delete_v1_employees_employee_id_terminationsop", + "DeleteV1EmployeesEmployeeIDTerminationsRequestTypedDict": ".delete_v1_employees_employee_id_terminationsop", + "DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion": ".delete_v1_home_addresses_home_address_uuidop", + "DeleteV1HomeAddressesHomeAddressUUIDRequest": ".delete_v1_home_addresses_home_address_uuidop", + "DeleteV1HomeAddressesHomeAddressUUIDRequestTypedDict": ".delete_v1_home_addresses_home_address_uuidop", + "DeleteV1JobsJobIDRequest": ".delete_v1_jobs_job_idop", + "DeleteV1JobsJobIDRequestTypedDict": ".delete_v1_jobs_job_idop", + "DeleteV1WebhookSubscriptionUUIDRequest": ".delete_v1_webhook_subscription_uuidop", + "DeleteV1WebhookSubscriptionUUIDRequestTypedDict": ".delete_v1_webhook_subscription_uuidop", + "DeleteV1WebhookSubscriptionUUIDSecurity": ".delete_v1_webhook_subscription_uuidop", + "DeleteV1WebhookSubscriptionUUIDSecurityTypedDict": ".delete_v1_webhook_subscription_uuidop", + "DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion": ".delete_v1_work_addresses_work_address_uuidop", + "DeleteV1WorkAddressesWorkAddressUUIDRequest": ".delete_v1_work_addresses_work_address_uuidop", + "DeleteV1WorkAddressesWorkAddressUUIDRequestTypedDict": ".delete_v1_work_addresses_work_address_uuidop", + "ContractorsModel": ".department", + "ContractorsModelTypedDict": ".department", + "Department": ".department", + "DepartmentTypedDict": ".department", + "EmployeesModel": ".department", + "EmployeesModelTypedDict": ".department", + "EarningType": ".earning_type", + "EarningTypeTypedDict": ".earning_type", + "EarningTypeList": ".earning_type_list", + "EarningTypeListTypedDict": ".earning_type_list", + "Employee": ".employee", + "EmployeeCurrentEmploymentStatus": ".employee", + "EmployeeOnboardingDocumentsConfig": ".employee", + "EmployeeOnboardingDocumentsConfigTypedDict": ".employee", + "EmployeeOnboardingStatus": ".employee", + "EmployeePaymentMethod": ".employee", + "EmployeeTypedDict": ".employee", + "EmployeeAddress": ".employee_address", + "EmployeeAddressTypedDict": ".employee_address", + "Contribution": ".employee_benefit", + "ContributionTypedDict": ".employee_benefit", + "DeductionReducesTaxableIncome": ".employee_benefit", + "EmployeeBenefit": ".employee_benefit", + "EmployeeBenefitTypedDict": ".employee_benefit", + "Tiers": ".employee_benefit", + "TiersTypedDict": ".employee_benefit", + "Two": ".employee_benefit", + "TwoTypedDict": ".employee_benefit", + "Value": ".employee_benefit", + "ValueTypedDict": ".employee_benefit", + "EmployeeBenefitForCompanyBenefit": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitContribution": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitContributionTypedDict": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitTypedDict": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitValue": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitValueTypedDict": ".employee_benefit_for_company_benefit", + "Value2": ".employee_benefit_for_company_benefit", + "Value2TypedDict": ".employee_benefit_for_company_benefit", + "ValueTiers": ".employee_benefit_for_company_benefit", + "ValueTiersTypedDict": ".employee_benefit_for_company_benefit", + "EmployeeCustomField": ".employee_custom_field", + "EmployeeCustomFieldTypedDict": ".employee_custom_field", + "EmployeeHomeAddress": ".employee_home_address", + "EmployeeHomeAddressTypedDict": ".employee_home_address", + "EmployeeWorkAddress": ".employee_work_address", + "EmployeeWorkAddressTypedDict": ".employee_work_address", + "EmploymentHistoryList": ".employment_history_list", + "EmploymentHistoryListEmploymentStatus": ".employment_history_list", + "EmploymentHistoryListTypedDict": ".employment_history_list", + "EntityErrorObject": ".entity_error_object", + "EntityErrorObjectTypedDict": ".entity_error_object", + "Metadata": ".entity_error_object", + "MetadataTypedDict": ".entity_error_object", + "EntityType": ".entity_type", + "Event": ".event", + "EventTypedDict": ".event", + "ResourceType": ".event", + "FlsaStatusType": ".flsa_status_type", + "Garnishment": ".garnishment", + "GarnishmentType": ".garnishment", + "GarnishmentTypedDict": ".garnishment", + "GarnishmentChildSupport": ".garnishment_child_support", + "GarnishmentChildSupportTypedDict": ".garnishment_child_support", + "PaymentPeriod": ".garnishment_child_support", + "Aggregation": ".general_ledger_report", + "GeneralLedgerReport": ".general_ledger_report", + "GeneralLedgerReportTypedDict": ".general_ledger_report", + "IntegrationType": ".general_ledger_report", + "GetCompaniesCompanyUUIDTimeTrackingTimeSheetsRequest": ".get_companies_company_uuid_time_tracking_time_sheetsop", + "GetCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestTypedDict": ".get_companies_company_uuid_time_tracking_time_sheetsop", + "GetCompaniesDepartmentsRequest": ".get_companies_departmentsop", + "GetCompaniesDepartmentsRequestTypedDict": ".get_companies_departmentsop", + "GetCompanyNotificationsHeaderXGustoAPIVersion": ".get_company_notificationsop", + "GetCompanyNotificationsRequest": ".get_company_notificationsop", + "GetCompanyNotificationsRequestTypedDict": ".get_company_notificationsop", + "QueryParamStatus": ".get_company_notificationsop", + "GetDepartmentRequest": ".get_departmentop", + "GetDepartmentRequestTypedDict": ".get_departmentop", + "GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequest": ".get_employee_ytd_benefit_amounts_from_different_companyop", + "GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict": ".get_employee_ytd_benefit_amounts_from_different_companyop", + "GetEventsRequest": ".get_eventsop", + "GetEventsRequestTypedDict": ".get_eventsop", + "GetEventsSecurity": ".get_eventsop", + "GetEventsSecurityTypedDict": ".get_eventsop", + "GetReportsRequestUUIDRequest": ".get_reports_request_uuidop", + "GetReportsRequestUUIDRequestTypedDict": ".get_reports_request_uuidop", + "GetTimeTrackingTimeSheetsTimeSheetUUIDRequest": ".get_time_tracking_time_sheets_time_sheet_uuidop", + "GetTimeTrackingTimeSheetsTimeSheetUUIDRequestTypedDict": ".get_time_tracking_time_sheets_time_sheet_uuidop", + "GetV1BenefitsBenefitIDRequest": ".get_v1_benefits_benefit_idop", + "GetV1BenefitsBenefitIDRequestTypedDict": ".get_v1_benefits_benefit_idop", + "GetV1BenefitsBenefitsIDRequirementsRequest": ".get_v1_benefits_benefits_id_requirementsop", + "GetV1BenefitsBenefitsIDRequirementsRequestTypedDict": ".get_v1_benefits_benefits_id_requirementsop", + "GetV1BenefitsCompanyBenefitIDSummaryRequest": ".get_v1_benefits_company_benefit_id_summaryop", + "GetV1BenefitsCompanyBenefitIDSummaryRequestTypedDict": ".get_v1_benefits_company_benefit_id_summaryop", + "GetV1BenefitsRequest": ".get_v1_benefitsop", + "GetV1BenefitsRequestTypedDict": ".get_v1_benefitsop", + "GetV1CompaniesCompanyIDAdminsRequest": ".get_v1_companies_company_id_adminsop", + "GetV1CompaniesCompanyIDAdminsRequestTypedDict": ".get_v1_companies_company_id_adminsop", + "GetV1CompaniesCompanyIDCompanyBenefitsRequest": ".get_v1_companies_company_id_company_benefitsop", + "GetV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict": ".get_v1_companies_company_id_company_benefitsop", + "GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest": ".get_v1_companies_company_id_contractor_payment_contractor_paymentop", + "GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict": ".get_v1_companies_company_id_contractor_payment_contractor_paymentop", + "GetV1CompaniesCompanyIDContractorPaymentsRequest": ".get_v1_companies_company_id_contractor_paymentsop", + "GetV1CompaniesCompanyIDContractorPaymentsRequestTypedDict": ".get_v1_companies_company_id_contractor_paymentsop", + "GetV1CompaniesCompanyIDContractorPaymentsResponseBody": ".get_v1_companies_company_id_contractor_paymentsop", + "GetV1CompaniesCompanyIDContractorPaymentsResponseBodyTypedDict": ".get_v1_companies_company_id_contractor_paymentsop", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion": ".get_v1_companies_company_id_contractors_payment_detailsop", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest": ".get_v1_companies_company_id_contractors_payment_detailsop", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsRequestTypedDict": ".get_v1_companies_company_id_contractors_payment_detailsop", + "GetV1CompaniesCompanyIDCustomFieldsRequest": ".get_v1_companies_company_id_custom_fieldsop", + "GetV1CompaniesCompanyIDCustomFieldsRequestTypedDict": ".get_v1_companies_company_id_custom_fieldsop", + "GetV1CompaniesCompanyIDEarningTypesRequest": ".get_v1_companies_company_id_earning_typesop", + "GetV1CompaniesCompanyIDEarningTypesRequestTypedDict": ".get_v1_companies_company_id_earning_typesop", + "GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion": ".get_v1_companies_company_id_employeesop", + "GetV1CompaniesCompanyIDEmployeesRequest": ".get_v1_companies_company_id_employeesop", + "GetV1CompaniesCompanyIDEmployeesRequestTypedDict": ".get_v1_companies_company_id_employeesop", + "Include": ".get_v1_companies_company_id_employeesop", + "GetV1CompaniesCompanyIDLocationsRequest": ".get_v1_companies_company_id_locationsop", + "GetV1CompaniesCompanyIDLocationsRequestTypedDict": ".get_v1_companies_company_id_locationsop", + "GetV1CompaniesCompanyIDPayPeriodsRequest": ".get_v1_companies_company_id_pay_periodsop", + "GetV1CompaniesCompanyIDPayPeriodsRequestTypedDict": ".get_v1_companies_company_id_pay_periodsop", + "GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequest": ".get_v1_companies_company_id_pay_schedules_assignmentsop", + "GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequestTypedDict": ".get_v1_companies_company_id_pay_schedules_assignmentsop", + "GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequest": ".get_v1_companies_company_id_pay_schedules_pay_schedule_idop", + "GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestTypedDict": ".get_v1_companies_company_id_pay_schedules_pay_schedule_idop", + "GetV1CompaniesCompanyIDPaySchedulesRequest": ".get_v1_companies_company_id_pay_schedulesop", + "GetV1CompaniesCompanyIDPaySchedulesRequestTypedDict": ".get_v1_companies_company_id_pay_schedulesop", + "GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion": ".get_v1_companies_company_id_payrolls_payroll_idop", + "GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude": ".get_v1_companies_company_id_payrolls_payroll_idop", + "GetV1CompaniesCompanyIDPayrollsPayrollIDRequest": ".get_v1_companies_company_id_payrolls_payroll_idop", + "GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict": ".get_v1_companies_company_id_payrolls_payroll_idop", + "SortBy": ".get_v1_companies_company_id_payrolls_payroll_idop", + "GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion": ".get_v1_companies_company_id_payrollsop", + "GetV1CompaniesCompanyIDPayrollsQueryParamInclude": ".get_v1_companies_company_id_payrollsop", + "GetV1CompaniesCompanyIDPayrollsRequest": ".get_v1_companies_company_id_payrollsop", + "GetV1CompaniesCompanyIDPayrollsRequestTypedDict": ".get_v1_companies_company_id_payrollsop", + "PayrollTypes": ".get_v1_companies_company_id_payrollsop", + "ProcessingStatuses": ".get_v1_companies_company_id_payrollsop", + "QueryParamSortOrder": ".get_v1_companies_company_id_payrollsop", + "GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion": ".get_v1_companies_company_id_time_off_requestsop", + "GetV1CompaniesCompanyIDTimeOffRequestsRequest": ".get_v1_companies_company_id_time_off_requestsop", + "GetV1CompaniesCompanyIDTimeOffRequestsRequestTypedDict": ".get_v1_companies_company_id_time_off_requestsop", + "GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequest": ".get_v1_companies_company_id_unprocessed_termination_pay_periodsop", + "GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequestTypedDict": ".get_v1_companies_company_id_unprocessed_termination_pay_periodsop", + "GetV1CompaniesCompanyUUIDContractorsRequest": ".get_v1_companies_company_uuid_contractorsop", + "GetV1CompaniesCompanyUUIDContractorsRequestTypedDict": ".get_v1_companies_company_uuid_contractorsop", + "GetV1CompaniesRequest": ".get_v1_companiesop", + "GetV1CompaniesRequestTypedDict": ".get_v1_companiesop", + "GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest": ".get_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict": ".get_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest": ".get_v1_company_benefits_company_benefit_id_employee_benefitsop", + "GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict": ".get_v1_company_benefits_company_benefit_id_employee_benefitsop", + "GetV1CompanyBenefitsCompanyBenefitIDRequest": ".get_v1_company_benefits_company_benefit_idop", + "GetV1CompanyBenefitsCompanyBenefitIDRequestTypedDict": ".get_v1_company_benefits_company_benefit_idop", + "GetV1CompensationsCompensationIDRequest": ".get_v1_compensations_compensation_idop", + "GetV1CompensationsCompensationIDRequestTypedDict": ".get_v1_compensations_compensation_idop", + "GetV1ContractorsContractorUUIDRequest": ".get_v1_contractors_contractor_uuidop", + "GetV1ContractorsContractorUUIDRequestTypedDict": ".get_v1_contractors_contractor_uuidop", + "GetV1EmployeeBenefitsEmployeeBenefitIDRequest": ".get_v1_employee_benefits_employee_benefit_idop", + "GetV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict": ".get_v1_employee_benefits_employee_benefit_idop", + "GetV1EmployeesEmployeeIDCustomFieldsRequest": ".get_v1_employees_employee_id_custom_fieldsop", + "GetV1EmployeesEmployeeIDCustomFieldsRequestTypedDict": ".get_v1_employees_employee_id_custom_fieldsop", + "GetV1EmployeesEmployeeIDCustomFieldsResponseBody": ".get_v1_employees_employee_id_custom_fieldsop", + "GetV1EmployeesEmployeeIDCustomFieldsResponseBodyTypedDict": ".get_v1_employees_employee_id_custom_fieldsop", + "GetV1EmployeesEmployeeIDEmployeeBenefitsRequest": ".get_v1_employees_employee_id_employee_benefitsop", + "GetV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict": ".get_v1_employees_employee_id_employee_benefitsop", + "GetV1EmployeesEmployeeIDEmploymentHistoryHeaderXGustoAPIVersion": ".get_v1_employees_employee_id_employment_historyop", + "GetV1EmployeesEmployeeIDEmploymentHistoryRequest": ".get_v1_employees_employee_id_employment_historyop", + "GetV1EmployeesEmployeeIDEmploymentHistoryRequestTypedDict": ".get_v1_employees_employee_id_employment_historyop", + "GetV1EmployeesEmployeeIDGarnishmentsRequest": ".get_v1_employees_employee_id_garnishmentsop", + "GetV1EmployeesEmployeeIDGarnishmentsRequestTypedDict": ".get_v1_employees_employee_id_garnishmentsop", + "GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion": ".get_v1_employees_employee_id_home_addressesop", + "GetV1EmployeesEmployeeIDHomeAddressesRequest": ".get_v1_employees_employee_id_home_addressesop", + "GetV1EmployeesEmployeeIDHomeAddressesRequestTypedDict": ".get_v1_employees_employee_id_home_addressesop", + "GetV1EmployeesEmployeeIDJobsQueryParamInclude": ".get_v1_employees_employee_id_jobsop", + "GetV1EmployeesEmployeeIDJobsRequest": ".get_v1_employees_employee_id_jobsop", + "GetV1EmployeesEmployeeIDJobsRequestTypedDict": ".get_v1_employees_employee_id_jobsop", + "GetV1EmployeesEmployeeIDRehireRequest": ".get_v1_employees_employee_id_rehireop", + "GetV1EmployeesEmployeeIDRehireRequestTypedDict": ".get_v1_employees_employee_id_rehireop", + "GetV1EmployeesEmployeeIDTerminationsRequest": ".get_v1_employees_employee_id_terminationsop", + "GetV1EmployeesEmployeeIDTerminationsRequestTypedDict": ".get_v1_employees_employee_id_terminationsop", + "GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion": ".get_v1_employees_employee_id_work_addressesop", + "GetV1EmployeesEmployeeIDWorkAddressesRequest": ".get_v1_employees_employee_id_work_addressesop", + "GetV1EmployeesEmployeeIDWorkAddressesRequestTypedDict": ".get_v1_employees_employee_id_work_addressesop", + "GetV1EmployeesHeaderXGustoAPIVersion": ".get_v1_employeesop", + "GetV1EmployeesRequest": ".get_v1_employeesop", + "GetV1EmployeesRequestTypedDict": ".get_v1_employeesop", + "QueryParamInclude": ".get_v1_employeesop", + "GetV1GarnishmentsChildSupportRequest": ".get_v1_garnishments_child_supportop", + "GetV1GarnishmentsChildSupportRequestTypedDict": ".get_v1_garnishments_child_supportop", + "GetV1GarnishmentsGarnishmentIDRequest": ".get_v1_garnishments_garnishment_idop", + "GetV1GarnishmentsGarnishmentIDRequestTypedDict": ".get_v1_garnishments_garnishment_idop", + "GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion": ".get_v1_home_addresses_home_address_uuidop", + "GetV1HomeAddressesHomeAddressUUIDRequest": ".get_v1_home_addresses_home_address_uuidop", + "GetV1HomeAddressesHomeAddressUUIDRequestTypedDict": ".get_v1_home_addresses_home_address_uuidop", + "GetV1JobsJobIDCompensationsQueryParamInclude": ".get_v1_jobs_job_id_compensationsop", + "GetV1JobsJobIDCompensationsRequest": ".get_v1_jobs_job_id_compensationsop", + "GetV1JobsJobIDCompensationsRequestTypedDict": ".get_v1_jobs_job_id_compensationsop", + "GetV1JobsJobIDQueryParamInclude": ".get_v1_jobs_job_idop", + "GetV1JobsJobIDRequest": ".get_v1_jobs_job_idop", + "GetV1JobsJobIDRequestTypedDict": ".get_v1_jobs_job_idop", + "GetV1LocationsLocationIDRequest": ".get_v1_locations_location_idop", + "GetV1LocationsLocationIDRequestTypedDict": ".get_v1_locations_location_idop", + "XGustoAPIVersion": ".get_v1_locations_location_idop", + "GetV1LocationsLocationUUIDMinimumWagesHeaderXGustoAPIVersion": ".get_v1_locations_location_uuid_minimum_wagesop", + "GetV1LocationsLocationUUIDMinimumWagesRequest": ".get_v1_locations_location_uuid_minimum_wagesop", + "GetV1LocationsLocationUUIDMinimumWagesRequestTypedDict": ".get_v1_locations_location_uuid_minimum_wagesop", + "GetV1TokenInfoRequest": ".get_v1_token_infoop", + "GetV1TokenInfoRequestTypedDict": ".get_v1_token_infoop", + "GetV1TokenInfoResponseBody": ".get_v1_token_infoop", + "GetV1TokenInfoResponseBodyTypedDict": ".get_v1_token_infoop", + "GetV1TokenInfoType": ".get_v1_token_infoop", + "Resource": ".get_v1_token_infoop", + "ResourceOwner": ".get_v1_token_infoop", + "ResourceOwnerTypedDict": ".get_v1_token_infoop", + "ResourceTypedDict": ".get_v1_token_infoop", + "GetV1WebhookSubscriptionUUIDRequest": ".get_v1_webhook_subscription_uuidop", + "GetV1WebhookSubscriptionUUIDRequestTypedDict": ".get_v1_webhook_subscription_uuidop", + "GetV1WebhookSubscriptionUUIDSecurity": ".get_v1_webhook_subscription_uuidop", + "GetV1WebhookSubscriptionUUIDSecurityTypedDict": ".get_v1_webhook_subscription_uuidop", + "GetV1WebhookSubscriptionVerificationTokenUUIDRequest": ".get_v1_webhook_subscription_verification_token_uuidop", + "GetV1WebhookSubscriptionVerificationTokenUUIDRequestTypedDict": ".get_v1_webhook_subscription_verification_token_uuidop", + "GetV1WebhookSubscriptionVerificationTokenUUIDSecurity": ".get_v1_webhook_subscription_verification_token_uuidop", + "GetV1WebhookSubscriptionVerificationTokenUUIDSecurityTypedDict": ".get_v1_webhook_subscription_verification_token_uuidop", + "GetV1WebhookSubscriptionsRequest": ".get_v1_webhook_subscriptionsop", + "GetV1WebhookSubscriptionsRequestTypedDict": ".get_v1_webhook_subscriptionsop", + "GetV1WebhookSubscriptionsSecurity": ".get_v1_webhook_subscriptionsop", + "GetV1WebhookSubscriptionsSecurityTypedDict": ".get_v1_webhook_subscriptionsop", + "GetV1WebhooksHealthCheckHeaderXGustoAPIVersion": ".get_v1_webhooks_health_checkop", + "GetV1WebhooksHealthCheckRequest": ".get_v1_webhooks_health_checkop", + "GetV1WebhooksHealthCheckRequestTypedDict": ".get_v1_webhooks_health_checkop", + "GetV1WebhooksHealthCheckSecurity": ".get_v1_webhooks_health_checkop", + "GetV1WebhooksHealthCheckSecurityTypedDict": ".get_v1_webhooks_health_checkop", + "GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion": ".get_v1_work_addresses_work_address_uuidop", + "GetV1WorkAddressesWorkAddressUUIDRequest": ".get_v1_work_addresses_work_address_uuidop", + "GetV1WorkAddressesWorkAddressUUIDRequestTypedDict": ".get_v1_work_addresses_work_address_uuidop", + "GetVersionEmployeesTimeOffActivitiesRequest": ".get_version_employees_time_off_activitiesop", + "GetVersionEmployeesTimeOffActivitiesRequestTypedDict": ".get_version_employees_time_off_activitiesop", + "Job": ".job", + "JobTypedDict": ".job", + "Location": ".location", + "LocationTypedDict": ".location", + "MetadataWithMultipleEntities": ".metadata_with_multiple_entities", + "MetadataWithMultipleEntitiesTypedDict": ".metadata_with_multiple_entities", + "MetadataWithOneEntity": ".metadata_with_one_entity", + "MetadataWithOneEntityTypedDict": ".metadata_with_one_entity", + "MinimumWage": ".minimum_wage", + "MinimumWageTypedDict": ".minimum_wage", + "NoResponseError": ".no_response_error", + "Notification": ".notification", + "NotificationEntityType": ".notification", + "NotificationStatus": ".notification", + "NotificationTypedDict": ".notification", + "Resources": ".notification", + "ResourcesTypedDict": ".notification", + "OffCycleReasonType": ".off_cycle_reason_type", + "Name": ".paid_time_off", + "PaidTimeOff": ".paid_time_off", + "PaidTimeOffTypedDict": ".paid_time_off", + "PayPeriod": ".pay_period", + "PayPeriodPayroll": ".pay_period", + "PayPeriodPayrollTypedDict": ".pay_period", + "PayPeriodTypedDict": ".pay_period", + "PayrollType": ".pay_period", + "PayScheduleAssignment": ".pay_schedule_assignment", + "PayScheduleAssignmentTypedDict": ".pay_schedule_assignment", + "Type": ".pay_schedule_assignment", + "PayScheduleAssignmentDepartment": ".pay_schedule_assignment_department", + "PayScheduleAssignmentDepartmentTypedDict": ".pay_schedule_assignment_department", + "PayScheduleAssignmentEmployee": ".pay_schedule_assignment_employee", + "PayScheduleAssignmentEmployeeTypedDict": ".pay_schedule_assignment_employee", + "PayScheduleFrequency": ".pay_schedule_frequency", + "PayScheduleList": ".pay_schedule_list", + "PayScheduleListTypedDict": ".pay_schedule_list", + "PayScheduleObject": ".pay_schedule_object", + "PayScheduleObjectTypedDict": ".pay_schedule_object", + "Payroll": ".payroll", + "PayrollTypedDict": ".payroll", + "PayrollCompanyTaxesType": ".payroll_company_taxes_type", + "PayrollCompanyTaxesTypeTypedDict": ".payroll_company_taxes_type", + "PayrollCreditBlockersType": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeMetadata": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeMetadataTypedDict": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeStatus": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeTypedDict": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeUnblockOptions": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeUnblockOptionsTypedDict": ".payroll_credit_blockers_type", + "AmountType": ".payroll_employee_compensations_type", + "Deductions": ".payroll_employee_compensations_type", + "DeductionsTypedDict": ".payroll_employee_compensations_type", + "FixedCompensations": ".payroll_employee_compensations_type", + "FixedCompensationsTypedDict": ".payroll_employee_compensations_type", + "HourlyCompensations": ".payroll_employee_compensations_type", + "HourlyCompensationsTypedDict": ".payroll_employee_compensations_type", + "PayrollEmployeeCompensationsType": ".payroll_employee_compensations_type", + "PayrollEmployeeCompensationsTypePaidTimeOff": ".payroll_employee_compensations_type", + "PayrollEmployeeCompensationsTypePaidTimeOffTypedDict": ".payroll_employee_compensations_type", + "PayrollEmployeeCompensationsTypePaymentMethod": ".payroll_employee_compensations_type", + "PayrollEmployeeCompensationsTypeTypedDict": ".payroll_employee_compensations_type", + "Reimbursements": ".payroll_employee_compensations_type", + "ReimbursementsTypedDict": ".payroll_employee_compensations_type", + "PayrollFixedCompensationTypesType": ".payroll_fixed_compensation_types_type", + "PayrollFixedCompensationTypesTypeTypedDict": ".payroll_fixed_compensation_types_type", + "PayrollPayPeriodType": ".payroll_pay_period_type", + "PayrollPayPeriodTypeTypedDict": ".payroll_pay_period_type", + "PayrollPaymentSpeedChangedType": ".payroll_payment_speed_changed_type", + "PayrollPaymentSpeedChangedTypeTypedDict": ".payroll_payment_speed_changed_type", + "PayrollPayrollStatusMetaType": ".payroll_payroll_status_meta_type", + "PayrollPayrollStatusMetaTypeTypedDict": ".payroll_payroll_status_meta_type", + "PayrollPrepareSortBy": ".payroll_prepare_sort_by", + "PayrollPrepared": ".payroll_prepared", + "PayrollPreparedTypedDict": ".payroll_prepared", + "PayrollProcessingRequest": ".payroll_processing_request", + "PayrollProcessingRequestStatus": ".payroll_processing_request", + "PayrollProcessingRequestTypedDict": ".payroll_processing_request", + "Benefits": ".payroll_show", + "BenefitsTypedDict": ".payroll_show", + "EmployeeCompensations": ".payroll_show", + "EmployeeCompensationsTypedDict": ".payroll_show", + "PayrollShow": ".payroll_show", + "PayrollShowAmountType": ".payroll_show", + "PayrollShowDeductions": ".payroll_show", + "PayrollShowDeductionsTypedDict": ".payroll_show", + "PayrollShowFixedCompensations": ".payroll_show", + "PayrollShowFixedCompensationsTypedDict": ".payroll_show", + "PayrollShowHourlyCompensations": ".payroll_show", + "PayrollShowHourlyCompensationsTypedDict": ".payroll_show", + "PayrollShowPaidTimeOff": ".payroll_show", + "PayrollShowPaidTimeOffTypedDict": ".payroll_show", + "PayrollShowPaymentMethod": ".payroll_show", + "PayrollShowReimbursements": ".payroll_show", + "PayrollShowReimbursementsTypedDict": ".payroll_show", + "PayrollShowTypedDict": ".payroll_show", + "Taxes": ".payroll_show", + "TaxesTypedDict": ".payroll_show", + "PayrollSubmissionBlockersType": ".payroll_submission_blockers_type", + "PayrollSubmissionBlockersTypeMetadata": ".payroll_submission_blockers_type", + "PayrollSubmissionBlockersTypeMetadataTypedDict": ".payroll_submission_blockers_type", + "PayrollSubmissionBlockersTypeStatus": ".payroll_submission_blockers_type", + "PayrollSubmissionBlockersTypeTypedDict": ".payroll_submission_blockers_type", + "UnblockOptions": ".payroll_submission_blockers_type", + "UnblockOptionsTypedDict": ".payroll_submission_blockers_type", + "PayrollTaxesType": ".payroll_taxes_type", + "PayrollTaxesTypeTypedDict": ".payroll_taxes_type", + "PayrollTotalsType": ".payroll_totals_type", + "PayrollTotalsTypeTypedDict": ".payroll_totals_type", + "PayrollUpdate": ".payroll_update", + "PayrollUpdateAmountType": ".payroll_update", + "PayrollUpdateDeductions": ".payroll_update", + "PayrollUpdateDeductionsTypedDict": ".payroll_update", + "PayrollUpdateEmployeeCompensations": ".payroll_update", + "PayrollUpdateEmployeeCompensationsTypedDict": ".payroll_update", + "PayrollUpdateFixedCompensations": ".payroll_update", + "PayrollUpdateFixedCompensationsTypedDict": ".payroll_update", + "PayrollUpdateHourlyCompensations": ".payroll_update", + "PayrollUpdateHourlyCompensationsTypedDict": ".payroll_update", + "PayrollUpdatePaidTimeOff": ".payroll_update", + "PayrollUpdatePaidTimeOffTypedDict": ".payroll_update", + "PayrollUpdatePaymentMethod": ".payroll_update", + "PayrollUpdateTypedDict": ".payroll_update", + "WithholdingPayPeriod": ".payroll_update", + "PayrollWithholdingPayPeriodType": ".payroll_withholding_pay_period_type", + "PostCompaniesCompanyUUIDTimeTrackingTimeSheetsEntries": ".post_companies_company_uuid_time_tracking_time_sheetsop", + "PostCompaniesCompanyUUIDTimeTrackingTimeSheetsEntriesTypedDict": ".post_companies_company_uuid_time_tracking_time_sheetsop", + "PostCompaniesCompanyUUIDTimeTrackingTimeSheetsPayClassification": ".post_companies_company_uuid_time_tracking_time_sheetsop", + "PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequest": ".post_companies_company_uuid_time_tracking_time_sheetsop", + "PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestBody": ".post_companies_company_uuid_time_tracking_time_sheetsop", + "PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestBodyTypedDict": ".post_companies_company_uuid_time_tracking_time_sheetsop", + "PostCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestTypedDict": ".post_companies_company_uuid_time_tracking_time_sheetsop", + "PostDepartmentsRequest": ".post_departmentsop", + "PostDepartmentsRequestBody": ".post_departmentsop", + "PostDepartmentsRequestBodyTypedDict": ".post_departmentsop", + "PostDepartmentsRequestTypedDict": ".post_departmentsop", + "PostEmployeeYtdBenefitAmountsFromDifferentCompany": ".post_employee_ytd_benefit_amounts_from_different_company", + "PostEmployeeYtdBenefitAmountsFromDifferentCompanyTypedDict": ".post_employee_ytd_benefit_amounts_from_different_company", + "PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest": ".post_employee_ytd_benefit_amounts_from_different_companyop", + "PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict": ".post_employee_ytd_benefit_amounts_from_different_companyop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequest": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBodyTypedDict": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestTypedDict": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostV1CompaniesCompanyIDCompanyBenefitsRequest": ".post_v1_companies_company_id_company_benefitsop", + "PostV1CompaniesCompanyIDCompanyBenefitsRequestBody": ".post_v1_companies_company_id_company_benefitsop", + "PostV1CompaniesCompanyIDCompanyBenefitsRequestBodyTypedDict": ".post_v1_companies_company_id_company_benefitsop", + "PostV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict": ".post_v1_companies_company_id_company_benefitsop", + "PostV1CompaniesCompanyIDEarningTypesRequest": ".post_v1_companies_company_id_earning_typesop", + "PostV1CompaniesCompanyIDEarningTypesRequestBody": ".post_v1_companies_company_id_earning_typesop", + "PostV1CompaniesCompanyIDEarningTypesRequestBodyTypedDict": ".post_v1_companies_company_id_earning_typesop", + "PostV1CompaniesCompanyIDEarningTypesRequestTypedDict": ".post_v1_companies_company_id_earning_typesop", + "PostV1CompaniesCompanyIDLocationsRequest": ".post_v1_companies_company_id_locationsop", + "PostV1CompaniesCompanyIDLocationsRequestBody": ".post_v1_companies_company_id_locationsop", + "PostV1CompaniesCompanyIDLocationsRequestBodyTypedDict": ".post_v1_companies_company_id_locationsop", + "PostV1CompaniesCompanyIDLocationsRequestTypedDict": ".post_v1_companies_company_id_locationsop", + "PostV1CompaniesCompanyUUIDContractorsRequest": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompaniesCompanyUUIDContractorsRequestBody": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompaniesCompanyUUIDContractorsRequestBodyTypedDict": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompaniesCompanyUUIDContractorsRequestTypedDict": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompaniesCompanyUUIDContractorsType": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompaniesCompanyUUIDContractorsWageType": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompensationsCompensationIDMinimumWages": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDMinimumWagesTypedDict": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDPaymentUnit": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDRequest": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDRequestBody": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDRequestBodyTypedDict": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDRequestTypedDict": ".post_v1_compensations_compensation_idop", + "PostV1DisconnectAppIntegrationRequest": ".post_v1_disconnect_app_integrationop", + "PostV1DisconnectAppIntegrationRequestTypedDict": ".post_v1_disconnect_app_integrationop", + "PostV1DisconnectAppIntegrationSecurity": ".post_v1_disconnect_app_integrationop", + "PostV1DisconnectAppIntegrationSecurityTypedDict": ".post_v1_disconnect_app_integrationop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsContribution": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsContributionTypedDict": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsDeductionReducesTaxableIncome": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsLimitOption": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsRequest": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBody": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBodyTypedDict": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsType": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsValue": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsValue2": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsValue2TypedDict": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsValueTypedDict": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDGarnishmentsGarnishmentType": ".post_v1_employees_employee_id_garnishmentsop", + "PostV1EmployeesEmployeeIDGarnishmentsRequest": ".post_v1_employees_employee_id_garnishmentsop", + "PostV1EmployeesEmployeeIDGarnishmentsRequestBody": ".post_v1_employees_employee_id_garnishmentsop", + "PostV1EmployeesEmployeeIDGarnishmentsRequestBodyTypedDict": ".post_v1_employees_employee_id_garnishmentsop", + "PostV1EmployeesEmployeeIDGarnishmentsRequestTypedDict": ".post_v1_employees_employee_id_garnishmentsop", + "PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion": ".post_v1_employees_employee_id_home_addressesop", + "PostV1EmployeesEmployeeIDHomeAddressesRequest": ".post_v1_employees_employee_id_home_addressesop", + "PostV1EmployeesEmployeeIDHomeAddressesRequestBody": ".post_v1_employees_employee_id_home_addressesop", + "PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict": ".post_v1_employees_employee_id_home_addressesop", + "PostV1EmployeesEmployeeIDHomeAddressesRequestTypedDict": ".post_v1_employees_employee_id_home_addressesop", + "PostV1EmployeesEmployeeIDRehireRequest": ".post_v1_employees_employee_id_rehireop", + "PostV1EmployeesEmployeeIDRehireRequestTypedDict": ".post_v1_employees_employee_id_rehireop", + "PostV1EmployeesEmployeeIDTerminationsRequest": ".post_v1_employees_employee_id_terminationsop", + "PostV1EmployeesEmployeeIDTerminationsRequestBody": ".post_v1_employees_employee_id_terminationsop", + "PostV1EmployeesEmployeeIDTerminationsRequestBodyTypedDict": ".post_v1_employees_employee_id_terminationsop", + "PostV1EmployeesEmployeeIDTerminationsRequestTypedDict": ".post_v1_employees_employee_id_terminationsop", + "PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion": ".post_v1_employees_employee_id_work_addressesop", + "PostV1EmployeesEmployeeIDWorkAddressesRequest": ".post_v1_employees_employee_id_work_addressesop", + "PostV1EmployeesEmployeeIDWorkAddressesRequestBody": ".post_v1_employees_employee_id_work_addressesop", + "PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict": ".post_v1_employees_employee_id_work_addressesop", + "PostV1EmployeesEmployeeIDWorkAddressesRequestTypedDict": ".post_v1_employees_employee_id_work_addressesop", + "PostV1EmployeesHeaderXGustoAPIVersion": ".post_v1_employeesop", + "PostV1EmployeesRequest": ".post_v1_employeesop", + "PostV1EmployeesRequestBody": ".post_v1_employeesop", + "PostV1EmployeesRequestBodyTypedDict": ".post_v1_employeesop", + "PostV1EmployeesRequestTypedDict": ".post_v1_employeesop", + "PostV1JobsJobIDRequest": ".post_v1_jobs_job_idop", + "PostV1JobsJobIDRequestBody": ".post_v1_jobs_job_idop", + "PostV1JobsJobIDRequestBodyTypedDict": ".post_v1_jobs_job_idop", + "PostV1JobsJobIDRequestTypedDict": ".post_v1_jobs_job_idop", + "PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequest": ".post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop", + "PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBody": ".post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop", + "PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBodyTypedDict": ".post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop", + "PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestTypedDict": ".post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop", + "Addresses": ".post_v1_provisionop", + "AddressesTypedDict": ".post_v1_provisionop", + "PostV1ProvisionCompany": ".post_v1_provisionop", + "PostV1ProvisionCompanyTypedDict": ".post_v1_provisionop", + "PostV1ProvisionRequest": ".post_v1_provisionop", + "PostV1ProvisionRequestBody": ".post_v1_provisionop", + "PostV1ProvisionRequestBodyTypedDict": ".post_v1_provisionop", + "PostV1ProvisionRequestTypedDict": ".post_v1_provisionop", + "PostV1ProvisionResponseBody": ".post_v1_provisionop", + "PostV1ProvisionResponseBodyTypedDict": ".post_v1_provisionop", + "PostV1ProvisionSecurity": ".post_v1_provisionop", + "PostV1ProvisionSecurityTypedDict": ".post_v1_provisionop", + "User": ".post_v1_provisionop", + "UserTypedDict": ".post_v1_provisionop", + "PostV1WebhookSubscriptionRequest": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionRequestBody": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionRequestBodyTypedDict": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionRequestTypedDict": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionSecurity": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionSecurityTypedDict": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionSubscriptionTypes": ".post_v1_webhook_subscriptionop", + "PutAddPeopleToDepartmentContractors": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentContractorsTypedDict": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentEmployees": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentEmployeesTypedDict": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentRequest": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentRequestBody": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentRequestBodyTypedDict": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentRequestTypedDict": ".put_add_people_to_departmentop", + "PutDepartmentsRequest": ".put_departmentsop", + "PutDepartmentsRequestBody": ".put_departmentsop", + "PutDepartmentsRequestBodyTypedDict": ".put_departmentsop", + "PutDepartmentsRequestTypedDict": ".put_departmentsop", + "PutRemovePeopleFromDepartmentContractors": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentContractorsTypedDict": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentEmployees": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentEmployeesTypedDict": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentRequest": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentRequestBody": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentRequestBodyTypedDict": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentRequestTypedDict": ".put_remove_people_from_departmentop", + "PutTimeTrackingTimeSheetsTimeSheetUUIDEntries": ".put_time_tracking_time_sheets_time_sheet_uuidop", + "PutTimeTrackingTimeSheetsTimeSheetUUIDEntriesTypedDict": ".put_time_tracking_time_sheets_time_sheet_uuidop", + "PutTimeTrackingTimeSheetsTimeSheetUUIDPayClassification": ".put_time_tracking_time_sheets_time_sheet_uuidop", + "PutTimeTrackingTimeSheetsTimeSheetUUIDRequest": ".put_time_tracking_time_sheets_time_sheet_uuidop", + "PutTimeTrackingTimeSheetsTimeSheetUUIDRequestBody": ".put_time_tracking_time_sheets_time_sheet_uuidop", + "PutTimeTrackingTimeSheetsTimeSheetUUIDRequestBodyTypedDict": ".put_time_tracking_time_sheets_time_sheet_uuidop", + "PutTimeTrackingTimeSheetsTimeSheetUUIDRequestTypedDict": ".put_time_tracking_time_sheets_time_sheet_uuidop", + "PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest": ".put_v1_companies_company_id_earning_types_earning_type_uuidop", + "PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBody": ".put_v1_companies_company_id_earning_types_earning_type_uuidop", + "PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBodyTypedDict": ".put_v1_companies_company_id_earning_types_earning_type_uuidop", + "PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict": ".put_v1_companies_company_id_earning_types_earning_type_uuidop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest": ".put_v1_companies_company_id_payrolls_payroll_id_prepareop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody": ".put_v1_companies_company_id_payrolls_payroll_id_prepareop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBodyTypedDict": ".put_v1_companies_company_id_payrolls_payroll_id_prepareop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestTypedDict": ".put_v1_companies_company_id_payrolls_payroll_id_prepareop", + "PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion": ".put_v1_companies_company_id_payrollsop", + "PutV1CompaniesCompanyIDPayrollsRequest": ".put_v1_companies_company_id_payrollsop", + "PutV1CompaniesCompanyIDPayrollsRequestTypedDict": ".put_v1_companies_company_id_payrollsop", + "PutV1CompaniesRequest": ".put_v1_companiesop", + "PutV1CompaniesRequestBody": ".put_v1_companiesop", + "PutV1CompaniesRequestBodyTypedDict": ".put_v1_companiesop", + "PutV1CompaniesRequestTypedDict": ".put_v1_companiesop", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest": ".put_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody": ".put_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBodyTypedDict": ".put_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict": ".put_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest": ".put_v1_company_benefits_company_benefit_id_employee_benefitsop", + "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBody": ".put_v1_company_benefits_company_benefit_id_employee_benefitsop", + "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBodyTypedDict": ".put_v1_company_benefits_company_benefit_id_employee_benefitsop", + "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict": ".put_v1_company_benefits_company_benefit_id_employee_benefitsop", + "PutV1CompanyBenefitsCompanyBenefitIDRequest": ".put_v1_company_benefits_company_benefit_idop", + "PutV1CompanyBenefitsCompanyBenefitIDRequestBody": ".put_v1_company_benefits_company_benefit_idop", + "PutV1CompanyBenefitsCompanyBenefitIDRequestBodyTypedDict": ".put_v1_company_benefits_company_benefit_idop", + "PutV1CompanyBenefitsCompanyBenefitIDRequestTypedDict": ".put_v1_company_benefits_company_benefit_idop", + "PutV1CompensationsCompensationIDMinimumWages": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDMinimumWagesTypedDict": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDPaymentUnit": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDRequest": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDRequestBody": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDRequestBodyTypedDict": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDRequestTypedDict": ".put_v1_compensations_compensation_idop", + "PutV1ContractorsContractorUUIDRequest": ".put_v1_contractors_contractor_uuidop", + "PutV1ContractorsContractorUUIDRequestBody": ".put_v1_contractors_contractor_uuidop", + "PutV1ContractorsContractorUUIDRequestBodyTypedDict": ".put_v1_contractors_contractor_uuidop", + "PutV1ContractorsContractorUUIDRequestTypedDict": ".put_v1_contractors_contractor_uuidop", + "PutV1ContractorsContractorUUIDType": ".put_v1_contractors_contractor_uuidop", + "PutV1ContractorsContractorUUIDWageType": ".put_v1_contractors_contractor_uuidop", + "PutV1EmployeeBenefitsEmployeeBenefitIDContribution": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDContributionTypedDict": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDDeductionReducesTaxableIncome": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDLimitOption": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDRequest": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDRequestBody": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDRequestBodyTypedDict": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDType": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDValue": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDValue2": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDValue2TypedDict": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDValueTypedDict": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeesEmployeeIDRehireEmploymentStatus": ".put_v1_employees_employee_id_rehireop", + "PutV1EmployeesEmployeeIDRehireRequest": ".put_v1_employees_employee_id_rehireop", + "PutV1EmployeesEmployeeIDRehireRequestBody": ".put_v1_employees_employee_id_rehireop", + "PutV1EmployeesEmployeeIDRehireRequestBodyTypedDict": ".put_v1_employees_employee_id_rehireop", + "PutV1EmployeesEmployeeIDRehireRequestTypedDict": ".put_v1_employees_employee_id_rehireop", + "PutV1EmployeesHeaderXGustoAPIVersion": ".put_v1_employeesop", + "PutV1EmployeesRequest": ".put_v1_employeesop", + "PutV1EmployeesRequestBody": ".put_v1_employeesop", + "PutV1EmployeesRequestBodyTypedDict": ".put_v1_employeesop", + "PutV1EmployeesRequestTypedDict": ".put_v1_employeesop", + "PutV1GarnishmentsGarnishmentIDRequest": ".put_v1_garnishments_garnishment_idop", + "PutV1GarnishmentsGarnishmentIDRequestBody": ".put_v1_garnishments_garnishment_idop", + "PutV1GarnishmentsGarnishmentIDRequestBodyTypedDict": ".put_v1_garnishments_garnishment_idop", + "PutV1GarnishmentsGarnishmentIDRequestTypedDict": ".put_v1_garnishments_garnishment_idop", + "PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion": ".put_v1_home_addresses_home_address_uuidop", + "PutV1HomeAddressesHomeAddressUUIDRequest": ".put_v1_home_addresses_home_address_uuidop", + "PutV1HomeAddressesHomeAddressUUIDRequestBody": ".put_v1_home_addresses_home_address_uuidop", + "PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict": ".put_v1_home_addresses_home_address_uuidop", + "PutV1HomeAddressesHomeAddressUUIDRequestTypedDict": ".put_v1_home_addresses_home_address_uuidop", + "PutV1JobsJobIDRequest": ".put_v1_jobs_job_idop", + "PutV1JobsJobIDRequestBody": ".put_v1_jobs_job_idop", + "PutV1JobsJobIDRequestBodyTypedDict": ".put_v1_jobs_job_idop", + "PutV1JobsJobIDRequestTypedDict": ".put_v1_jobs_job_idop", + "HeaderXGustoAPIVersion": ".put_v1_locations_location_idop", + "PutV1LocationsLocationIDRequest": ".put_v1_locations_location_idop", + "PutV1LocationsLocationIDRequestBody": ".put_v1_locations_location_idop", + "PutV1LocationsLocationIDRequestBodyTypedDict": ".put_v1_locations_location_idop", + "PutV1LocationsLocationIDRequestTypedDict": ".put_v1_locations_location_idop", + "PutV1TerminationsEmployeeIDRequest": ".put_v1_terminations_employee_idop", + "PutV1TerminationsEmployeeIDRequestBody": ".put_v1_terminations_employee_idop", + "PutV1TerminationsEmployeeIDRequestBodyTypedDict": ".put_v1_terminations_employee_idop", + "PutV1TerminationsEmployeeIDRequestTypedDict": ".put_v1_terminations_employee_idop", + "PutV1VerifyWebhookSubscriptionUUIDRequest": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1VerifyWebhookSubscriptionUUIDRequestBody": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1VerifyWebhookSubscriptionUUIDRequestBodyTypedDict": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1VerifyWebhookSubscriptionUUIDRequestTypedDict": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1VerifyWebhookSubscriptionUUIDSecurity": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1VerifyWebhookSubscriptionUUIDSecurityTypedDict": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDRequest": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDRequestBody": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDRequestBodyTypedDict": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDRequestTypedDict": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDSecurity": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDSecurityTypedDict": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDSubscriptionTypes": ".put_v1_webhook_subscription_uuidop", + "PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion": ".put_v1_work_addresses_work_address_uuidop", + "PutV1WorkAddressesWorkAddressUUIDRequest": ".put_v1_work_addresses_work_address_uuidop", + "PutV1WorkAddressesWorkAddressUUIDRequestBody": ".put_v1_work_addresses_work_address_uuidop", + "PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict": ".put_v1_work_addresses_work_address_uuidop", + "PutV1WorkAddressesWorkAddressUUIDRequestTypedDict": ".put_v1_work_addresses_work_address_uuidop", + "RefreshAccessTokenRequest": ".refresh_access_tokenop", + "RefreshAccessTokenRequestBody": ".refresh_access_tokenop", + "RefreshAccessTokenRequestBodyTypedDict": ".refresh_access_tokenop", + "RefreshAccessTokenRequestTypedDict": ".refresh_access_tokenop", + "Rehire": ".rehire", + "RehireEmploymentStatus": ".rehire", + "RehireTypedDict": ".rehire", + "EmploymentStatus": ".rehire_body", + "RehireBody": ".rehire_body", + "RehireBodyTypedDict": ".rehire_body", + "Report": ".report", + "ReportTypedDict": ".report", + "ResponseValidationError": ".responsevalidationerror", + "RevokeAccessTokenRequest": ".revoke_access_tokenop", + "RevokeAccessTokenRequestBody": ".revoke_access_tokenop", + "RevokeAccessTokenRequestBodyTypedDict": ".revoke_access_tokenop", + "RevokeAccessTokenRequestTypedDict": ".revoke_access_tokenop", + "Security": ".security", + "SecurityTypedDict": ".security", + "CurrentEmploymentStatus": ".show_employees", + "OnboardingDocumentsConfig": ".show_employees", + "OnboardingDocumentsConfigTypedDict": ".show_employees", + "OnboardingStatus": ".show_employees", + "PaymentMethod": ".show_employees", + "ShowEmployees": ".show_employees", + "ShowEmployeesTypedDict": ".show_employees", + "SortOrder": ".sort_order", + "Status": ".status", + "SupportedBenefit": ".supported_benefit", + "SupportedBenefitTypedDict": ".supported_benefit", + "Termination": ".termination", + "TerminationTypedDict": ".termination", + "TimeOffActivity": ".time_off_activity", + "TimeOffActivityTypedDict": ".time_off_activity", + "TimeOffType": ".time_off_activity", + "Approver": ".time_off_request", + "ApproverTypedDict": ".time_off_request", + "Days": ".time_off_request", + "DaysTypedDict": ".time_off_request", + "Initiator": ".time_off_request", + "InitiatorTypedDict": ".time_off_request", + "RequestType": ".time_off_request", + "TimeOffRequest": ".time_off_request", + "TimeOffRequestEmployee": ".time_off_request", + "TimeOffRequestEmployeeTypedDict": ".time_off_request", + "TimeOffRequestStatus": ".time_off_request", + "TimeOffRequestTypedDict": ".time_off_request", + "Entries": ".time_sheet", + "EntriesTypedDict": ".time_sheet", + "PayClassification": ".time_sheet", + "TimeSheet": ".time_sheet", + "TimeSheetEntityType": ".time_sheet", + "TimeSheetStatus": ".time_sheet", + "TimeSheetTypedDict": ".time_sheet", + "TimeSheetSortBy": ".time_sheet_sort_by", + "TimeSheetSortOrder": ".time_sheet_sort_order", + "UnprocessableEntityErrorObject": ".unprocessable_entity_error_object", + "UnprocessableEntityErrorObjectData": ".unprocessable_entity_error_object", + "UnprocessedTerminationPayPeriod": ".unprocessed_termination_pay_period", + "UnprocessedTerminationPayPeriodTypedDict": ".unprocessed_termination_pay_period", + "VersionHeader": ".versionheader", + "SubscriptionTypes": ".webhook_subscription", + "WebhookSubscription": ".webhook_subscription", + "WebhookSubscriptionStatus": ".webhook_subscription", + "WebhookSubscriptionTypedDict": ".webhook_subscription", + "WebhooksHealthCheckStatus": ".webhooks_health_check_status", + "WebhooksHealthCheckStatusStatus": ".webhooks_health_check_status", + "WebhooksHealthCheckStatusTypedDict": ".webhooks_health_check_status", + "YtdBenefitAmountsFromDifferentCompany": ".ytd_benefit_amounts_from_different_company", + "YtdBenefitAmountsFromDifferentCompanyTypedDict": ".ytd_benefit_amounts_from_different_company", +} + + +def dynamic_import(modname, retries=3): + for attempt in range(retries): + try: + return import_module(modname, __package__) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + +def __getattr__(attr_name: str) -> object: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError( + f"No {attr_name} found in _dynamic_imports for module name -> {__name__} " + ) + + try: + module = dynamic_import(module_name) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError( + f"Failed to import {attr_name} from {module_name}: {e}" + ) from e + except AttributeError as e: + raise AttributeError( + f"Failed to get {attr_name} from {module_name}: {e}" + ) from e + + +def __dir__(): + lazy_attrs = builtins.list(_dynamic_imports.keys()) + return builtins.sorted(lazy_attrs) diff --git a/gusto_app_int/src/gusto_app_integration/models/admin.py b/gusto_app_int/src/gusto_app_integration/models/admin.py index fac818c3..a16a7cd6 100644 --- a/gusto_app_int/src/gusto_app_integration/models/admin.py +++ b/gusto_app_int/src/gusto_app_integration/models/admin.py @@ -12,7 +12,7 @@ class AdminTypedDict(TypedDict): uuid: str r"""The unique id of the admin.""" email: NotRequired[str] - r"""The email of the admin for Gusto's system. If the email matches an existing user, this will create an admin account for them.""" + r"""The email of the admin for Gusto's system.""" first_name: NotRequired[str] r"""The first name of the admin.""" last_name: NotRequired[str] @@ -26,7 +26,7 @@ class Admin(BaseModel): r"""The unique id of the admin.""" email: Optional[str] = None - r"""The email of the admin for Gusto's system. If the email matches an existing user, this will create an admin account for them.""" + r"""The email of the admin for Gusto's system.""" first_name: Optional[str] = None r"""The first name of the admin.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/apierror.py b/gusto_app_int/src/gusto_app_integration/models/apierror.py index d4b6b02a..bf9dcee4 100644 --- a/gusto_app_int/src/gusto_app_integration/models/apierror.py +++ b/gusto_app_int/src/gusto_app_integration/models/apierror.py @@ -1,22 +1,40 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from dataclasses import dataclass -from typing import Optional import httpx +from typing import Optional +from dataclasses import dataclass + +from gusto_app_integration.models import GustoAppIntegrationError + +MAX_MESSAGE_LEN = 10_000 + + +@dataclass(unsafe_hash=True) +class APIError(GustoAppIntegrationError): + """The fallback error class if no more specific error class is matched.""" + + def __init__( + self, message: str, raw_response: httpx.Response, body: Optional[str] = None + ): + body_display = body or raw_response.text or '""' + if message: + message += ": " + message += f"Status {raw_response.status_code}" -@dataclass -class APIError(Exception): - """Represents an error returned by the API.""" + headers = raw_response.headers + content_type = headers.get("content-type", '""') + if content_type != "application/json": + if " " in content_type: + content_type = f'"{content_type}"' + message += f" Content-Type {content_type}" - message: str - status_code: int = -1 - body: str = "" - raw_response: Optional[httpx.Response] = None + if len(body_display) > MAX_MESSAGE_LEN: + truncated = body_display[:MAX_MESSAGE_LEN] + remaining = len(body_display) - MAX_MESSAGE_LEN + body_display = f"{truncated}...and {remaining} more chars" - def __str__(self): - body = "" - if len(self.body) > 0: - body = f"\n{self.body}" + message += f". Body: {body_display}" + message = message.strip() - return f"{self.message}: Status {self.status_code}{body}" + super().__init__(message, raw_response, body) diff --git a/gusto_app_int/src/gusto_app_integration/models/company_address.py b/gusto_app_int/src/gusto_app_integration/models/company_address.py index 3edd2328..725151b1 100644 --- a/gusto_app_int/src/gusto_app_integration/models/company_address.py +++ b/gusto_app_int/src/gusto_app_integration/models/company_address.py @@ -22,7 +22,7 @@ class CompanyAddressTypedDict(TypedDict): state: NotRequired[str] zip: NotRequired[str] country: NotRequired[str] - active: NotRequired[bool] + inactive: NotRequired[bool] r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" @@ -41,7 +41,7 @@ class CompanyAddress(BaseModel): country: Optional[str] = "USA" - active: Optional[bool] = None + inactive: Optional[bool] = None r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" @model_serializer(mode="wrap") @@ -53,7 +53,7 @@ def serialize_model(self, handler): "state", "zip", "country", - "active", + "inactive", ] nullable_fields = ["street_2"] null_default_fields = [] diff --git a/gusto_app_int/src/gusto_app_integration/models/company_benefit_with_employee_benefits.py b/gusto_app_int/src/gusto_app_integration/models/company_benefit_with_employee_benefits.py index e1ce07b2..d6f0d153 100644 --- a/gusto_app_int/src/gusto_app_integration/models/company_benefit_with_employee_benefits.py +++ b/gusto_app_int/src/gusto_app_integration/models/company_benefit_with_employee_benefits.py @@ -28,11 +28,15 @@ class CompanyBenefitWithEmployeeBenefitsValueTiersTypedDict(TypedDict): rate: NotRequired[str] r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: NotRequired[str] - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + For example: + + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: NotRequired[str] r"""The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold.""" @@ -45,11 +49,15 @@ class CompanyBenefitWithEmployeeBenefitsValueTiers(BaseModel): r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: Optional[str] = None - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. + + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. + + For example: - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: Optional[str] = None diff --git a/gusto_app_int/src/gusto_app_integration/models/company_custom_field.py b/gusto_app_int/src/gusto_app_integration/models/company_custom_field.py index 6f47fccb..3118131b 100644 --- a/gusto_app_int/src/gusto_app_integration/models/company_custom_field.py +++ b/gusto_app_int/src/gusto_app_integration/models/company_custom_field.py @@ -10,7 +10,7 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import List, Optional +from typing import List from typing_extensions import NotRequired, TypedDict @@ -23,7 +23,7 @@ class CompanyCustomFieldTypedDict(TypedDict): r"""Name of the company custom field""" type: CustomFieldType r"""Input type for the custom field.""" - description: NotRequired[str] + description: NotRequired[Nullable[str]] r"""Description of the company custom field""" selection_options: NotRequired[Nullable[List[str]]] r"""An array of options for fields of type radio. Otherwise, null.""" @@ -41,7 +41,7 @@ class CompanyCustomField(BaseModel): type: CustomFieldType r"""Input type for the custom field.""" - description: Optional[str] = None + description: OptionalNullable[str] = UNSET r"""Description of the company custom field""" selection_options: OptionalNullable[List[str]] = UNSET @@ -50,7 +50,7 @@ class CompanyCustomField(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = ["description", "selection_options"] - nullable_fields = ["selection_options"] + nullable_fields = ["description", "selection_options"] null_default_fields = [] serialized = handler(self) diff --git a/gusto_app_int/src/gusto_app_integration/models/contractor.py b/gusto_app_int/src/gusto_app_integration/models/contractor.py index 365f0ec7..457476bd 100644 --- a/gusto_app_int/src/gusto_app_integration/models/contractor.py +++ b/gusto_app_int/src/gusto_app_integration/models/contractor.py @@ -139,7 +139,7 @@ class ContractorTypedDict(TypedDict): r"""The contractor’s home address.""" hourly_rate: NotRequired[str] r"""The contractor’s hourly rate. This attribute is required if the wage_type is “Hourly”.""" - file_new_hire_report: NotRequired[bool] + file_new_hire_report: NotRequired[Nullable[bool]] r"""The boolean flag indicating whether Gusto will file a new hire report for the contractor""" work_state: NotRequired[Nullable[str]] r"""State where the contractor will be conducting the majority of their work for the company. @@ -153,6 +153,10 @@ class ContractorTypedDict(TypedDict): r"""The contractor's payment method.""" has_ssn: NotRequired[bool] r"""Indicates whether the contractor has an SSN in Gusto.""" + department: NotRequired[Nullable[str]] + r"""The contractor's department in the company.""" + dismissal_date: NotRequired[Nullable[str]] + r"""The contractor's dismissal date.""" department_uuid: NotRequired[Nullable[str]] r"""The UUID of the department the contractor is under""" @@ -208,7 +212,7 @@ class Contractor(BaseModel): hourly_rate: Optional[str] = None r"""The contractor’s hourly rate. This attribute is required if the wage_type is “Hourly”.""" - file_new_hire_report: Optional[bool] = False + file_new_hire_report: OptionalNullable[bool] = UNSET r"""The boolean flag indicating whether Gusto will file a new hire report for the contractor""" work_state: OptionalNullable[str] = UNSET @@ -228,6 +232,12 @@ class Contractor(BaseModel): has_ssn: Optional[bool] = None r"""Indicates whether the contractor has an SSN in Gusto.""" + department: OptionalNullable[str] = UNSET + r"""The contractor's department in the company.""" + + dismissal_date: OptionalNullable[str] = UNSET + r"""The contractor's dismissal date.""" + department_uuid: OptionalNullable[str] = UNSET r"""The UUID of the department the contractor is under""" @@ -255,6 +265,8 @@ def serialize_model(self, handler): "onboarding_status", "payment_method", "has_ssn", + "department", + "dismissal_date", "department_uuid", ] nullable_fields = [ @@ -266,8 +278,11 @@ def serialize_model(self, handler): "has_ein", "email", "address", + "file_new_hire_report", "work_state", "payment_method", + "department", + "dismissal_date", "department_uuid", ] null_default_fields = [] diff --git a/gusto_app_int/src/gusto_app_integration/models/contractor_payment_details_list.py b/gusto_app_int/src/gusto_app_integration/models/contractor_payment_details_list.py new file mode 100644 index 00000000..b01b1f08 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/contractor_payment_details_list.py @@ -0,0 +1,162 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_app_integration.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class ContractorPaymentDetailsListPaymentMethod(str, Enum): + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class SplitBy(str, Enum): + r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + + AMOUNT = "Amount" + PERCENTAGE = "Percentage" + + +class SplitsTypedDict(TypedDict): + bank_account_uuid: NotRequired[str] + name: NotRequired[str] + hidden_account_number: NotRequired[str] + r"""An obfuscated version of the account number which can be used for display purposes.""" + encrypted_account_number: NotRequired[Nullable[str]] + r"""Ciphertext containing the full bank account number, which must be decrypted using a key provided by Gusto. Only visible with the `contractor_payment_methods:read:account_number` scope.""" + routing_number: NotRequired[str] + priority: NotRequired[int] + r"""The order of priority for each payment split, with priority 1 being the first bank account paid. Priority must be unique and sequential.""" + split_amount: NotRequired[float] + account_type: NotRequired[str] + + +class Splits(BaseModel): + bank_account_uuid: Optional[str] = None + + name: Optional[str] = None + + hidden_account_number: Optional[str] = None + r"""An obfuscated version of the account number which can be used for display purposes.""" + + encrypted_account_number: OptionalNullable[str] = UNSET + r"""Ciphertext containing the full bank account number, which must be decrypted using a key provided by Gusto. Only visible with the `contractor_payment_methods:read:account_number` scope.""" + + routing_number: Optional[str] = None + + priority: Optional[int] = None + r"""The order of priority for each payment split, with priority 1 being the first bank account paid. Priority must be unique and sequential.""" + + split_amount: Optional[float] = None + + account_type: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "bank_account_uuid", + "name", + "hidden_account_number", + "encrypted_account_number", + "routing_number", + "priority", + "split_amount", + "account_type", + ] + nullable_fields = ["encrypted_account_number"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class ContractorPaymentDetailsListTypedDict(TypedDict): + contractor_uuid: NotRequired[str] + payment_method: NotRequired[ContractorPaymentDetailsListPaymentMethod] + first_name: NotRequired[str] + last_name: NotRequired[str] + split_by: NotRequired[Nullable[SplitBy]] + r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + splits: NotRequired[Nullable[List[SplitsTypedDict]]] + + +class ContractorPaymentDetailsList(BaseModel): + contractor_uuid: Optional[str] = None + + payment_method: Optional[ContractorPaymentDetailsListPaymentMethod] = None + + first_name: Optional[str] = None + + last_name: Optional[str] = None + + split_by: OptionalNullable[SplitBy] = UNSET + r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + + splits: OptionalNullable[List[Splits]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "contractor_uuid", + "payment_method", + "first_name", + "last_name", + "split_by", + "splits", + ] + nullable_fields = ["split_by", "splits"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_app_int/src/gusto_app_integration/models/contractor_payment_group_minimal.py b/gusto_app_int/src/gusto_app_integration/models/contractor_payment_group_minimal.py deleted file mode 100644 index bb3106bd..00000000 --- a/gusto_app_int/src/gusto_app_integration/models/contractor_payment_group_minimal.py +++ /dev/null @@ -1,126 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from enum import Enum -from gusto_app_integration.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict - - -class ContractorPaymentGroupMinimalStatus(str, Enum): - r"""The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method.""" - - UNFUNDED = "Unfunded" - FUNDED = "Funded" - - -class TotalsTypedDict(TypedDict): - amount: NotRequired[str] - r"""The total amount for the group of contractor payments.""" - debit_amount: NotRequired[str] - r"""The total debit amount for the group of contractor payments. Sum of wage & reimbursement amount.""" - wage_amount: NotRequired[str] - r"""The total wage amount for the group of contractor payments.""" - reimbursement_amount: NotRequired[str] - r"""The total reimbursement amount for the group of contractor payments.""" - - -class Totals(BaseModel): - amount: Optional[str] = None - r"""The total amount for the group of contractor payments.""" - - debit_amount: Optional[str] = None - r"""The total debit amount for the group of contractor payments. Sum of wage & reimbursement amount.""" - - wage_amount: Optional[str] = None - r"""The total wage amount for the group of contractor payments.""" - - reimbursement_amount: Optional[str] = None - r"""The total reimbursement amount for the group of contractor payments.""" - - -class ContractorPaymentGroupMinimalTypedDict(TypedDict): - r"""The summary of a contractor payment group.""" - - uuid: NotRequired[str] - r"""The unique identifier of the contractor payment group.""" - company_uuid: NotRequired[str] - r"""The UUID of the company.""" - check_date: NotRequired[str] - r"""The check date of the contractor payment group.""" - debit_date: NotRequired[str] - r"""The debit date of the contractor payment group.""" - status: NotRequired[ContractorPaymentGroupMinimalStatus] - r"""The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method.""" - creation_token: NotRequired[Nullable[str]] - r"""Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token.""" - totals: NotRequired[TotalsTypedDict] - - -class ContractorPaymentGroupMinimal(BaseModel): - r"""The summary of a contractor payment group.""" - - uuid: Optional[str] = None - r"""The unique identifier of the contractor payment group.""" - - company_uuid: Optional[str] = None - r"""The UUID of the company.""" - - check_date: Optional[str] = None - r"""The check date of the contractor payment group.""" - - debit_date: Optional[str] = None - r"""The debit date of the contractor payment group.""" - - status: Optional[ContractorPaymentGroupMinimalStatus] = None - r"""The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method.""" - - creation_token: OptionalNullable[str] = UNSET - r"""Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token.""" - - totals: Optional[Totals] = None - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "uuid", - "company_uuid", - "check_date", - "debit_date", - "status", - "creation_token", - "totals", - ] - nullable_fields = ["creation_token"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/gusto_app_int/src/gusto_app_integration/models/contractors_sort_by.py b/gusto_app_int/src/gusto_app_integration/models/contractors_sort_by.py new file mode 100644 index 00000000..05875b31 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/contractors_sort_by.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class ContractorsSortBy(str, Enum): + TYPE = "type" + ONBOARDING_STATUS = "onboarding_status" + NAME = "name" + CREATED_AT = "created_at" diff --git a/gusto_app_int/src/gusto_app_integration/models/contribution_exclusion.py b/gusto_app_int/src/gusto_app_integration/models/contribution_exclusion.py new file mode 100644 index 00000000..d3a0e9b2 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/contribution_exclusion.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gusto_app_integration.types import BaseModel +from typing_extensions import TypedDict + + +class ContributionExclusionTypedDict(TypedDict): + r"""The representation of a contribution exclusion for a company benefit.""" + + contribution_uuid: str + r"""The UUID of the contribution type.""" + contribution_type: str + r"""The name of the contribution type.""" + excluded: bool + r"""Whether this contribution type is excluded from the benefit.""" + + +class ContributionExclusion(BaseModel): + r"""The representation of a contribution exclusion for a company benefit.""" + + contribution_uuid: str + r"""The UUID of the contribution type.""" + + contribution_type: str + r"""The name of the contribution type.""" + + excluded: bool + r"""Whether this contribution type is excluded from the benefit.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/delete_v1_company_benefits_company_benefit_idop.py b/gusto_app_int/src/gusto_app_integration/models/delete_v1_company_benefits_company_benefit_idop.py index 8286ac95..cac18e7c 100644 --- a/gusto_app_int/src/gusto_app_integration/models/delete_v1_company_benefits_company_benefit_idop.py +++ b/gusto_app_int/src/gusto_app_integration/models/delete_v1_company_benefits_company_benefit_idop.py @@ -2,9 +2,11 @@ from __future__ import annotations from .versionheader import VersionHeader -from gusto_app_integration import utils +from dataclasses import dataclass, field +from gusto_app_integration.models import GustoAppIntegrationError from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import httpx import pydantic from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -57,15 +59,18 @@ class DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData(BaseModel): errors: Optional[Errors] = None -class DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody(Exception): +@dataclass(unsafe_hash=True) +class DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody(GustoAppIntegrationError): r"""Unprocessable Entity""" - data: DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData - - def __init__(self, data: DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData): - self.data = data - - def __str__(self) -> str: - return utils.marshal_json( - self.data, DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData - ) + data: DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData = field(hash=False) + + def __init__( + self, + data: DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/gusto_app_int/src/gusto_app_integration/models/delete_v1_home_addresses_home_address_uuidop.py b/gusto_app_int/src/gusto_app_integration/models/delete_v1_home_addresses_home_address_uuidop.py index 886cad4f..5d455b23 100644 --- a/gusto_app_int/src/gusto_app_integration/models/delete_v1_home_addresses_home_address_uuidop.py +++ b/gusto_app_int/src/gusto_app_integration/models/delete_v1_home_addresses_home_address_uuidop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class DeleteV1HomeAddressesHomeAddressUUIDRequestTypedDict(TypedDict): home_address_uuid: str r"""The UUID of the home address""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class DeleteV1HomeAddressesHomeAddressUUIDRequest(BaseModel): r"""The UUID of the home address""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/delete_v1_work_addresses_work_address_uuidop.py b/gusto_app_int/src/gusto_app_integration/models/delete_v1_work_addresses_work_address_uuidop.py index aeeff436..59f40362 100644 --- a/gusto_app_int/src/gusto_app_integration/models/delete_v1_work_addresses_work_address_uuidop.py +++ b/gusto_app_int/src/gusto_app_integration/models/delete_v1_work_addresses_work_address_uuidop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class DeleteV1WorkAddressesWorkAddressUUIDRequestTypedDict(TypedDict): work_address_uuid: str r"""The UUID of the work address""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class DeleteV1WorkAddressesWorkAddressUUIDRequest(BaseModel): r"""The UUID of the work address""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/employee.py b/gusto_app_int/src/gusto_app_integration/models/employee.py index de597906..67eed2eb 100644 --- a/gusto_app_int/src/gusto_app_integration/models/employee.py +++ b/gusto_app_int/src/gusto_app_integration/models/employee.py @@ -2,10 +2,12 @@ from __future__ import annotations from .employee_custom_field import EmployeeCustomField, EmployeeCustomFieldTypedDict +from .flsa_status_type import FlsaStatusType from .garnishment import Garnishment, GarnishmentTypedDict from .job import Job, JobTypedDict from .paid_time_off import PaidTimeOff, PaidTimeOffTypedDict from .termination import Termination, TerminationTypedDict +from datetime import date from enum import Enum from gusto_app_integration.types import ( BaseModel, @@ -19,7 +21,7 @@ from typing_extensions import NotRequired, TypedDict -class OnboardingStatus(str, Enum): +class EmployeeOnboardingStatus(str, Enum): r"""The current onboarding status of the employee""" ONBOARDING_COMPLETED = "onboarding_completed" @@ -32,7 +34,7 @@ class OnboardingStatus(str, Enum): SELF_ONBOARDING_AWAITING_ADMIN_REVIEW = "self_onboarding_awaiting_admin_review" -class OnboardingDocumentsConfigTypedDict(TypedDict): +class EmployeeOnboardingDocumentsConfigTypedDict(TypedDict): r"""Configuration for an employee onboarding documents during onboarding""" uuid: NotRequired[Nullable[str]] @@ -41,7 +43,7 @@ class OnboardingDocumentsConfigTypedDict(TypedDict): r"""Whether to include Form I-9 for an employee during onboarding""" -class OnboardingDocumentsConfig(BaseModel): +class EmployeeOnboardingDocumentsConfig(BaseModel): r"""Configuration for an employee onboarding documents during onboarding""" uuid: OptionalNullable[str] = UNSET @@ -81,14 +83,14 @@ def serialize_model(self, handler): return m -class PaymentMethod(str, Enum): +class EmployeePaymentMethod(str, Enum): r"""The employee's payment method""" DIRECT_DEPOSIT = "Direct Deposit" CHECK = "Check" -class CurrentEmploymentStatus(str, Enum): +class EmployeeCurrentEmploymentStatus(str, Enum): r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" FULL_TIME = "full_time" @@ -120,11 +122,13 @@ class EmployeeTypedDict(TypedDict): r"""Whether the employee is terminated.""" two_percent_shareholder: NotRequired[Nullable[bool]] r"""Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type.""" + work_email: NotRequired[Nullable[str]] + r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" onboarded: NotRequired[bool] r"""Whether the employee has completed onboarding.""" - onboarding_status: NotRequired[Nullable[OnboardingStatus]] + onboarding_status: NotRequired[Nullable[EmployeeOnboardingStatus]] r"""The current onboarding status of the employee""" - onboarding_documents_config: NotRequired[OnboardingDocumentsConfigTypedDict] + onboarding_documents_config: NotRequired[EmployeeOnboardingDocumentsConfigTypedDict] r"""Configuration for an employee onboarding documents during onboarding""" jobs: NotRequired[List[JobTypedDict]] eligible_paid_time_off: NotRequired[List[PaidTimeOffTypedDict]] @@ -139,12 +143,22 @@ class EmployeeTypedDict(TypedDict): r"""Deprecated. This field always returns an empty string.""" phone: NotRequired[Nullable[str]] preferred_first_name: NotRequired[Nullable[str]] - payment_method: NotRequired[PaymentMethod] + payment_method: NotRequired[EmployeePaymentMethod] r"""The employee's payment method""" - work_email: NotRequired[Nullable[str]] - r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" - current_employment_status: NotRequired[Nullable[CurrentEmploymentStatus]] + current_employment_status: NotRequired[Nullable[EmployeeCurrentEmploymentStatus]] r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" + historical: NotRequired[bool] + employee_code: NotRequired[str] + r"""The short format code of the employee""" + department_uuid: NotRequired[Nullable[str]] + r"""The UUID of the department the employee is under""" + title: NotRequired[str] + hired_at: NotRequired[date] + r"""The date when the employee was hired to the company""" + hidden_ssn: NotRequired[str] + flsa_status: NotRequired[FlsaStatusType] + r"""The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company.""" + applicable_tax_ids: NotRequired[List[float]] class Employee(BaseModel): @@ -180,13 +194,16 @@ class Employee(BaseModel): two_percent_shareholder: OptionalNullable[bool] = UNSET r"""Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type.""" + work_email: OptionalNullable[str] = UNSET + r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" + onboarded: Optional[bool] = None r"""Whether the employee has completed onboarding.""" - onboarding_status: OptionalNullable[OnboardingStatus] = UNSET + onboarding_status: OptionalNullable[EmployeeOnboardingStatus] = UNSET r"""The current onboarding status of the employee""" - onboarding_documents_config: Optional[OnboardingDocumentsConfig] = None + onboarding_documents_config: Optional[EmployeeOnboardingDocumentsConfig] = None r"""Configuration for an employee onboarding documents during onboarding""" jobs: Optional[List[Job]] = None @@ -212,15 +229,32 @@ class Employee(BaseModel): preferred_first_name: OptionalNullable[str] = UNSET - payment_method: Optional[PaymentMethod] = PaymentMethod.CHECK + payment_method: Optional[EmployeePaymentMethod] = EmployeePaymentMethod.CHECK r"""The employee's payment method""" - work_email: OptionalNullable[str] = UNSET - r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" - - current_employment_status: OptionalNullable[CurrentEmploymentStatus] = UNSET + current_employment_status: OptionalNullable[EmployeeCurrentEmploymentStatus] = UNSET r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" + historical: Optional[bool] = None + + employee_code: Optional[str] = None + r"""The short format code of the employee""" + + department_uuid: OptionalNullable[str] = UNSET + r"""The UUID of the department the employee is under""" + + title: Optional[str] = None + + hired_at: Optional[date] = None + r"""The date when the employee was hired to the company""" + + hidden_ssn: Optional[str] = None + + flsa_status: Optional[FlsaStatusType] = None + r"""The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company.""" + + applicable_tax_ids: Optional[List[float]] = None + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -232,6 +266,7 @@ def serialize_model(self, handler): "department", "terminated", "two_percent_shareholder", + "work_email", "onboarded", "onboarding_status", "onboarding_documents_config", @@ -246,8 +281,15 @@ def serialize_model(self, handler): "phone", "preferred_first_name", "payment_method", - "work_email", "current_employment_status", + "historical", + "employee_code", + "department_uuid", + "title", + "hired_at", + "hidden_ssn", + "flsa_status", + "applicable_tax_ids", ] nullable_fields = [ "middle_initial", @@ -255,12 +297,13 @@ def serialize_model(self, handler): "manager_uuid", "department", "two_percent_shareholder", + "work_email", "onboarding_status", "date_of_birth", "phone", "preferred_first_name", - "work_email", "current_employment_status", + "department_uuid", ] null_default_fields = [] diff --git a/gusto_app_int/src/gusto_app_integration/models/employee_address.py b/gusto_app_int/src/gusto_app_integration/models/employee_address.py index 740fb003..4f7d558e 100644 --- a/gusto_app_int/src/gusto_app_integration/models/employee_address.py +++ b/gusto_app_int/src/gusto_app_integration/models/employee_address.py @@ -15,8 +15,16 @@ class EmployeeAddressTypedDict(TypedDict): - version: NotRequired[str] + uuid: str + r"""The UUID of the employee address""" + version: str r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + employee_uuid: NotRequired[str] + r"""The UUID of the employee""" + effective_date: NotRequired[date] + r"""The date the employee started living at the address.""" + courtesy_withholding: NotRequired[bool] + r"""Determines if home taxes should be withheld and paid for employee.""" street_1: NotRequired[str] street_2: NotRequired[Nullable[str]] city: NotRequired[str] @@ -25,20 +33,24 @@ class EmployeeAddressTypedDict(TypedDict): country: NotRequired[str] active: NotRequired[bool] r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" - uuid: NotRequired[str] - r"""The UUID of the employee address""" - employee_uuid: NotRequired[str] - r"""The UUID of the employee""" - effective_date: NotRequired[date] - r"""The date the employee started living at the address.""" - courtesy_withholding: NotRequired[bool] - r"""Determines if home taxes should be withheld and paid for employee.""" class EmployeeAddress(BaseModel): - version: Optional[str] = None + uuid: str + r"""The UUID of the employee address""" + + version: str r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + employee_uuid: Optional[str] = None + r"""The UUID of the employee""" + + effective_date: Optional[date] = None + r"""The date the employee started living at the address.""" + + courtesy_withholding: Optional[bool] = None + r"""Determines if home taxes should be withheld and paid for employee.""" + street_1: Optional[str] = None street_2: OptionalNullable[str] = UNSET @@ -54,22 +66,12 @@ class EmployeeAddress(BaseModel): active: Optional[bool] = None r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" - uuid: Optional[str] = None - r"""The UUID of the employee address""" - - employee_uuid: Optional[str] = None - r"""The UUID of the employee""" - - effective_date: Optional[date] = None - r"""The date the employee started living at the address.""" - - courtesy_withholding: Optional[bool] = None - r"""Determines if home taxes should be withheld and paid for employee.""" - @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ - "version", + "employee_uuid", + "effective_date", + "courtesy_withholding", "street_1", "street_2", "city", @@ -77,10 +79,6 @@ def serialize_model(self, handler): "zip", "country", "active", - "uuid", - "employee_uuid", - "effective_date", - "courtesy_withholding", ] nullable_fields = ["street_2"] null_default_fields = [] diff --git a/gusto_app_int/src/gusto_app_integration/models/employee_benefit.py b/gusto_app_int/src/gusto_app_integration/models/employee_benefit.py index 002d0472..ba44ecc8 100644 --- a/gusto_app_int/src/gusto_app_integration/models/employee_benefit.py +++ b/gusto_app_int/src/gusto_app_integration/models/employee_benefit.py @@ -21,11 +21,15 @@ class TiersTypedDict(TypedDict): rate: NotRequired[str] r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: NotRequired[str] - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + For example: + + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: NotRequired[str] r"""The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold.""" @@ -38,11 +42,15 @@ class Tiers(BaseModel): r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: Optional[str] = None - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. + + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + For example: - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: Optional[str] = None @@ -146,8 +154,8 @@ class EmployeeBenefitTypedDict(TypedDict): `Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. """ - catch_up: NotRequired[bool] - r"""Whether the employee should use a benefit’s \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" + catch_up: NotRequired[Nullable[bool]] + r"""Whether the employee should use a benefit's \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" retirement_loan_identifier: NotRequired[str] r"""Identifier for a 401(k) loan assigned by the 401(k) provider""" coverage_amount: NotRequired[Nullable[str]] @@ -156,8 +164,8 @@ class EmployeeBenefitTypedDict(TypedDict): Nullable[DeductionReducesTaxableIncome] ] r"""Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not \"unset\", coverage amount and coverage salary multiplier are ignored.""" - coverage_salary_multiplier: NotRequired[str] - r"""The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" + coverage_salary_multiplier: NotRequired[Nullable[str]] + r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" company_contribution: NotRequired[str] r"""The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types.""" contribute_as_percentage: NotRequired[bool] @@ -206,8 +214,8 @@ class EmployeeBenefit(BaseModel): `Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. """ - catch_up: Optional[bool] = False - r"""Whether the employee should use a benefit’s \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" + catch_up: OptionalNullable[bool] = False + r"""Whether the employee should use a benefit's \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" retirement_loan_identifier: Optional[str] = None r"""Identifier for a 401(k) loan assigned by the 401(k) provider""" @@ -220,8 +228,8 @@ class EmployeeBenefit(BaseModel): ] = DeductionReducesTaxableIncome.UNSET r"""Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not \"unset\", coverage amount and coverage salary multiplier are ignored.""" - coverage_salary_multiplier: Optional[str] = "0.00" - r"""The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" + coverage_salary_multiplier: OptionalNullable[str] = "0.00" + r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" company_contribution: Annotated[ Optional[str], @@ -271,8 +279,10 @@ def serialize_model(self, handler): "employee_deduction_annual_maximum", "company_contribution_annual_maximum", "limit_option", + "catch_up", "coverage_amount", "deduction_reduces_taxable_income", + "coverage_salary_multiplier", ] null_default_fields = [] diff --git a/gusto_app_int/src/gusto_app_integration/models/employee_benefit_for_company_benefit.py b/gusto_app_int/src/gusto_app_integration/models/employee_benefit_for_company_benefit.py index 57b4c5ee..6dbc9a63 100644 --- a/gusto_app_int/src/gusto_app_integration/models/employee_benefit_for_company_benefit.py +++ b/gusto_app_int/src/gusto_app_integration/models/employee_benefit_for_company_benefit.py @@ -21,11 +21,15 @@ class ValueTiersTypedDict(TypedDict): rate: NotRequired[str] r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: NotRequired[str] - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + For example: + + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: NotRequired[str] r"""The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold.""" @@ -38,11 +42,15 @@ class ValueTiers(BaseModel): r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: Optional[str] = None - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. + + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + For example: - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: Optional[str] = None @@ -150,8 +158,8 @@ class EmployeeBenefitForCompanyBenefitTypedDict(TypedDict): `Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. """ - catch_up: NotRequired[bool] - r"""Whether the employee should use a benefit’s \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" + catch_up: NotRequired[Nullable[bool]] + r"""Whether the employee should use a benefit's \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" retirement_loan_identifier: NotRequired[str] r"""Identifier for a 401(k) loan assigned by the 401(k) provider""" coverage_amount: NotRequired[Nullable[str]] @@ -160,8 +168,8 @@ class EmployeeBenefitForCompanyBenefitTypedDict(TypedDict): Nullable[EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome] ] r"""Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not \"unset\", coverage amount and coverage salary multiplier are ignored.""" - coverage_salary_multiplier: NotRequired[str] - r"""The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" + coverage_salary_multiplier: NotRequired[Nullable[str]] + r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" company_contribution: NotRequired[str] r"""The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types.""" contribute_as_percentage: NotRequired[bool] @@ -206,8 +214,8 @@ class EmployeeBenefitForCompanyBenefit(BaseModel): `Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. """ - catch_up: Optional[bool] = False - r"""Whether the employee should use a benefit’s \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" + catch_up: OptionalNullable[bool] = False + r"""Whether the employee should use a benefit's \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" retirement_loan_identifier: Optional[str] = None r"""Identifier for a 401(k) loan assigned by the 401(k) provider""" @@ -220,8 +228,8 @@ class EmployeeBenefitForCompanyBenefit(BaseModel): ] = EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome.UNSET r"""Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not \"unset\", coverage amount and coverage salary multiplier are ignored.""" - coverage_salary_multiplier: Optional[str] = "0.00" - r"""The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" + coverage_salary_multiplier: OptionalNullable[str] = "0.00" + r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" company_contribution: Annotated[ Optional[str], @@ -263,8 +271,10 @@ def serialize_model(self, handler): "employee_deduction_annual_maximum", "company_contribution_annual_maximum", "limit_option", + "catch_up", "coverage_amount", "deduction_reduces_taxable_income", + "coverage_salary_multiplier", ] null_default_fields = [] diff --git a/gusto_app_int/src/gusto_app_integration/models/employee_home_address.py b/gusto_app_int/src/gusto_app_integration/models/employee_home_address.py new file mode 100644 index 00000000..0c717bd5 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/employee_home_address.py @@ -0,0 +1,85 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gusto_app_integration.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class EmployeeHomeAddressTypedDict(TypedDict): + street_1: NotRequired[Nullable[str]] + street_2: NotRequired[Nullable[str]] + city: NotRequired[Nullable[str]] + state: NotRequired[Nullable[str]] + zip: NotRequired[Nullable[str]] + country: NotRequired[Nullable[str]] + active: NotRequired[bool] + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" + uuid: NotRequired[str] + r"""Unique identifier for this address.""" + + +class EmployeeHomeAddress(BaseModel): + street_1: OptionalNullable[str] = UNSET + + street_2: OptionalNullable[str] = UNSET + + city: OptionalNullable[str] = UNSET + + state: OptionalNullable[str] = UNSET + + zip: OptionalNullable[str] = UNSET + + country: OptionalNullable[str] = "USA" + + active: Optional[bool] = None + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" + + uuid: Optional[str] = None + r"""Unique identifier for this address.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "street_1", + "street_2", + "city", + "state", + "zip", + "country", + "active", + "uuid", + ] + nullable_fields = ["street_1", "street_2", "city", "state", "zip", "country"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_app_int/src/gusto_app_integration/models/employee_work_address.py b/gusto_app_int/src/gusto_app_integration/models/employee_work_address.py index 6736c71e..6e7ed0c5 100644 --- a/gusto_app_int/src/gusto_app_integration/models/employee_work_address.py +++ b/gusto_app_int/src/gusto_app_integration/models/employee_work_address.py @@ -14,8 +14,6 @@ class EmployeeWorkAddressTypedDict(TypedDict): - r"""List of employee work addresses""" - uuid: str r"""The unique identifier of this work address.""" version: str @@ -37,8 +35,6 @@ class EmployeeWorkAddressTypedDict(TypedDict): class EmployeeWorkAddress(BaseModel): - r"""List of employee work addresses""" - uuid: str r"""The unique identifier of this work address.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/employment_history_list.py b/gusto_app_int/src/gusto_app_integration/models/employment_history_list.py index 6526ebad..f216eb00 100644 --- a/gusto_app_int/src/gusto_app_integration/models/employment_history_list.py +++ b/gusto_app_int/src/gusto_app_integration/models/employment_history_list.py @@ -2,7 +2,14 @@ from __future__ import annotations from enum import Enum -from gusto_app_integration.types import BaseModel +from gusto_app_integration.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -22,7 +29,7 @@ class EmploymentHistoryListTypedDict(TypedDict): hire_date: NotRequired[str] r"""The employee's start day of work for an employment.""" - termination_date: NotRequired[str] + termination_date: NotRequired[Nullable[str]] r"""The employee's last day of work for an employment.""" file_new_hire_report: NotRequired[bool] r"""The boolean flag indicating whether Gusto will file a new hire report for the employee.""" @@ -38,7 +45,7 @@ class EmploymentHistoryList(BaseModel): hire_date: Optional[str] = None r"""The employee's start day of work for an employment.""" - termination_date: Optional[str] = None + termination_date: OptionalNullable[str] = UNSET r"""The employee's last day of work for an employment.""" file_new_hire_report: Optional[bool] = None @@ -49,3 +56,39 @@ class EmploymentHistoryList(BaseModel): employment_status: Optional[EmploymentHistoryListEmploymentStatus] = None r"""The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "hire_date", + "termination_date", + "file_new_hire_report", + "two_percent_shareholder", + "employment_status", + ] + nullable_fields = ["termination_date"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_app_int/src/gusto_app_integration/models/general_ledger_report.py b/gusto_app_int/src/gusto_app_integration/models/general_ledger_report.py new file mode 100644 index 00000000..faae52e5 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/general_ledger_report.py @@ -0,0 +1,94 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_app_integration.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class Aggregation(str, Enum): + r"""The breakdown level used for the report""" + + DEFAULT = "default" + JOB = "job" + DEPARTMENT = "department" + INTEGRATION = "integration" + + +class IntegrationType(str, Enum): + r"""The `integration_type` used for the report, if `aggregation` was 'integration.' Otherwise, this will be null.""" + + XERO = "xero" + QBO = "qbo" + + +class GeneralLedgerReportTypedDict(TypedDict): + r"""Successful response for general ledger report generation""" + + payroll_uuid: NotRequired[str] + r"""The UUID of the payroll record for which the report was generated""" + aggregation: NotRequired[Aggregation] + r"""The breakdown level used for the report""" + integration_type: NotRequired[Nullable[IntegrationType]] + r"""The `integration_type` used for the report, if `aggregation` was 'integration.' Otherwise, this will be null.""" + request_uuid: NotRequired[str] + r"""UUID to use for polling the report status""" + + +class GeneralLedgerReport(BaseModel): + r"""Successful response for general ledger report generation""" + + payroll_uuid: Optional[str] = None + r"""The UUID of the payroll record for which the report was generated""" + + aggregation: Optional[Aggregation] = None + r"""The breakdown level used for the report""" + + integration_type: OptionalNullable[IntegrationType] = UNSET + r"""The `integration_type` used for the report, if `aggregation` was 'integration.' Otherwise, this will be null.""" + + request_uuid: Optional[str] = None + r"""UUID to use for polling the report status""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "payroll_uuid", + "aggregation", + "integration_type", + "request_uuid", + ] + nullable_fields = ["integration_type"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_app_int/src/gusto_app_integration/models/get_companies_company_uuid_time_tracking_time_sheetsop.py b/gusto_app_int/src/gusto_app_integration/models/get_companies_company_uuid_time_tracking_time_sheetsop.py index 64e6ceff..9945854c 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_companies_company_uuid_time_tracking_time_sheetsop.py +++ b/gusto_app_int/src/gusto_app_integration/models/get_companies_company_uuid_time_tracking_time_sheetsop.py @@ -30,7 +30,7 @@ class GetCompaniesCompanyUUIDTimeTrackingTimeSheetsRequestTypedDict(TypedDict): sort_by: NotRequired[TimeSheetSortBy] r"""Field to sort by. One of: \"created_at\", \"updated_at\", \"shift_started_at\", \"shift_ended_at\" """ sort_order: NotRequired[TimeSheetSortOrder] - r"""Sortinng order. One of: \"asc\", \"desc\" """ + r"""Sorting order. One of: \"asc\", \"desc\" """ before: NotRequired[str] r"""time sheets that were created before ISO 8601 timestamp. Filtering by \"created_at\" """ after: NotRequired[str] @@ -77,7 +77,7 @@ class GetCompaniesCompanyUUIDTimeTrackingTimeSheetsRequest(BaseModel): Optional[TimeSheetSortOrder], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None - r"""Sortinng order. One of: \"asc\", \"desc\" """ + r"""Sorting order. One of: \"asc\", \"desc\" """ before: Annotated[ Optional[str], diff --git a/gusto_app_int/src/gusto_app_integration/models/get_company_notificationsop.py b/gusto_app_int/src/gusto_app_integration/models/get_company_notificationsop.py new file mode 100644 index 00000000..f338e70c --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/get_company_notificationsop.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_app_integration.types import BaseModel +from gusto_app_integration.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class QueryParamStatus(str, Enum): + OPEN = "open" + EXPIRED = "expired" + RESOLVED = "resolved" + + +class GetCompanyNotificationsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetCompanyNotificationsRequestTypedDict(TypedDict): + company_uuid: str + r"""The UUID of the company for which you would like to return notifications""" + status: NotRequired[QueryParamStatus] + x_gusto_api_version: NotRequired[GetCompanyNotificationsHeaderXGustoAPIVersion] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + page: NotRequired[int] + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + per: NotRequired[int] + r"""Number of objects per page. For majority of endpoints will default to 25""" + + +class GetCompanyNotificationsRequest(BaseModel): + company_uuid: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the company for which you would like to return notifications""" + + status: Annotated[ + Optional[QueryParamStatus], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + + x_gusto_api_version: Annotated[ + Optional[GetCompanyNotificationsHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetCompanyNotificationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + + per: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Number of objects per page. For majority of endpoints will default to 25""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_reports_request_uuidop.py b/gusto_app_int/src/gusto_app_integration/models/get_reports_request_uuidop.py new file mode 100644 index 00000000..b123ef99 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/get_reports_request_uuidop.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .versionheader import VersionHeader +from gusto_app_integration.types import BaseModel +from gusto_app_integration.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetReportsRequestUUIDRequestTypedDict(TypedDict): + request_uuid: str + r"""The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint.""" + x_gusto_api_version: NotRequired[VersionHeader] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetReportsRequestUUIDRequest(BaseModel): + request_uuid: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint.""" + + x_gusto_api_version: Annotated[ + Optional[VersionHeader], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_contractors_payment_detailsop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_contractors_payment_detailsop.py new file mode 100644 index 00000000..c24f2b54 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_contractors_payment_detailsop.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_app_integration.types import BaseModel +from gusto_app_integration.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetV1CompaniesCompanyIDContractorsPaymentDetailsRequestTypedDict(TypedDict): + company_id: str + r"""The UUID of the company. This identifies the company whose contractor payment details you want to retrieve.""" + contractor_uuid: NotRequired[str] + r"""Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor.""" + contractor_payment_group_uuid: NotRequired[str] + r"""Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group.""" + x_gusto_api_version: NotRequired[ + GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest(BaseModel): + company_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the company. This identifies the company whose contractor payment details you want to retrieve.""" + + contractor_uuid: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor.""" + + contractor_payment_group_uuid: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group.""" + + x_gusto_api_version: Annotated[ + Optional[ + GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion + ], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_employeesop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_employeesop.py index 26745c14..374f0adb 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_employeesop.py +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_employeesop.py @@ -21,9 +21,12 @@ class GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion(str, Enum): class Include(str, Enum): - CUSTOM_FIELDS = "custom_fields" ALL_COMPENSATIONS = "all_compensations" + ALL_HOME_ADDRESSES = "all_home_addresses" COMPANY_NAME = "company_name" + CURRENT_HOME_ADDRESS = "current_home_address" + CUSTOM_FIELDS = "custom_fields" + PORTAL_INVITATIONS = "portal_invitations" class GetV1CompaniesCompanyIDEmployeesRequestTypedDict(TypedDict): @@ -33,16 +36,26 @@ class GetV1CompaniesCompanyIDEmployeesRequestTypedDict(TypedDict): GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + location_uuid: NotRequired[str] + r"""Filter employees by a specific primary work location""" + payroll_uuid: NotRequired[str] + r"""Filter employees by a specific payroll""" search_term: NotRequired[str] r"""A string to search for in the object's names""" + sort_by: NotRequired[str] + r"""Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status""" include: NotRequired[List[Include]] - r"""Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - - custom_fields: Include employees' custom fields - - """ + r"""Include the requested attribute(s) in each employee response. Multiple options are comma separated.""" + onboarded: NotRequired[bool] + r"""Filters employees by those who have completed onboarding""" + onboarded_active: NotRequired[bool] + r"""Filters employees who are ready to work (onboarded AND active today)""" terminated: NotRequired[bool] - r"""Filters employees by the provided boolean""" + r"""Filters employees by those who have been or are scheduled to be terminated""" + terminated_today: NotRequired[bool] + r"""Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated)""" + uuids: NotRequired[List[str]] + r"""Optional subset of employees to fetch.""" page: NotRequired[int] r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" per: NotRequired[int] @@ -62,27 +75,65 @@ class GetV1CompaniesCompanyIDEmployeesRequest(BaseModel): ] = GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + location_uuid: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter employees by a specific primary work location""" + + payroll_uuid: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter employees by a specific payroll""" + search_term: Annotated[ Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None r"""A string to search for in the object's names""" + sort_by: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status""" + include: Annotated[ Optional[List[Include]], FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), ] = None - r"""Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - - custom_fields: Include employees' custom fields + r"""Include the requested attribute(s) in each employee response. Multiple options are comma separated.""" - """ + onboarded: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filters employees by those who have completed onboarding""" + + onboarded_active: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filters employees who are ready to work (onboarded AND active today)""" terminated: Annotated[ Optional[bool], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None - r"""Filters employees by the provided boolean""" + r"""Filters employees by those who have been or are scheduled to be terminated""" + + terminated_today: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated)""" + + uuids: Annotated[ + Optional[List[str]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""Optional subset of employees to fetch.""" page: Annotated[ Optional[int], diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_payrolls_payroll_idop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_payrolls_payroll_idop.py index cf871e86..f14af476 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_payrolls_payroll_idop.py +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_payrolls_payroll_idop.py @@ -1,7 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from enum import Enum from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import ( @@ -15,11 +14,28 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude(str, Enum): BENEFITS = "benefits" DEDUCTIONS = "deductions" TAXES = "taxes" PAYROLL_STATUS_META = "payroll_status_meta" + TOTALS = "totals" + RISK_BLOCKERS = "risk_blockers" + REVERSALS = "reversals" + PAYROLL_TAXES = "payroll_taxes" + + +class SortBy(str, Enum): + r"""Field to sort employee compensations by""" + + FIRST_NAME = "first_name" + LAST_NAME = "last_name" class GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict(TypedDict): @@ -27,12 +43,20 @@ class GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict(TypedDict): r"""The UUID of the company""" payroll_id: str r"""The UUID of the payroll""" + x_gusto_api_version: NotRequired[ + GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" include: NotRequired[ List[GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude] ] r"""Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes`""" - x_gusto_api_version: NotRequired[VersionHeader] - r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + page: NotRequired[int] + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + per: NotRequired[int] + r"""Number of objects per page. For majority of endpoints will default to 25""" + sort_by: NotRequired[SortBy] + r"""Field to sort employee compensations by""" class GetV1CompaniesCompanyIDPayrollsPayrollIDRequest(BaseModel): @@ -46,15 +70,33 @@ class GetV1CompaniesCompanyIDPayrollsPayrollIDRequest(BaseModel): ] r"""The UUID of the payroll""" + x_gusto_api_version: Annotated[ + Optional[GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + include: Annotated[ Optional[List[GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude]], FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), ] = None r"""Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes`""" - x_gusto_api_version: Annotated[ - Optional[VersionHeader], - pydantic.Field(alias="X-Gusto-API-Version"), - FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 - r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + + per: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Number of objects per page. For majority of endpoints will default to 25""" + + sort_by: Annotated[ + Optional[SortBy], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Field to sort employee compensations by""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_payrollsop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_payrollsop.py index c6cfba93..b321c894 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_payrollsop.py +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_payrollsop.py @@ -1,8 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .sort_order import SortOrder -from .versionheader import VersionHeader from enum import Enum from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import ( @@ -16,9 +14,15 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class ProcessingStatuses(str, Enum): - UNPROCESSED = "unprocessed" PROCESSED = "processed" + UNPROCESSED = "unprocessed" class PayrollTypes(str, Enum): @@ -28,33 +32,47 @@ class PayrollTypes(str, Enum): class GetV1CompaniesCompanyIDPayrollsQueryParamInclude(str, Enum): - TOTALS = "totals" + TAXES = "taxes" PAYROLL_STATUS_META = "payroll_status_meta" + TOTALS = "totals" RISK_BLOCKERS = "risk_blockers" REVERSALS = "reversals" +class QueryParamSortOrder(str, Enum): + r"""A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty.""" + + ASC = "asc" + DESC = "desc" + + class GetV1CompaniesCompanyIDPayrollsRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" + x_gusto_api_version: NotRequired[ + GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" processing_statuses: NotRequired[List[ProcessingStatuses]] r"""Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed`""" payroll_types: NotRequired[List[PayrollTypes]] r"""Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle`""" + processed: NotRequired[bool] + r"""Whether to return processed or unprocessed payrolls""" + include_off_cycle: NotRequired[bool] + r"""Whether to include off cycle payrolls in the response""" include: NotRequired[List[GetV1CompaniesCompanyIDPayrollsQueryParamInclude]] - r"""Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta`""" + r"""Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes`""" start_date: NotRequired[str] r"""Return payrolls whose pay period is after the start date""" end_date: NotRequired[str] r"""Return payrolls whose pay period is before the end date. If left empty, defaults to today's date.""" - sort_order: NotRequired[SortOrder] - r"""A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty.""" page: NotRequired[int] r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" per: NotRequired[int] r"""Number of objects per page. For majority of endpoints will default to 25""" - x_gusto_api_version: NotRequired[VersionHeader] - r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + sort_order: NotRequired[QueryParamSortOrder] + r"""A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty.""" class GetV1CompaniesCompanyIDPayrollsRequest(BaseModel): @@ -63,6 +81,13 @@ class GetV1CompaniesCompanyIDPayrollsRequest(BaseModel): ] r"""The UUID of the company""" + x_gusto_api_version: Annotated[ + Optional[GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + processing_statuses: Annotated[ Optional[List[ProcessingStatuses]], FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), @@ -75,11 +100,23 @@ class GetV1CompaniesCompanyIDPayrollsRequest(BaseModel): ] = None r"""Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle`""" + processed: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Whether to return processed or unprocessed payrolls""" + + include_off_cycle: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Whether to include off cycle payrolls in the response""" + include: Annotated[ Optional[List[GetV1CompaniesCompanyIDPayrollsQueryParamInclude]], FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), ] = None - r"""Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta`""" + r"""Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes`""" start_date: Annotated[ Optional[str], @@ -93,12 +130,6 @@ class GetV1CompaniesCompanyIDPayrollsRequest(BaseModel): ] = None r"""Return payrolls whose pay period is before the end date. If left empty, defaults to today's date.""" - sort_order: Annotated[ - Optional[SortOrder], - FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = None - r"""A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty.""" - page: Annotated[ Optional[int], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -111,9 +142,8 @@ class GetV1CompaniesCompanyIDPayrollsRequest(BaseModel): ] = None r"""Number of objects per page. For majority of endpoints will default to 25""" - x_gusto_api_version: Annotated[ - Optional[VersionHeader], - pydantic.Field(alias="X-Gusto-API-Version"), - FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 - r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + sort_order: Annotated[ + Optional[QueryParamSortOrder], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_time_off_requestsop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_time_off_requestsop.py new file mode 100644 index 00000000..2d5b7841 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_time_off_requestsop.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_app_integration.types import BaseModel +from gusto_app_integration.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetV1CompaniesCompanyIDTimeOffRequestsRequestTypedDict(TypedDict): + company_id: str + r"""The company UUID""" + x_gusto_api_version: NotRequired[ + GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + start_date: NotRequired[str] + r"""Filter time off requests starting on or after this date""" + end_date: NotRequired[str] + r"""Filter time off requests ending on or before this date""" + + +class GetV1CompaniesCompanyIDTimeOffRequestsRequest(BaseModel): + company_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The company UUID""" + + x_gusto_api_version: Annotated[ + Optional[GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + start_date: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter time off requests starting on or after this date""" + + end_date: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter time off requests ending on or before this date""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_uuid_contractorsop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_uuid_contractorsop.py index 07c7f27c..d484a7c1 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_uuid_contractorsop.py +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_uuid_contractorsop.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .contractors_sort_by import ContractorsSortBy from .versionheader import VersionHeader from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import ( @@ -23,6 +24,8 @@ class GetV1CompaniesCompanyUUIDContractorsRequestTypedDict(TypedDict): r"""Number of objects per page. For majority of endpoints will default to 25""" search_term: NotRequired[str] r"""A string to search for in the object's names""" + sort_by: NotRequired[ContractorsSortBy] + r"""Sort contractors. Options: type, onboarding_status, name, created_at""" x_gusto_api_version: NotRequired[VersionHeader] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -51,6 +54,12 @@ class GetV1CompaniesCompanyUUIDContractorsRequest(BaseModel): ] = None r"""A string to search for in the object's names""" + sort_by: Annotated[ + Optional[ContractorsSortBy], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Sort contractors. Options: type, onboarding_status, name, created_at""" + x_gusto_api_version: Annotated[ Optional[VersionHeader], pydantic.Field(alias="X-Gusto-API-Version"), diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_contractor_payment_groups_contractor_payment_group_idop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py similarity index 78% rename from gusto_app_int/src/gusto_app_integration/models/get_v1_contractor_payment_groups_contractor_payment_group_idop.py rename to gusto_app_int/src/gusto_app_integration/models/get_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py index 75c28ebb..7904c349 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_v1_contractor_payment_groups_contractor_payment_group_idop.py +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py @@ -9,18 +9,20 @@ from typing_extensions import Annotated, NotRequired, TypedDict -class GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict(TypedDict): - contractor_payment_group_uuid: str - r"""The UUID of the contractor payment group""" +class GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict( + TypedDict +): + company_benefit_id: str + r"""The UUID of the company benefit""" x_gusto_api_version: NotRequired[VersionHeader] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" -class GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest(BaseModel): - contractor_payment_group_uuid: Annotated[ +class GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest(BaseModel): + company_benefit_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] - r"""The UUID of the contractor payment group""" + r"""The UUID of the company benefit""" x_gusto_api_version: Annotated[ Optional[VersionHeader], diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_employees_employee_id_home_addressesop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_employees_employee_id_home_addressesop.py index ea01278d..0317962d 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_v1_employees_employee_id_home_addressesop.py +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_employees_employee_id_home_addressesop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1EmployeesEmployeeIDHomeAddressesRequestTypedDict(TypedDict): employee_id: str r"""The UUID of the employee""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetV1EmployeesEmployeeIDHomeAddressesRequest(BaseModel): r"""The UUID of the employee""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_employees_employee_id_work_addressesop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_employees_employee_id_work_addressesop.py index 8b667ce9..9a2cd300 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_v1_employees_employee_id_work_addressesop.py +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_employees_employee_id_work_addressesop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1EmployeesEmployeeIDWorkAddressesRequestTypedDict(TypedDict): employee_id: str r"""The UUID of the employee""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetV1EmployeesEmployeeIDWorkAddressesRequest(BaseModel): r"""The UUID of the employee""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_employeesop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_employeesop.py index 82f1b74e..9a5b902b 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_v1_employeesop.py +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_employeesop.py @@ -21,9 +21,12 @@ class GetV1EmployeesHeaderXGustoAPIVersion(str, Enum): class QueryParamInclude(str, Enum): - CUSTOM_FIELDS = "custom_fields" ALL_COMPENSATIONS = "all_compensations" + ALL_HOME_ADDRESSES = "all_home_addresses" COMPANY_NAME = "company_name" + CURRENT_HOME_ADDRESS = "current_home_address" + CUSTOM_FIELDS = "custom_fields" + PORTAL_INVITATIONS = "portal_invitations" class GetV1EmployeesRequestTypedDict(TypedDict): @@ -32,11 +35,7 @@ class GetV1EmployeesRequestTypedDict(TypedDict): x_gusto_api_version: NotRequired[GetV1EmployeesHeaderXGustoAPIVersion] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" include: NotRequired[List[QueryParamInclude]] - r"""Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - - custom_fields: Include employees' custom fields - - """ + r"""Include the requested attribute(s) in each employee response. Multiple options are comma separated.""" class GetV1EmployeesRequest(BaseModel): @@ -56,8 +55,4 @@ class GetV1EmployeesRequest(BaseModel): Optional[List[QueryParamInclude]], FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), ] = None - r"""Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - - custom_fields: Include employees' custom fields - - """ + r"""Include the requested attribute(s) in each employee response. Multiple options are comma separated.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_home_addresses_home_address_uuidop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_home_addresses_home_address_uuidop.py index f3605c05..3ee74cf3 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_v1_home_addresses_home_address_uuidop.py +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_home_addresses_home_address_uuidop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1HomeAddressesHomeAddressUUIDRequestTypedDict(TypedDict): home_address_uuid: str r"""The UUID of the home address""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetV1HomeAddressesHomeAddressUUIDRequest(BaseModel): r"""The UUID of the home address""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_webhooks_health_checkop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_webhooks_health_checkop.py new file mode 100644 index 00000000..45aa7aaf --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_webhooks_health_checkop.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_app_integration.types import BaseModel +from gusto_app_integration.utils import FieldMetadata, HeaderMetadata, SecurityMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetV1WebhooksHealthCheckSecurityTypedDict(TypedDict): + system_access_auth: str + + +class GetV1WebhooksHealthCheckSecurity(BaseModel): + system_access_auth: Annotated[ + str, + FieldMetadata( + security=SecurityMetadata( + scheme=True, + scheme_type="http", + sub_type="bearer", + field_name="Authorization", + ) + ), + ] + + +class GetV1WebhooksHealthCheckHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetV1WebhooksHealthCheckRequestTypedDict(TypedDict): + x_gusto_api_version: NotRequired[GetV1WebhooksHealthCheckHeaderXGustoAPIVersion] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetV1WebhooksHealthCheckRequest(BaseModel): + x_gusto_api_version: Annotated[ + Optional[GetV1WebhooksHealthCheckHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1WebhooksHealthCheckHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_work_addresses_work_address_uuidop.py b/gusto_app_int/src/gusto_app_integration/models/get_v1_work_addresses_work_address_uuidop.py index 68bce930..d5de23ab 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_v1_work_addresses_work_address_uuidop.py +++ b/gusto_app_int/src/gusto_app_integration/models/get_v1_work_addresses_work_address_uuidop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1WorkAddressesWorkAddressUUIDRequestTypedDict(TypedDict): work_address_uuid: str r"""The UUID of the work address""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetV1WorkAddressesWorkAddressUUIDRequest(BaseModel): r"""The UUID of the work address""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/gustoappintegrationerror.py b/gusto_app_int/src/gusto_app_integration/models/gustoappintegrationerror.py new file mode 100644 index 00000000..468c5287 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/gustoappintegrationerror.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import httpx +from typing import Optional +from dataclasses import dataclass, field + + +@dataclass(unsafe_hash=True) +class GustoAppIntegrationError(Exception): + """The base class for all HTTP error responses.""" + + message: str + status_code: int + body: str + headers: httpx.Headers = field(hash=False) + raw_response: httpx.Response = field(hash=False) + + def __init__( + self, message: str, raw_response: httpx.Response, body: Optional[str] = None + ): + object.__setattr__(self, "message", message) + object.__setattr__(self, "status_code", raw_response.status_code) + object.__setattr__( + self, "body", body if body is not None else raw_response.text + ) + object.__setattr__(self, "headers", raw_response.headers) + object.__setattr__(self, "raw_response", raw_response) + + def __str__(self): + return self.message diff --git a/gusto_app_int/src/gusto_app_integration/models/job.py b/gusto_app_int/src/gusto_app_integration/models/job.py index becd20fc..3189f472 100644 --- a/gusto_app_int/src/gusto_app_integration/models/job.py +++ b/gusto_app_int/src/gusto_app_integration/models/job.py @@ -2,6 +2,7 @@ from __future__ import annotations from .compensation import Compensation, CompensationTypedDict +from .location import Location, LocationTypedDict from gusto_app_integration.types import ( BaseModel, Nullable, @@ -42,6 +43,10 @@ class JobTypedDict(TypedDict): state_wc_class_code: NotRequired[Nullable[str]] r"""The risk class code for workers' compensation in Washington state. Please visit [Washington state's Risk Class page](https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/) to learn more.""" compensations: NotRequired[List[CompensationTypedDict]] + location_uuid: NotRequired[str] + r"""The uuid of the employee's work location.""" + location: NotRequired[LocationTypedDict] + r"""The representation of an address in Gusto.""" class Job(BaseModel): @@ -85,6 +90,12 @@ class Job(BaseModel): compensations: Optional[List[Compensation]] = None + location_uuid: Optional[str] = None + r"""The uuid of the employee's work location.""" + + location: Optional[Location] = None + r"""The representation of an address in Gusto.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -100,6 +111,8 @@ def serialize_model(self, handler): "state_wc_covered", "state_wc_class_code", "compensations", + "location_uuid", + "location", ] nullable_fields = [ "title", diff --git a/gusto_app_int/src/gusto_app_integration/models/location.py b/gusto_app_int/src/gusto_app_integration/models/location.py index 703abcd5..9e779804 100644 --- a/gusto_app_int/src/gusto_app_integration/models/location.py +++ b/gusto_app_int/src/gusto_app_integration/models/location.py @@ -30,8 +30,6 @@ class LocationTypedDict(TypedDict): state: NotRequired[str] zip: NotRequired[str] country: NotRequired[str] - active: NotRequired[bool] - r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" mailing_address: NotRequired[bool] r"""Specifies if the location is the company's mailing address. Only included if the location belongs to a company.""" filing_address: NotRequired[bool] @@ -40,6 +38,10 @@ class LocationTypedDict(TypedDict): r"""Datetime for when location is created""" updated_at: NotRequired[str] r"""Datetime for when location is updated""" + active: NotRequired[bool] + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" + inactive: NotRequired[bool] + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" class Location(BaseModel): @@ -69,9 +71,6 @@ class Location(BaseModel): country: Optional[str] = "USA" - active: Optional[bool] = None - r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" - mailing_address: Optional[bool] = None r"""Specifies if the location is the company's mailing address. Only included if the location belongs to a company.""" @@ -84,6 +83,12 @@ class Location(BaseModel): updated_at: Optional[str] = None r"""Datetime for when location is updated""" + active: Optional[bool] = None + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" + + inactive: Optional[bool] = None + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -96,11 +101,12 @@ def serialize_model(self, handler): "state", "zip", "country", - "active", "mailing_address", "filing_address", "created_at", "updated_at", + "active", + "inactive", ] nullable_fields = ["street_2"] null_default_fields = [] diff --git a/gusto_app_int/src/gusto_app_integration/models/no_response_error.py b/gusto_app_int/src/gusto_app_integration/models/no_response_error.py new file mode 100644 index 00000000..1deab64b --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/no_response_error.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from dataclasses import dataclass + + +@dataclass(unsafe_hash=True) +class NoResponseError(Exception): + """Error raised when no HTTP response is received from the server.""" + + message: str + + def __init__(self, message: str = "No response received"): + object.__setattr__(self, "message", message) + super().__init__(message) + + def __str__(self): + return self.message diff --git a/gusto_app_int/src/gusto_app_integration/models/notification.py b/gusto_app_int/src/gusto_app_integration/models/notification.py new file mode 100644 index 00000000..5d40b93b --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/notification.py @@ -0,0 +1,150 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_app_integration.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import NotRequired, TypedDict + + +class NotificationStatus(str, Enum): + r"""Represents the notification's status as managed by our system. It is updated based on observable system events and internal business logic, and does not reflect resolution steps taken outside our system. This field is read-only and cannot be modified via the API.""" + + OPEN = "open" + RESOLVED = "resolved" + EXPIRED = "expired" + + +class NotificationEntityType(str, Enum): + r"""The type of entity being described.""" + + BANK_ACCOUNT = "BankAccount" + CONTRACTOR = "Contractor" + CONTRACTOR_PAYMENT = "ContractorPayment" + EMPLOYEE = "Employee" + PAYROLL = "Payroll" + PAY_SCHEDULE = "PaySchedule" + RECOVERY_CASE = "RecoveryCase" + SIGNATORY = "Signatory" + WIRE_IN_REQUEST = "Wire In Request" + + +class ResourcesTypedDict(TypedDict): + entity_type: NotificationEntityType + r"""The type of entity being described.""" + entity_uuid: str + r"""Unique identifier of the entity""" + reference_type: NotRequired[str] + r"""Optional. The type of a resource that is related to the one described by entity_type and entity_uuid. For instance, if the entity_type is “BankAccount”, the reference_type could be the “Employee” or “Contractor” to whom the bank account belongs.""" + reference_uuid: NotRequired[str] + r"""Optional. Unique identifier of the reference.""" + + +class Resources(BaseModel): + entity_type: NotificationEntityType + r"""The type of entity being described.""" + + entity_uuid: str + r"""Unique identifier of the entity""" + + reference_type: Optional[str] = None + r"""Optional. The type of a resource that is related to the one described by entity_type and entity_uuid. For instance, if the entity_type is “BankAccount”, the reference_type could be the “Employee” or “Contractor” to whom the bank account belongs.""" + + reference_uuid: Optional[str] = None + r"""Optional. Unique identifier of the reference.""" + + +class NotificationTypedDict(TypedDict): + uuid: str + r"""Unique identifier of a notification.""" + company_uuid: str + r"""Unique identifier of the company to which the notification belongs.""" + title: str + r"""The title of the notification. This highlights the actionable component of the notification.""" + message: str + r"""The message of the notification. This provides additional context for the user and recommends a specific action to resolve the notification.""" + status: NotificationStatus + r"""Represents the notification's status as managed by our system. It is updated based on observable system events and internal business logic, and does not reflect resolution steps taken outside our system. This field is read-only and cannot be modified via the API.""" + category: str + r"""The notification's category.""" + actionable: bool + r"""Indicates whether a notification requires action or not. If false, the notification provides critical information only.""" + can_block_payroll: bool + r"""Indicates whether a notification may block ability to run payroll. If true, we suggest that these notifications are prioritized to your end users.""" + published_at: str + r"""Timestamp of when the notification was published.""" + due_at: Nullable[str] + r"""Timestamp of when the notification is due. If the notification has no due date, this field will be null.""" + resources: List[ResourcesTypedDict] + r"""An array of entities relevant to the notification""" + template_variables: NotRequired[Dict[str, str]] + r"""An object containing template variables used to render the notification. The structure of this object depends on the notification category. Each category defines a fixed set of variable names (keys), which are always present. The values of these variables can vary depending on the specific notification instance.""" + + +class Notification(BaseModel): + uuid: str + r"""Unique identifier of a notification.""" + + company_uuid: str + r"""Unique identifier of the company to which the notification belongs.""" + + title: str + r"""The title of the notification. This highlights the actionable component of the notification.""" + + message: str + r"""The message of the notification. This provides additional context for the user and recommends a specific action to resolve the notification.""" + + status: NotificationStatus + r"""Represents the notification's status as managed by our system. It is updated based on observable system events and internal business logic, and does not reflect resolution steps taken outside our system. This field is read-only and cannot be modified via the API.""" + + category: str + r"""The notification's category.""" + + actionable: bool + r"""Indicates whether a notification requires action or not. If false, the notification provides critical information only.""" + + can_block_payroll: bool + r"""Indicates whether a notification may block ability to run payroll. If true, we suggest that these notifications are prioritized to your end users.""" + + published_at: str + r"""Timestamp of when the notification was published.""" + + due_at: Nullable[str] + r"""Timestamp of when the notification is due. If the notification has no due date, this field will be null.""" + + resources: List[Resources] + r"""An array of entities relevant to the notification""" + + template_variables: Optional[Dict[str, str]] = None + r"""An object containing template variables used to render the notification. The structure of this object depends on the notification category. Each category defines a fixed set of variable names (keys), which are always present. The values of these variables can vary depending on the specific notification instance.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["template_variables"] + nullable_fields = ["due_at"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_app_int/src/gusto_app_integration/models/paid_time_off.py b/gusto_app_int/src/gusto_app_integration/models/paid_time_off.py index 40c11860..49dcd7df 100644 --- a/gusto_app_int/src/gusto_app_integration/models/paid_time_off.py +++ b/gusto_app_int/src/gusto_app_integration/models/paid_time_off.py @@ -25,21 +25,21 @@ class Name(str, Enum): class PaidTimeOffTypedDict(TypedDict): r"""The representation of paid time off in Gusto.""" - name: NotRequired[Name] + name: NotRequired[Nullable[Name]] r"""The name of the paid time off type.""" - policy_name: NotRequired[str] + policy_name: NotRequired[Nullable[str]] r"""The name of the time off policy.""" - policy_uuid: NotRequired[str] + policy_uuid: NotRequired[Nullable[str]] r"""The UUID of the time off policy.""" - accrual_unit: NotRequired[str] + accrual_unit: NotRequired[Nullable[str]] r"""The unit the PTO type is accrued in.""" - accrual_rate: NotRequired[str] + accrual_rate: NotRequired[Nullable[str]] r"""The number of accrual units accrued per accrual period.""" - accrual_method: NotRequired[str] + accrual_method: NotRequired[Nullable[str]] r"""The accrual method of the time off policy""" - accrual_period: NotRequired[str] + accrual_period: NotRequired[Nullable[str]] r"""The frequency at which the PTO type is accrued.""" - accrual_balance: NotRequired[str] + accrual_balance: NotRequired[Nullable[str]] r"""The number of accrual units accrued.""" maximum_accrual_balance: NotRequired[Nullable[str]] r"""The maximum number of accrual units allowed. A null value signifies no maximum.""" @@ -50,28 +50,28 @@ class PaidTimeOffTypedDict(TypedDict): class PaidTimeOff(BaseModel): r"""The representation of paid time off in Gusto.""" - name: Optional[Name] = None + name: OptionalNullable[Name] = UNSET r"""The name of the paid time off type.""" - policy_name: Optional[str] = None + policy_name: OptionalNullable[str] = UNSET r"""The name of the time off policy.""" - policy_uuid: Optional[str] = None + policy_uuid: OptionalNullable[str] = UNSET r"""The UUID of the time off policy.""" - accrual_unit: Optional[str] = None + accrual_unit: OptionalNullable[str] = UNSET r"""The unit the PTO type is accrued in.""" - accrual_rate: Optional[str] = None + accrual_rate: OptionalNullable[str] = UNSET r"""The number of accrual units accrued per accrual period.""" - accrual_method: Optional[str] = None + accrual_method: OptionalNullable[str] = UNSET r"""The accrual method of the time off policy""" - accrual_period: Optional[str] = None + accrual_period: OptionalNullable[str] = UNSET r"""The frequency at which the PTO type is accrued.""" - accrual_balance: Optional[str] = None + accrual_balance: OptionalNullable[str] = UNSET r"""The number of accrual units accrued.""" maximum_accrual_balance: OptionalNullable[str] = UNSET @@ -94,7 +94,17 @@ def serialize_model(self, handler): "maximum_accrual_balance", "paid_at_termination", ] - nullable_fields = ["maximum_accrual_balance"] + nullable_fields = [ + "name", + "policy_name", + "policy_uuid", + "accrual_unit", + "accrual_rate", + "accrual_method", + "accrual_period", + "accrual_balance", + "maximum_accrual_balance", + ] null_default_fields = [] serialized = handler(self) diff --git a/gusto_app_int/src/gusto_app_integration/models/pay_schedule_assignment_employee.py b/gusto_app_int/src/gusto_app_integration/models/pay_schedule_assignment_employee.py index d7e80e62..91dc64ab 100644 --- a/gusto_app_int/src/gusto_app_integration/models/pay_schedule_assignment_employee.py +++ b/gusto_app_int/src/gusto_app_integration/models/pay_schedule_assignment_employee.py @@ -1,7 +1,14 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from gusto_app_integration.types import BaseModel +from gusto_app_integration.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -9,7 +16,7 @@ class PayScheduleAssignmentEmployeeTypedDict(TypedDict): employee_uuid: NotRequired[str] r"""The UUID of the employee.""" - pay_schedule_uuid: NotRequired[str] + pay_schedule_uuid: NotRequired[Nullable[str]] r"""The employee's pay schedule UUID.""" @@ -17,5 +24,35 @@ class PayScheduleAssignmentEmployee(BaseModel): employee_uuid: Optional[str] = None r"""The UUID of the employee.""" - pay_schedule_uuid: Optional[str] = None + pay_schedule_uuid: OptionalNullable[str] = UNSET r"""The employee's pay schedule UUID.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["employee_uuid", "pay_schedule_uuid"] + nullable_fields = ["pay_schedule_uuid"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_app_int/src/gusto_app_integration/models/payroll.py b/gusto_app_int/src/gusto_app_integration/models/payroll.py index 4d7c6bc8..43f98f26 100644 --- a/gusto_app_int/src/gusto_app_integration/models/payroll.py +++ b/gusto_app_int/src/gusto_app_integration/models/payroll.py @@ -10,10 +10,6 @@ PayrollCreditBlockersType, PayrollCreditBlockersTypeTypedDict, ) -from .payroll_employee_compensations_type import ( - PayrollEmployeeCompensationsType, - PayrollEmployeeCompensationsTypeTypedDict, -) from .payroll_pay_period_type import PayrollPayPeriodType, PayrollPayPeriodTypeTypedDict from .payroll_payment_speed_changed_type import ( PayrollPaymentSpeedChangedType, @@ -31,6 +27,7 @@ PayrollSubmissionBlockersType, PayrollSubmissionBlockersTypeTypedDict, ) +from .payroll_taxes_type import PayrollTaxesType, PayrollTaxesTypeTypedDict from .payroll_totals_type import PayrollTotalsType, PayrollTotalsTypeTypedDict from .payroll_withholding_pay_period_type import PayrollWithholdingPayPeriodType from datetime import datetime @@ -47,17 +44,15 @@ class PayrollTypedDict(TypedDict): - r"""Example response""" - payroll_deadline: NotRequired[datetime] r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" check_date: NotRequired[str] r"""The date on which employees will be paid for the payroll.""" processed: NotRequired[bool] r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - processed_date: NotRequired[str] + processed_date: NotRequired[Nullable[str]] r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - calculated_at: NotRequired[str] + calculated_at: NotRequired[Nullable[datetime]] r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" uuid: NotRequired[str] r"""The UUID of the payroll.""" @@ -86,9 +81,10 @@ class PayrollTypedDict(TypedDict): r"""Information about the payroll's status and expected dates""" totals: NotRequired[PayrollTotalsTypeTypedDict] r"""The subtotals for the payroll.""" - employee_compensations: NotRequired[List[PayrollEmployeeCompensationsTypeTypedDict]] company_taxes: NotRequired[List[PayrollCompanyTaxesTypeTypedDict]] r"""An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + payroll_taxes: NotRequired[List[PayrollTaxesTypeTypedDict]] + r"""An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter.""" payment_speed_changed: NotRequired[PayrollPaymentSpeedChangedTypeTypedDict] r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" created_at: NotRequired[datetime] @@ -98,11 +94,11 @@ class PayrollTypedDict(TypedDict): credit_blockers: NotRequired[List[PayrollCreditBlockersTypeTypedDict]] r"""Only included for processed payrolls""" processing_request: NotRequired[Nullable[PayrollProcessingRequestTypedDict]] + partner_owned_disbursement: NotRequired[Nullable[bool]] + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" class Payroll(BaseModel): - r"""Example response""" - payroll_deadline: Optional[datetime] = None r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" @@ -112,10 +108,10 @@ class Payroll(BaseModel): processed: Optional[bool] = None r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - processed_date: Optional[str] = None + processed_date: OptionalNullable[str] = UNSET r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - calculated_at: Optional[str] = None + calculated_at: OptionalNullable[datetime] = UNSET r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" uuid: Optional[str] = None @@ -159,11 +155,12 @@ class Payroll(BaseModel): totals: Optional[PayrollTotalsType] = None r"""The subtotals for the payroll.""" - employee_compensations: Optional[List[PayrollEmployeeCompensationsType]] = None - company_taxes: Optional[List[PayrollCompanyTaxesType]] = None r"""An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + payroll_taxes: Optional[List[PayrollTaxesType]] = None + r"""An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter.""" + payment_speed_changed: Optional[PayrollPaymentSpeedChangedType] = None r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" @@ -178,6 +175,9 @@ class Payroll(BaseModel): processing_request: OptionalNullable[PayrollProcessingRequest] = UNSET + partner_owned_disbursement: OptionalNullable[bool] = UNSET + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -200,15 +200,22 @@ def serialize_model(self, handler): "pay_period", "payroll_status_meta", "totals", - "employee_compensations", "company_taxes", + "payroll_taxes", "payment_speed_changed", "created_at", "submission_blockers", "credit_blockers", "processing_request", + "partner_owned_disbursement", + ] + nullable_fields = [ + "processed_date", + "calculated_at", + "off_cycle_reason", + "processing_request", + "partner_owned_disbursement", ] - nullable_fields = ["off_cycle_reason", "processing_request"] null_default_fields = [] serialized = handler(self) diff --git a/gusto_app_int/src/gusto_app_integration/models/payroll_employee_compensations_type.py b/gusto_app_int/src/gusto_app_integration/models/payroll_employee_compensations_type.py index 2d21904e..132c7347 100644 --- a/gusto_app_int/src/gusto_app_integration/models/payroll_employee_compensations_type.py +++ b/gusto_app_int/src/gusto_app_integration/models/payroll_employee_compensations_type.py @@ -15,10 +15,11 @@ class PayrollEmployeeCompensationsTypePaymentMethod(str, Enum): - r"""The employee's compensation payment method.""" + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" - CHECK = "Check" DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + HISTORICAL = "Historical" class FixedCompensationsTypedDict(TypedDict): @@ -96,46 +97,95 @@ class PayrollEmployeeCompensationsTypePaidTimeOff(BaseModel): r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" -class BenefitsTypedDict(TypedDict): - name: NotRequired[str] - employee_deduction: NotRequired[float] - company_contribution: NotRequired[float] - imputed: NotRequired[bool] - - -class Benefits(BaseModel): - name: Optional[str] = None - - employee_deduction: Optional[float] = None - - company_contribution: Optional[float] = None +class AmountType(str, Enum): + r"""The amount type of the deduction for the pay period.""" - imputed: Optional[bool] = None + FIXED = "fixed" + PERCENT = "percent" class DeductionsTypedDict(TypedDict): + r"""An array of deductions for the employee.""" + name: NotRequired[str] + r"""The name of the deduction.""" amount: NotRequired[float] + r"""The amount of the deduction for the pay period.""" + amount_type: NotRequired[AmountType] + r"""The amount type of the deduction for the pay period.""" + uuid: NotRequired[str] + r"""The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction.""" class Deductions(BaseModel): + r"""An array of deductions for the employee.""" + name: Optional[str] = None + r"""The name of the deduction.""" amount: Optional[float] = None + r"""The amount of the deduction for the pay period.""" + + amount_type: Optional[AmountType] = None + r"""The amount type of the deduction for the pay period.""" + + uuid: Optional[str] = None + r"""The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction.""" -class TaxesTypedDict(TypedDict): - name: str - employer: bool - amount: float +class ReimbursementsTypedDict(TypedDict): + amount: str + r"""The dollar amount of the reimbursement for the pay period.""" + description: Nullable[str] + r"""The description of the reimbursement. Null for unnamed reimbursements.""" + uuid: NotRequired[Nullable[str]] + r"""The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls.""" + recurring: NotRequired[bool] + r"""Whether the reimbursement is recurring. This field is only available for unprocessed payrolls.""" -class Taxes(BaseModel): - name: str +class Reimbursements(BaseModel): + amount: str + r"""The dollar amount of the reimbursement for the pay period.""" - employer: bool + description: Nullable[str] + r"""The description of the reimbursement. Null for unnamed reimbursements.""" - amount: float + uuid: OptionalNullable[str] = UNSET + r"""The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls.""" + + recurring: Optional[bool] = None + r"""Whether the reimbursement is recurring. This field is only available for unprocessed payrolls.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["uuid", "recurring"] + nullable_fields = ["description", "uuid"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m class PayrollEmployeeCompensationsTypeTypedDict(TypedDict): @@ -145,6 +195,12 @@ class PayrollEmployeeCompensationsTypeTypedDict(TypedDict): r"""This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false.""" version: NotRequired[str] r"""The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + first_name: NotRequired[Nullable[str]] + r"""The first name of the employee. Requires `employees:read` scope.""" + preferred_first_name: NotRequired[Nullable[str]] + r"""The preferred first name of the employee. Requires `employees:read` scope.""" + last_name: NotRequired[Nullable[str]] + r"""The last name of the employee. Requires `employees:read` scope.""" gross_pay: NotRequired[Nullable[float]] r"""The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls.""" net_pay: NotRequired[Nullable[float]] @@ -152,7 +208,7 @@ class PayrollEmployeeCompensationsTypeTypedDict(TypedDict): check_amount: NotRequired[Nullable[float]] r"""The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls.""" payment_method: NotRequired[Nullable[PayrollEmployeeCompensationsTypePaymentMethod]] - r"""The employee's compensation payment method.""" + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" memo: NotRequired[Nullable[str]] r"""Custom text that will be printed as a personal note to the employee on a paystub.""" fixed_compensations: NotRequired[List[FixedCompensationsTypedDict]] @@ -163,12 +219,9 @@ class PayrollEmployeeCompensationsTypeTypedDict(TypedDict): List[PayrollEmployeeCompensationsTypePaidTimeOffTypedDict] ] r"""An array of all paid time off the employee is eligible for this pay period.""" - benefits: NotRequired[List[BenefitsTypedDict]] - r"""An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present.""" deductions: NotRequired[List[DeductionsTypedDict]] - r"""An array of employee deductions for the pay period. Deductions are only included for processed payroll when the include parameter is present.""" - taxes: NotRequired[List[TaxesTypedDict]] - r"""An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + reimbursements: NotRequired[List[ReimbursementsTypedDict]] + r"""An array of reimbursements for the employee.""" class PayrollEmployeeCompensationsType(BaseModel): @@ -181,6 +234,15 @@ class PayrollEmployeeCompensationsType(BaseModel): version: Optional[str] = None r"""The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + first_name: OptionalNullable[str] = UNSET + r"""The first name of the employee. Requires `employees:read` scope.""" + + preferred_first_name: OptionalNullable[str] = UNSET + r"""The preferred first name of the employee. Requires `employees:read` scope.""" + + last_name: OptionalNullable[str] = UNSET + r"""The last name of the employee. Requires `employees:read` scope.""" + gross_pay: OptionalNullable[float] = UNSET r"""The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls.""" @@ -193,7 +255,7 @@ class PayrollEmployeeCompensationsType(BaseModel): payment_method: OptionalNullable[PayrollEmployeeCompensationsTypePaymentMethod] = ( UNSET ) - r"""The employee's compensation payment method.""" + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" memo: OptionalNullable[str] = UNSET r"""Custom text that will be printed as a personal note to the employee on a paystub.""" @@ -207,14 +269,10 @@ class PayrollEmployeeCompensationsType(BaseModel): paid_time_off: Optional[List[PayrollEmployeeCompensationsTypePaidTimeOff]] = None r"""An array of all paid time off the employee is eligible for this pay period.""" - benefits: Optional[List[Benefits]] = None - r"""An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present.""" - deductions: Optional[List[Deductions]] = None - r"""An array of employee deductions for the pay period. Deductions are only included for processed payroll when the include parameter is present.""" - taxes: Optional[List[Taxes]] = None - r"""An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + reimbursements: Optional[List[Reimbursements]] = None + r"""An array of reimbursements for the employee.""" @model_serializer(mode="wrap") def serialize_model(self, handler): @@ -222,6 +280,9 @@ def serialize_model(self, handler): "employee_uuid", "excluded", "version", + "first_name", + "preferred_first_name", + "last_name", "gross_pay", "net_pay", "check_amount", @@ -230,11 +291,13 @@ def serialize_model(self, handler): "fixed_compensations", "hourly_compensations", "paid_time_off", - "benefits", "deductions", - "taxes", + "reimbursements", ] nullable_fields = [ + "first_name", + "preferred_first_name", + "last_name", "gross_pay", "net_pay", "check_amount", diff --git a/gusto_app_int/src/gusto_app_integration/models/payroll_minimal.py b/gusto_app_int/src/gusto_app_integration/models/payroll_minimal.py deleted file mode 100644 index ac99c3ff..00000000 --- a/gusto_app_int/src/gusto_app_integration/models/payroll_minimal.py +++ /dev/null @@ -1,212 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .off_cycle_reason_type import OffCycleReasonType -from .payroll_credit_blockers_type import ( - PayrollCreditBlockersType, - PayrollCreditBlockersTypeTypedDict, -) -from .payroll_pay_period_type import PayrollPayPeriodType, PayrollPayPeriodTypeTypedDict -from .payroll_payment_speed_changed_type import ( - PayrollPaymentSpeedChangedType, - PayrollPaymentSpeedChangedTypeTypedDict, -) -from .payroll_payroll_status_meta_type import ( - PayrollPayrollStatusMetaType, - PayrollPayrollStatusMetaTypeTypedDict, -) -from .payroll_submission_blockers_type import ( - PayrollSubmissionBlockersType, - PayrollSubmissionBlockersTypeTypedDict, -) -from .payroll_totals_type import PayrollTotalsType, PayrollTotalsTypeTypedDict -from .payroll_withholding_pay_period_type import PayrollWithholdingPayPeriodType -from datetime import datetime -from gusto_app_integration.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import List, Optional -from typing_extensions import NotRequired, TypedDict - - -class PayrollMinimalTypedDict(TypedDict): - r"""Example response""" - - processed: bool - r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - uuid: str - r"""The UUID of the payroll.""" - payroll_uuid: str - r"""The UUID of the payroll.""" - company_uuid: str - r"""The UUID of the company for the payroll.""" - payroll_deadline: NotRequired[datetime] - r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" - check_date: NotRequired[str] - r"""The date on which employees will be paid for the payroll.""" - processed_date: NotRequired[str] - r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - calculated_at: NotRequired[str] - r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" - off_cycle: NotRequired[bool] - r"""Indicates whether the payroll is an off-cycle payroll""" - off_cycle_reason: NotRequired[Nullable[OffCycleReasonType]] - r"""The off-cycle reason. Only included for off-cycle payrolls.""" - auto_pilot: NotRequired[bool] - r"""Indicates whether the payroll is an auto pilot payroll""" - external: NotRequired[bool] - r"""Indicates whether the payroll is an external payroll""" - final_termination_payroll: NotRequired[bool] - r"""Indicates whether the payroll is the final payroll for a terminated employee. Only included for off-cycle payrolls.""" - withholding_pay_period: NotRequired[PayrollWithholdingPayPeriodType] - r"""The payment schedule tax rate the payroll is based on. Only included for off-cycle payrolls.""" - skip_regular_deductions: NotRequired[bool] - r"""Block regular deductions and contributions for this payroll. Only included for off-cycle payrolls.""" - fixed_withholding_rate: NotRequired[bool] - r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only included for off-cycle payrolls.""" - pay_period: NotRequired[PayrollPayPeriodTypeTypedDict] - payroll_status_meta: NotRequired[PayrollPayrollStatusMetaTypeTypedDict] - r"""Information about the payroll's status and expected dates""" - totals: NotRequired[PayrollTotalsTypeTypedDict] - r"""The subtotals for the payroll.""" - payment_speed_changed: NotRequired[PayrollPaymentSpeedChangedTypeTypedDict] - r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" - created_at: NotRequired[datetime] - r"""Datetime for when the resource was created.""" - submission_blockers: NotRequired[List[PayrollSubmissionBlockersTypeTypedDict]] - r"""Only included for processed or calculated payrolls""" - credit_blockers: NotRequired[List[PayrollCreditBlockersTypeTypedDict]] - r"""Only included for processed payrolls""" - reversal_payroll_uuids: NotRequired[List[str]] - r"""Array of reversal payroll UUIDs, if applicable.""" - - -class PayrollMinimal(BaseModel): - r"""Example response""" - - processed: bool - r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - - uuid: str - r"""The UUID of the payroll.""" - - payroll_uuid: str - r"""The UUID of the payroll.""" - - company_uuid: str - r"""The UUID of the company for the payroll.""" - - payroll_deadline: Optional[datetime] = None - r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" - - check_date: Optional[str] = None - r"""The date on which employees will be paid for the payroll.""" - - processed_date: Optional[str] = None - r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - - calculated_at: Optional[str] = None - r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" - - off_cycle: Optional[bool] = None - r"""Indicates whether the payroll is an off-cycle payroll""" - - off_cycle_reason: OptionalNullable[OffCycleReasonType] = UNSET - r"""The off-cycle reason. Only included for off-cycle payrolls.""" - - auto_pilot: Optional[bool] = None - r"""Indicates whether the payroll is an auto pilot payroll""" - - external: Optional[bool] = None - r"""Indicates whether the payroll is an external payroll""" - - final_termination_payroll: Optional[bool] = None - r"""Indicates whether the payroll is the final payroll for a terminated employee. Only included for off-cycle payrolls.""" - - withholding_pay_period: Optional[PayrollWithholdingPayPeriodType] = None - r"""The payment schedule tax rate the payroll is based on. Only included for off-cycle payrolls.""" - - skip_regular_deductions: Optional[bool] = None - r"""Block regular deductions and contributions for this payroll. Only included for off-cycle payrolls.""" - - fixed_withholding_rate: Optional[bool] = None - r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only included for off-cycle payrolls.""" - - pay_period: Optional[PayrollPayPeriodType] = None - - payroll_status_meta: Optional[PayrollPayrollStatusMetaType] = None - r"""Information about the payroll's status and expected dates""" - - totals: Optional[PayrollTotalsType] = None - r"""The subtotals for the payroll.""" - - payment_speed_changed: Optional[PayrollPaymentSpeedChangedType] = None - r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" - - created_at: Optional[datetime] = None - r"""Datetime for when the resource was created.""" - - submission_blockers: Optional[List[PayrollSubmissionBlockersType]] = None - r"""Only included for processed or calculated payrolls""" - - credit_blockers: Optional[List[PayrollCreditBlockersType]] = None - r"""Only included for processed payrolls""" - - reversal_payroll_uuids: Optional[List[str]] = None - r"""Array of reversal payroll UUIDs, if applicable.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "payroll_deadline", - "check_date", - "processed_date", - "calculated_at", - "off_cycle", - "off_cycle_reason", - "auto_pilot", - "external", - "final_termination_payroll", - "withholding_pay_period", - "skip_regular_deductions", - "fixed_withholding_rate", - "pay_period", - "payroll_status_meta", - "totals", - "payment_speed_changed", - "created_at", - "submission_blockers", - "credit_blockers", - "reversal_payroll_uuids", - ] - nullable_fields = ["off_cycle_reason"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/gusto_app_int/src/gusto_app_integration/models/payroll_prepare_sort_by.py b/gusto_app_int/src/gusto_app_integration/models/payroll_prepare_sort_by.py new file mode 100644 index 00000000..70e57762 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/payroll_prepare_sort_by.py @@ -0,0 +1,9 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class PayrollPrepareSortBy(str, Enum): + FIRST_NAME = "first_name" + LAST_NAME = "last_name" diff --git a/gusto_app_int/src/gusto_app_integration/models/payroll_prepared.py b/gusto_app_int/src/gusto_app_integration/models/payroll_prepared.py index 8f0174a2..59a4f542 100644 --- a/gusto_app_int/src/gusto_app_integration/models/payroll_prepared.py +++ b/gusto_app_int/src/gusto_app_integration/models/payroll_prepared.py @@ -38,17 +38,15 @@ class PayrollPreparedTypedDict(TypedDict): - r"""A prepared payroll""" - payroll_deadline: NotRequired[datetime] r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" check_date: NotRequired[str] r"""The date on which employees will be paid for the payroll.""" processed: NotRequired[bool] r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - processed_date: NotRequired[str] + processed_date: NotRequired[Nullable[str]] r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - calculated_at: NotRequired[str] + calculated_at: NotRequired[Nullable[datetime]] r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" uuid: NotRequired[str] r"""The UUID of the payroll.""" @@ -84,11 +82,11 @@ class PayrollPreparedTypedDict(TypedDict): List[PayrollFixedCompensationTypesTypeTypedDict] ] processing_request: NotRequired[Nullable[PayrollProcessingRequestTypedDict]] + partner_owned_disbursement: NotRequired[Nullable[bool]] + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" class PayrollPrepared(BaseModel): - r"""A prepared payroll""" - payroll_deadline: Optional[datetime] = None r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" @@ -98,10 +96,10 @@ class PayrollPrepared(BaseModel): processed: Optional[bool] = None r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - processed_date: Optional[str] = None + processed_date: OptionalNullable[str] = UNSET r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - calculated_at: Optional[str] = None + calculated_at: OptionalNullable[datetime] = UNSET r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" uuid: Optional[str] = None @@ -154,6 +152,9 @@ class PayrollPrepared(BaseModel): processing_request: OptionalNullable[PayrollProcessingRequest] = UNSET + partner_owned_disbursement: OptionalNullable[bool] = UNSET + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -180,8 +181,15 @@ def serialize_model(self, handler): "created_at", "fixed_compensation_types", "processing_request", + "partner_owned_disbursement", + ] + nullable_fields = [ + "processed_date", + "calculated_at", + "off_cycle_reason", + "processing_request", + "partner_owned_disbursement", ] - nullable_fields = ["off_cycle_reason", "processing_request"] null_default_fields = [] serialized = handler(self) diff --git a/gusto_app_int/src/gusto_app_integration/models/payroll_show.py b/gusto_app_int/src/gusto_app_integration/models/payroll_show.py new file mode 100644 index 00000000..b44edf32 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/payroll_show.py @@ -0,0 +1,592 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .off_cycle_reason_type import OffCycleReasonType +from .payroll_company_taxes_type import ( + PayrollCompanyTaxesType, + PayrollCompanyTaxesTypeTypedDict, +) +from .payroll_credit_blockers_type import ( + PayrollCreditBlockersType, + PayrollCreditBlockersTypeTypedDict, +) +from .payroll_pay_period_type import PayrollPayPeriodType, PayrollPayPeriodTypeTypedDict +from .payroll_payment_speed_changed_type import ( + PayrollPaymentSpeedChangedType, + PayrollPaymentSpeedChangedTypeTypedDict, +) +from .payroll_payroll_status_meta_type import ( + PayrollPayrollStatusMetaType, + PayrollPayrollStatusMetaTypeTypedDict, +) +from .payroll_processing_request import ( + PayrollProcessingRequest, + PayrollProcessingRequestTypedDict, +) +from .payroll_submission_blockers_type import ( + PayrollSubmissionBlockersType, + PayrollSubmissionBlockersTypeTypedDict, +) +from .payroll_taxes_type import PayrollTaxesType, PayrollTaxesTypeTypedDict +from .payroll_totals_type import PayrollTotalsType, PayrollTotalsTypeTypedDict +from .payroll_withholding_pay_period_type import PayrollWithholdingPayPeriodType +from datetime import datetime +from enum import Enum +from gusto_app_integration.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PayrollShowPaymentMethod(str, Enum): + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + HISTORICAL = "Historical" + + +class PayrollShowFixedCompensationsTypedDict(TypedDict): + name: NotRequired[str] + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + amount: NotRequired[str] + r"""The amount of the compensation for the pay period.""" + job_uuid: NotRequired[str] + r"""The UUID of the job for the compensation.""" + + +class PayrollShowFixedCompensations(BaseModel): + name: Optional[str] = None + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + + amount: Optional[str] = None + r"""The amount of the compensation for the pay period.""" + + job_uuid: Optional[str] = None + r"""The UUID of the job for the compensation.""" + + +class PayrollShowHourlyCompensationsTypedDict(TypedDict): + name: NotRequired[str] + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + hours: NotRequired[str] + r"""The number of hours to be compensated for this pay period.""" + amount: NotRequired[str] + r"""The amount of the compensation. This field is only available after the payroll is calculated and cannot be used for updating hourly compensations.""" + job_uuid: NotRequired[str] + r"""The UUID of the job for the compensation.""" + compensation_multiplier: NotRequired[float] + r"""The amount multiplied by the base rate to calculate total compensation per hour worked.""" + flsa_status: NotRequired[str] + r"""The FLSA Status of the employee's primary job compensation""" + + +class PayrollShowHourlyCompensations(BaseModel): + name: Optional[str] = None + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + + hours: Optional[str] = None + r"""The number of hours to be compensated for this pay period.""" + + amount: Optional[str] = None + r"""The amount of the compensation. This field is only available after the payroll is calculated and cannot be used for updating hourly compensations.""" + + job_uuid: Optional[str] = None + r"""The UUID of the job for the compensation.""" + + compensation_multiplier: Optional[float] = None + r"""The amount multiplied by the base rate to calculate total compensation per hour worked.""" + + flsa_status: Optional[str] = None + r"""The FLSA Status of the employee's primary job compensation""" + + +class PayrollShowPaidTimeOffTypedDict(TypedDict): + name: NotRequired[str] + r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO.""" + hours: NotRequired[str] + r"""The hours of this PTO taken during the pay period.""" + final_payout_unused_hours_input: NotRequired[str] + r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" + + +class PayrollShowPaidTimeOff(BaseModel): + name: Optional[str] = None + r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO.""" + + hours: Optional[str] = None + r"""The hours of this PTO taken during the pay period.""" + + final_payout_unused_hours_input: Optional[str] = None + r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" + + +class PayrollShowAmountType(str, Enum): + FIXED = "fixed" + PERCENT = "percent" + + +class PayrollShowDeductionsTypedDict(TypedDict): + name: NotRequired[str] + amount: NotRequired[float] + amount_type: NotRequired[PayrollShowAmountType] + uuid: NotRequired[str] + + +class PayrollShowDeductions(BaseModel): + name: Optional[str] = None + + amount: Optional[float] = None + + amount_type: Optional[PayrollShowAmountType] = None + + uuid: Optional[str] = None + + +class PayrollShowReimbursementsTypedDict(TypedDict): + amount: str + r"""The dollar amount of the reimbursement for the pay period.""" + description: Nullable[str] + r"""The description of the reimbursement. Null for unnamed reimbursements.""" + uuid: NotRequired[Nullable[str]] + r"""The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls.""" + recurring: NotRequired[bool] + r"""Whether the reimbursement is recurring. This field is only available for unprocessed payrolls.""" + + +class PayrollShowReimbursements(BaseModel): + amount: str + r"""The dollar amount of the reimbursement for the pay period.""" + + description: Nullable[str] + r"""The description of the reimbursement. Null for unnamed reimbursements.""" + + uuid: OptionalNullable[str] = UNSET + r"""The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls.""" + + recurring: Optional[bool] = None + r"""Whether the reimbursement is recurring. This field is only available for unprocessed payrolls.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["uuid", "recurring"] + nullable_fields = ["description", "uuid"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class TaxesTypedDict(TypedDict): + name: str + employer: bool + amount: float + + +class Taxes(BaseModel): + name: str + + employer: bool + + amount: float + + +class BenefitsTypedDict(TypedDict): + name: NotRequired[str] + employee_deduction: NotRequired[float] + company_contribution: NotRequired[float] + imputed: NotRequired[bool] + + +class Benefits(BaseModel): + name: Optional[str] = None + + employee_deduction: Optional[float] = None + + company_contribution: Optional[float] = None + + imputed: Optional[bool] = None + + +class EmployeeCompensationsTypedDict(TypedDict): + employee_uuid: NotRequired[str] + r"""The UUID of the employee.""" + excluded: NotRequired[bool] + r"""This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false.""" + version: NotRequired[str] + r"""The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + first_name: NotRequired[Nullable[str]] + r"""The first name of the employee. Requires `employees:read` scope.""" + preferred_first_name: NotRequired[Nullable[str]] + r"""The preferred first name of the employee. Requires `employees:read` scope.""" + last_name: NotRequired[Nullable[str]] + r"""The last name of the employee. Requires `employees:read` scope.""" + gross_pay: NotRequired[Nullable[float]] + r"""The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls.""" + net_pay: NotRequired[Nullable[float]] + r"""The employee's net pay, equal to gross_pay - employee taxes - employee deductions or garnishments - cash tips. This value is only available for processed payrolls.""" + check_amount: NotRequired[Nullable[float]] + r"""The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls.""" + payment_method: NotRequired[Nullable[PayrollShowPaymentMethod]] + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" + memo: NotRequired[Nullable[str]] + r"""Custom text that will be printed as a personal note to the employee on a paystub.""" + fixed_compensations: NotRequired[List[PayrollShowFixedCompensationsTypedDict]] + r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned.""" + hourly_compensations: NotRequired[List[PayrollShowHourlyCompensationsTypedDict]] + r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned.""" + paid_time_off: NotRequired[List[PayrollShowPaidTimeOffTypedDict]] + r"""An array of all paid time off the employee is eligible for this pay period.""" + deductions: NotRequired[List[PayrollShowDeductionsTypedDict]] + r"""An array of employee deductions for the pay period.""" + reimbursements: NotRequired[List[PayrollShowReimbursementsTypedDict]] + r"""An array of reimbursements for the employee.""" + taxes: NotRequired[List[TaxesTypedDict]] + r"""An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + benefits: NotRequired[List[BenefitsTypedDict]] + r"""An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present.""" + + +class EmployeeCompensations(BaseModel): + employee_uuid: Optional[str] = None + r"""The UUID of the employee.""" + + excluded: Optional[bool] = None + r"""This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false.""" + + version: Optional[str] = None + r"""The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + + first_name: OptionalNullable[str] = UNSET + r"""The first name of the employee. Requires `employees:read` scope.""" + + preferred_first_name: OptionalNullable[str] = UNSET + r"""The preferred first name of the employee. Requires `employees:read` scope.""" + + last_name: OptionalNullable[str] = UNSET + r"""The last name of the employee. Requires `employees:read` scope.""" + + gross_pay: OptionalNullable[float] = UNSET + r"""The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls.""" + + net_pay: OptionalNullable[float] = UNSET + r"""The employee's net pay, equal to gross_pay - employee taxes - employee deductions or garnishments - cash tips. This value is only available for processed payrolls.""" + + check_amount: OptionalNullable[float] = UNSET + r"""The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls.""" + + payment_method: OptionalNullable[PayrollShowPaymentMethod] = UNSET + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" + + memo: OptionalNullable[str] = UNSET + r"""Custom text that will be printed as a personal note to the employee on a paystub.""" + + fixed_compensations: Optional[List[PayrollShowFixedCompensations]] = None + r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned.""" + + hourly_compensations: Optional[List[PayrollShowHourlyCompensations]] = None + r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned.""" + + paid_time_off: Optional[List[PayrollShowPaidTimeOff]] = None + r"""An array of all paid time off the employee is eligible for this pay period.""" + + deductions: Optional[List[PayrollShowDeductions]] = None + r"""An array of employee deductions for the pay period.""" + + reimbursements: Optional[List[PayrollShowReimbursements]] = None + r"""An array of reimbursements for the employee.""" + + taxes: Optional[List[Taxes]] = None + r"""An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + + benefits: Optional[List[Benefits]] = None + r"""An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "employee_uuid", + "excluded", + "version", + "first_name", + "preferred_first_name", + "last_name", + "gross_pay", + "net_pay", + "check_amount", + "payment_method", + "memo", + "fixed_compensations", + "hourly_compensations", + "paid_time_off", + "deductions", + "reimbursements", + "taxes", + "benefits", + ] + nullable_fields = [ + "first_name", + "preferred_first_name", + "last_name", + "gross_pay", + "net_pay", + "check_amount", + "payment_method", + "memo", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PayrollShowTypedDict(TypedDict): + payroll_deadline: NotRequired[datetime] + r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" + check_date: NotRequired[str] + r"""The date on which employees will be paid for the payroll.""" + processed: NotRequired[bool] + r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" + processed_date: NotRequired[Nullable[str]] + r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" + calculated_at: NotRequired[Nullable[datetime]] + r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" + uuid: NotRequired[str] + r"""The UUID of the payroll.""" + payroll_uuid: NotRequired[str] + r"""The UUID of the payroll.""" + company_uuid: NotRequired[str] + r"""The UUID of the company for the payroll.""" + off_cycle: NotRequired[bool] + r"""Indicates whether the payroll is an off-cycle payroll""" + off_cycle_reason: NotRequired[Nullable[OffCycleReasonType]] + r"""The off-cycle reason. Only included for off-cycle payrolls.""" + auto_pilot: NotRequired[bool] + r"""Indicates whether the payroll is an auto pilot payroll""" + external: NotRequired[bool] + r"""Indicates whether the payroll is an external payroll""" + final_termination_payroll: NotRequired[bool] + r"""Indicates whether the payroll is the final payroll for a terminated employee. Only included for off-cycle payrolls.""" + withholding_pay_period: NotRequired[PayrollWithholdingPayPeriodType] + r"""The payment schedule tax rate the payroll is based on. Only included for off-cycle payrolls.""" + skip_regular_deductions: NotRequired[bool] + r"""Block regular deductions and contributions for this payroll. Only included for off-cycle payrolls.""" + fixed_withholding_rate: NotRequired[bool] + r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only included for off-cycle payrolls.""" + pay_period: NotRequired[PayrollPayPeriodTypeTypedDict] + payroll_status_meta: NotRequired[PayrollPayrollStatusMetaTypeTypedDict] + r"""Information about the payroll's status and expected dates""" + totals: NotRequired[PayrollTotalsTypeTypedDict] + r"""The subtotals for the payroll.""" + company_taxes: NotRequired[List[PayrollCompanyTaxesTypeTypedDict]] + r"""An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + payroll_taxes: NotRequired[List[PayrollTaxesTypeTypedDict]] + r"""An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter.""" + payment_speed_changed: NotRequired[PayrollPaymentSpeedChangedTypeTypedDict] + r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" + created_at: NotRequired[datetime] + r"""Datetime for when the resource was created.""" + submission_blockers: NotRequired[List[PayrollSubmissionBlockersTypeTypedDict]] + r"""Only included for processed or calculated payrolls""" + credit_blockers: NotRequired[List[PayrollCreditBlockersTypeTypedDict]] + r"""Only included for processed payrolls""" + processing_request: NotRequired[Nullable[PayrollProcessingRequestTypedDict]] + partner_owned_disbursement: NotRequired[Nullable[bool]] + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" + employee_compensations: NotRequired[List[EmployeeCompensationsTypedDict]] + + +class PayrollShow(BaseModel): + payroll_deadline: Optional[datetime] = None + r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" + + check_date: Optional[str] = None + r"""The date on which employees will be paid for the payroll.""" + + processed: Optional[bool] = None + r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" + + processed_date: OptionalNullable[str] = UNSET + r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" + + calculated_at: OptionalNullable[datetime] = UNSET + r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" + + uuid: Optional[str] = None + r"""The UUID of the payroll.""" + + payroll_uuid: Optional[str] = None + r"""The UUID of the payroll.""" + + company_uuid: Optional[str] = None + r"""The UUID of the company for the payroll.""" + + off_cycle: Optional[bool] = None + r"""Indicates whether the payroll is an off-cycle payroll""" + + off_cycle_reason: OptionalNullable[OffCycleReasonType] = UNSET + r"""The off-cycle reason. Only included for off-cycle payrolls.""" + + auto_pilot: Optional[bool] = None + r"""Indicates whether the payroll is an auto pilot payroll""" + + external: Optional[bool] = None + r"""Indicates whether the payroll is an external payroll""" + + final_termination_payroll: Optional[bool] = None + r"""Indicates whether the payroll is the final payroll for a terminated employee. Only included for off-cycle payrolls.""" + + withholding_pay_period: Optional[PayrollWithholdingPayPeriodType] = None + r"""The payment schedule tax rate the payroll is based on. Only included for off-cycle payrolls.""" + + skip_regular_deductions: Optional[bool] = None + r"""Block regular deductions and contributions for this payroll. Only included for off-cycle payrolls.""" + + fixed_withholding_rate: Optional[bool] = None + r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only included for off-cycle payrolls.""" + + pay_period: Optional[PayrollPayPeriodType] = None + + payroll_status_meta: Optional[PayrollPayrollStatusMetaType] = None + r"""Information about the payroll's status and expected dates""" + + totals: Optional[PayrollTotalsType] = None + r"""The subtotals for the payroll.""" + + company_taxes: Optional[List[PayrollCompanyTaxesType]] = None + r"""An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + + payroll_taxes: Optional[List[PayrollTaxesType]] = None + r"""An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter.""" + + payment_speed_changed: Optional[PayrollPaymentSpeedChangedType] = None + r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" + + created_at: Optional[datetime] = None + r"""Datetime for when the resource was created.""" + + submission_blockers: Optional[List[PayrollSubmissionBlockersType]] = None + r"""Only included for processed or calculated payrolls""" + + credit_blockers: Optional[List[PayrollCreditBlockersType]] = None + r"""Only included for processed payrolls""" + + processing_request: OptionalNullable[PayrollProcessingRequest] = UNSET + + partner_owned_disbursement: OptionalNullable[bool] = UNSET + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" + + employee_compensations: Optional[List[EmployeeCompensations]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "payroll_deadline", + "check_date", + "processed", + "processed_date", + "calculated_at", + "uuid", + "payroll_uuid", + "company_uuid", + "off_cycle", + "off_cycle_reason", + "auto_pilot", + "external", + "final_termination_payroll", + "withholding_pay_period", + "skip_regular_deductions", + "fixed_withholding_rate", + "pay_period", + "payroll_status_meta", + "totals", + "company_taxes", + "payroll_taxes", + "payment_speed_changed", + "created_at", + "submission_blockers", + "credit_blockers", + "processing_request", + "partner_owned_disbursement", + "employee_compensations", + ] + nullable_fields = [ + "processed_date", + "calculated_at", + "off_cycle_reason", + "processing_request", + "partner_owned_disbursement", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_app_int/src/gusto_app_integration/models/payroll_taxes_type.py b/gusto_app_int/src/gusto_app_integration/models/payroll_taxes_type.py new file mode 100644 index 00000000..791fa3e2 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/payroll_taxes_type.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gusto_app_integration.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class PayrollTaxesTypeTypedDict(TypedDict): + name: NotRequired[str] + r"""The tax name""" + employer: NotRequired[bool] + r"""Whether this tax is an employer or employee tax""" + amount: NotRequired[float] + r"""The total tax for the payroll""" + + +class PayrollTaxesType(BaseModel): + name: Optional[str] = None + r"""The tax name""" + + employer: Optional[bool] = None + r"""Whether this tax is an employer or employee tax""" + + amount: Optional[float] = None + r"""The total tax for the payroll""" diff --git a/gusto_app_int/src/gusto_app_integration/models/payroll_update.py b/gusto_app_int/src/gusto_app_integration/models/payroll_update.py new file mode 100644 index 00000000..366de25c --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/payroll_update.py @@ -0,0 +1,202 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_app_integration.types import BaseModel +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PayrollUpdatePaymentMethod(str, Enum): + r"""The employee's compensation payment method. Invalid values will be ignored.""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class PayrollUpdateFixedCompensationsTypedDict(TypedDict): + r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.""" + + name: NotRequired[str] + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + amount: NotRequired[str] + r"""The amount of the compensation for the pay period.""" + job_uuid: NotRequired[str] + r"""The UUID of the job for the compensation.""" + + +class PayrollUpdateFixedCompensations(BaseModel): + r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.""" + + name: Optional[str] = None + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + + amount: Optional[str] = None + r"""The amount of the compensation for the pay period.""" + + job_uuid: Optional[str] = None + r"""The UUID of the job for the compensation.""" + + +class PayrollUpdateHourlyCompensationsTypedDict(TypedDict): + r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.""" + + name: NotRequired[str] + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + hours: NotRequired[str] + r"""The number of hours to be compensated for this pay period.""" + job_uuid: NotRequired[str] + r"""The UUIDs of the job for the compensation.""" + + +class PayrollUpdateHourlyCompensations(BaseModel): + r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.""" + + name: Optional[str] = None + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + + hours: Optional[str] = None + r"""The number of hours to be compensated for this pay period.""" + + job_uuid: Optional[str] = None + r"""The UUIDs of the job for the compensation.""" + + +class PayrollUpdateAmountType(str, Enum): + r"""The amount type of the deduction for the pay period.""" + + FIXED = "fixed" + PERCENT = "percent" + + +class PayrollUpdateDeductionsTypedDict(TypedDict): + r"""An array of deductions for the employee.""" + + name: NotRequired[str] + r"""The name of the deduction.""" + amount: NotRequired[float] + r"""The amount of the deduction for the pay period.""" + amount_type: NotRequired[PayrollUpdateAmountType] + r"""The amount type of the deduction for the pay period.""" + uuid: NotRequired[str] + r"""The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction.""" + + +class PayrollUpdateDeductions(BaseModel): + r"""An array of deductions for the employee.""" + + name: Optional[str] = None + r"""The name of the deduction.""" + + amount: Optional[float] = None + r"""The amount of the deduction for the pay period.""" + + amount_type: Optional[PayrollUpdateAmountType] = None + r"""The amount type of the deduction for the pay period.""" + + uuid: Optional[str] = None + r"""The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction.""" + + +class PayrollUpdatePaidTimeOffTypedDict(TypedDict): + name: NotRequired[str] + r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO. Must pass in name or policy_uuid but not both.""" + hours: NotRequired[str] + r"""The hours of this PTO taken during the pay period.""" + policy_uuid: NotRequired[str] + r"""The uuid of the PTO policy. Must pass in name or policy_uuid but not both.""" + final_payout_unused_hours_input: NotRequired[str] + r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" + + +class PayrollUpdatePaidTimeOff(BaseModel): + name: Optional[str] = None + r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO. Must pass in name or policy_uuid but not both.""" + + hours: Optional[str] = None + r"""The hours of this PTO taken during the pay period.""" + + policy_uuid: Optional[str] = None + r"""The uuid of the PTO policy. Must pass in name or policy_uuid but not both.""" + + final_payout_unused_hours_input: Optional[str] = None + r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" + + +class PayrollUpdateEmployeeCompensationsTypedDict(TypedDict): + employee_uuid: NotRequired[str] + r"""The UUID of the employee.""" + version: NotRequired[str] + r"""The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + excluded: NotRequired[bool] + r"""This employee will be excluded from payroll calculation and will not be paid for the payroll.""" + payment_method: NotRequired[PayrollUpdatePaymentMethod] + r"""The employee's compensation payment method. Invalid values will be ignored.""" + memo: NotRequired[str] + r"""Custom text that will be printed as a personal note to the employee on a paystub.""" + fixed_compensations: NotRequired[List[PayrollUpdateFixedCompensationsTypedDict]] + hourly_compensations: NotRequired[List[PayrollUpdateHourlyCompensationsTypedDict]] + deductions: NotRequired[List[PayrollUpdateDeductionsTypedDict]] + paid_time_off: NotRequired[List[PayrollUpdatePaidTimeOffTypedDict]] + r"""An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid.""" + + +class PayrollUpdateEmployeeCompensations(BaseModel): + employee_uuid: Optional[str] = None + r"""The UUID of the employee.""" + + version: Optional[str] = None + r"""The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + + excluded: Optional[bool] = None + r"""This employee will be excluded from payroll calculation and will not be paid for the payroll.""" + + payment_method: Optional[PayrollUpdatePaymentMethod] = None + r"""The employee's compensation payment method. Invalid values will be ignored.""" + + memo: Optional[str] = None + r"""Custom text that will be printed as a personal note to the employee on a paystub.""" + + fixed_compensations: Optional[List[PayrollUpdateFixedCompensations]] = None + + hourly_compensations: Optional[List[PayrollUpdateHourlyCompensations]] = None + + deductions: Optional[List[PayrollUpdateDeductions]] = None + + paid_time_off: Optional[List[PayrollUpdatePaidTimeOff]] = None + r"""An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid.""" + + +class WithholdingPayPeriod(str, Enum): + r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" + + EVERY_WEEK = "Every week" + EVERY_OTHER_WEEK = "Every other week" + TWICE_PER_MONTH = "Twice per month" + MONTHLY = "Monthly" + QUARTERLY = "Quarterly" + SEMIANNUALLY = "Semiannually" + ANNUALLY = "Annually" + + +class PayrollUpdateTypedDict(TypedDict): + employee_compensations: List[PayrollUpdateEmployeeCompensationsTypedDict] + withholding_pay_period: NotRequired[WithholdingPayPeriod] + r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" + skip_regular_deductions: NotRequired[bool] + r"""Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls.""" + fixed_withholding_rate: NotRequired[bool] + r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls.""" + + +class PayrollUpdate(BaseModel): + employee_compensations: List[PayrollUpdateEmployeeCompensations] + + withholding_pay_period: Optional[WithholdingPayPeriod] = None + r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" + + skip_regular_deductions: Optional[bool] = None + r"""Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls.""" + + fixed_withholding_rate: Optional[bool] = None + r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/post_payrolls_payroll_uuid_reports_general_ledgerop.py b/gusto_app_int/src/gusto_app_integration/models/post_payrolls_payroll_uuid_reports_general_ledgerop.py new file mode 100644 index 00000000..ddf9ade1 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/post_payrolls_payroll_uuid_reports_general_ledgerop.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .versionheader import VersionHeader +from enum import Enum +from gusto_app_integration.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from gusto_app_integration.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation(str, Enum): + r"""The breakdown of the report. Use 'default' for no split.""" + + DEFAULT = "default" + JOB = "job" + DEPARTMENT = "department" + INTEGRATION = "integration" + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType(str, Enum): + r"""The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'.""" + + XERO = "xero" + QBO = "qbo" + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBodyTypedDict(TypedDict): + aggregation: PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation + r"""The breakdown of the report. Use 'default' for no split.""" + integration_type: NotRequired[ + Nullable[PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType] + ] + r"""The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'.""" + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody(BaseModel): + aggregation: PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation + r"""The breakdown of the report. Use 'default' for no split.""" + + integration_type: OptionalNullable[ + PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType + ] = UNSET + r"""The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["integration_type"] + nullable_fields = ["integration_type"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerRequestTypedDict(TypedDict): + payroll_uuid: str + r"""The UUID of the payroll""" + request_body: PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBodyTypedDict + x_gusto_api_version: NotRequired[VersionHeader] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerRequest(BaseModel): + payroll_uuid: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the payroll""" + + request_body: Annotated[ + PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + x_gusto_api_version: Annotated[ + Optional[VersionHeader], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/post_v1_companies_company_id_contractor_payment_groups_previewop.py b/gusto_app_int/src/gusto_app_integration/models/post_v1_companies_company_id_contractor_payment_groups_previewop.py deleted file mode 100644 index 9a9a881a..00000000 --- a/gusto_app_int/src/gusto_app_integration/models/post_v1_companies_company_id_contractor_payment_groups_previewop.py +++ /dev/null @@ -1,116 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .versionheader import VersionHeader -from datetime import date -from enum import Enum -from gusto_app_integration.types import BaseModel -from gusto_app_integration.utils import ( - FieldMetadata, - HeaderMetadata, - PathParamMetadata, - RequestMetadata, -) -import pydantic -from typing import List, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod(str, Enum): - DIRECT_DEPOSIT = "Direct Deposit" - CHECK = "Check" - HISTORICAL_PAYMENT = "Historical Payment" - - -class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict( - TypedDict -): - contractor_uuid: NotRequired[str] - r"""The contractor receiving the payment""" - payment_method: NotRequired[ - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod - ] - wage: NotRequired[float] - r"""If the contractor is on a fixed wage, this is the fixed wage payment for the contractor, regardless of hours worked""" - hours: NotRequired[float] - r"""If the contractor is on an hourly wage, this is the number of hours that the contractor worked for the payment""" - bonus: NotRequired[float] - r"""If the contractor is on an hourly wage, this is the bonus the contractor earned""" - reimbursement: NotRequired[float] - r"""Reimbursed wages for the contractor""" - - -class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments( - BaseModel -): - contractor_uuid: Optional[str] = None - r"""The contractor receiving the payment""" - - payment_method: Optional[ - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod - ] = PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod.DIRECT_DEPOSIT - - wage: Optional[float] = None - r"""If the contractor is on a fixed wage, this is the fixed wage payment for the contractor, regardless of hours worked""" - - hours: Optional[float] = None - r"""If the contractor is on an hourly wage, this is the number of hours that the contractor worked for the payment""" - - bonus: Optional[float] = None - r"""If the contractor is on an hourly wage, this is the bonus the contractor earned""" - - reimbursement: Optional[float] = None - r"""Reimbursed wages for the contractor""" - - -class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBodyTypedDict( - TypedDict -): - check_date: date - r"""The payment check date""" - contractor_payments: List[ - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict - ] - creation_token: NotRequired[str] - r"""Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create.""" - - -class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody(BaseModel): - check_date: date - r"""The payment check date""" - - contractor_payments: List[ - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments - ] - - creation_token: Optional[str] = None - r"""Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create.""" - - -class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestTypedDict(TypedDict): - company_id: str - r"""The UUID of the company""" - request_body: ( - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBodyTypedDict - ) - x_gusto_api_version: NotRequired[VersionHeader] - r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" - - -class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest(BaseModel): - company_id: Annotated[ - str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) - ] - r"""The UUID of the company""" - - request_body: Annotated[ - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody, - FieldMetadata(request=RequestMetadata(media_type="application/json")), - ] - - x_gusto_api_version: Annotated[ - Optional[VersionHeader], - pydantic.Field(alias="X-Gusto-API-Version"), - FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 - r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_employee_benefitsop.py b/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_employee_benefitsop.py index 0f6e37f8..34a11139 100644 --- a/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_employee_benefitsop.py +++ b/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_employee_benefitsop.py @@ -43,11 +43,15 @@ class PostV1EmployeesEmployeeIDEmployeeBenefitsValue2TypedDict(TypedDict): rate: NotRequired[str] r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: NotRequired[str] - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + For example: + + If the first tier has a threshold of \"3\", and rate of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ @@ -58,11 +62,15 @@ class PostV1EmployeesEmployeeIDEmployeeBenefitsValue2(BaseModel): r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: Optional[str] = None - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. + + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. + + For example: - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + If the first tier has a threshold of \"3\", and rate of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ diff --git a/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_home_addressesop.py b/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_home_addressesop.py index 0c798b16..3bdb35b5 100644 --- a/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_home_addressesop.py +++ b/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_home_addressesop.py @@ -1,8 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from datetime import date +from enum import Enum from gusto_app_integration.types import ( BaseModel, Nullable, @@ -22,13 +22,19 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict(TypedDict): street_1: NotRequired[str] street_2: NotRequired[Nullable[str]] city: NotRequired[str] state: NotRequired[str] zip_code: NotRequired[str] - effective_date: NotRequired[date] + effective_date: NotRequired[Nullable[date]] courtesy_withholding: NotRequired[bool] @@ -43,7 +49,7 @@ class PostV1EmployeesEmployeeIDHomeAddressesRequestBody(BaseModel): zip_code: Annotated[Optional[str], pydantic.Field(alias="zip")] = None - effective_date: Optional[date] = None + effective_date: OptionalNullable[date] = UNSET courtesy_withholding: Optional[bool] = None @@ -58,7 +64,7 @@ def serialize_model(self, handler): "effective_date", "courtesy_withholding", ] - nullable_fields = ["street_2"] + nullable_fields = ["street_2", "effective_date"] null_default_fields = [] serialized = handler(self) @@ -90,7 +96,9 @@ class PostV1EmployeesEmployeeIDHomeAddressesRequestTypedDict(TypedDict): employee_id: str r"""The UUID of the employee""" request_body: PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -106,8 +114,8 @@ class PostV1EmployeesEmployeeIDHomeAddressesRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_work_addressesop.py b/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_work_addressesop.py index 24892a8a..60688bd8 100644 --- a/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_work_addressesop.py +++ b/gusto_app_int/src/gusto_app_integration/models/post_v1_employees_employee_id_work_addressesop.py @@ -1,8 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from datetime import date +from enum import Enum from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import ( FieldMetadata, @@ -15,6 +15,12 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict(TypedDict): location_uuid: NotRequired[str] r"""Reference to a company location""" @@ -34,7 +40,9 @@ class PostV1EmployeesEmployeeIDWorkAddressesRequestTypedDict(TypedDict): employee_id: str r"""The UUID of the employee""" request_body: PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -50,8 +58,8 @@ class PostV1EmployeesEmployeeIDWorkAddressesRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/post_v1_employeesop.py b/gusto_app_int/src/gusto_app_integration/models/post_v1_employeesop.py index e3d7060f..30838b05 100644 --- a/gusto_app_int/src/gusto_app_integration/models/post_v1_employeesop.py +++ b/gusto_app_int/src/gusto_app_integration/models/post_v1_employeesop.py @@ -27,6 +27,8 @@ class PostV1EmployeesRequestBodyTypedDict(TypedDict): middle_initial: NotRequired[str] email: NotRequired[str] r"""The employee's personal email address.""" + work_email: NotRequired[str] + r"""The employee's work email address.""" date_of_birth: NotRequired[date] ssn: NotRequired[str] preferred_first_name: NotRequired[str] @@ -44,6 +46,9 @@ class PostV1EmployeesRequestBody(BaseModel): email: Optional[str] = None r"""The employee's personal email address.""" + work_email: Optional[str] = None + r"""The employee's work email address.""" + date_of_birth: Optional[date] = None ssn: Optional[str] = None diff --git a/gusto_app_int/src/gusto_app_integration/models/put_v1_companies_company_id_payrolls_payroll_id_prepareop.py b/gusto_app_int/src/gusto_app_integration/models/put_v1_companies_company_id_payrolls_payroll_id_prepareop.py index fa90e505..c33a7db0 100644 --- a/gusto_app_int/src/gusto_app_integration/models/put_v1_companies_company_id_payrolls_payroll_id_prepareop.py +++ b/gusto_app_int/src/gusto_app_integration/models/put_v1_companies_company_id_payrolls_payroll_id_prepareop.py @@ -1,21 +1,47 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .payroll_prepare_sort_by import PayrollPrepareSortBy from .versionheader import VersionHeader from gusto_app_integration.types import BaseModel -from gusto_app_integration.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +from gusto_app_integration.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, +) import pydantic -from typing import Optional +from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict +class PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBodyTypedDict(TypedDict): + employee_uuids: NotRequired[List[str]] + r"""An array of employee UUIDs. If passed, only those employees payroll items will be prepared.""" + + +class PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody(BaseModel): + employee_uuids: Optional[List[str]] = None + r"""An array of employee UUIDs. If passed, only those employees payroll items will be prepared.""" + + class PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" payroll_id: str r"""The UUID of the payroll""" + page: NotRequired[int] + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + per: NotRequired[int] + r"""Number of objects per page. For majority of endpoints will default to 25""" + sort_by: NotRequired[PayrollPrepareSortBy] + r"""Sort employee compenstations by name. Options: first_name, last_name""" x_gusto_api_version: NotRequired[VersionHeader] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + request_body: NotRequired[ + PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBodyTypedDict + ] class PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest(BaseModel): @@ -29,9 +55,32 @@ class PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest(BaseModel): ] r"""The UUID of the payroll""" + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + + per: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Number of objects per page. For majority of endpoints will default to 25""" + + sort_by: Annotated[ + Optional[PayrollPrepareSortBy], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Sort employee compenstations by name. Options: first_name, last_name""" + x_gusto_api_version: Annotated[ Optional[VersionHeader], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + request_body: Annotated[ + Optional[PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = None diff --git a/gusto_app_int/src/gusto_app_integration/models/put_v1_companies_company_id_payrollsop.py b/gusto_app_int/src/gusto_app_integration/models/put_v1_companies_company_id_payrollsop.py index 473e8bf6..91b3815e 100644 --- a/gusto_app_int/src/gusto_app_integration/models/put_v1_companies_company_id_payrollsop.py +++ b/gusto_app_int/src/gusto_app_integration/models/put_v1_companies_company_id_payrollsop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from .payroll_update import PayrollUpdate, PayrollUpdateTypedDict from enum import Enum from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import ( @@ -11,174 +11,14 @@ RequestMetadata, ) import pydantic -from typing import List, Optional +from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class PutV1CompaniesCompanyIDPayrollsPaymentMethod(str, Enum): - r"""The employee's compensation payment method. Invalid values will be ignored.""" - - DIRECT_DEPOSIT = "Direct Deposit" - CHECK = "Check" - - -class PutV1CompaniesCompanyIDPayrollsFixedCompensationsTypedDict(TypedDict): - r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.""" - - name: NotRequired[str] - r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" - amount: NotRequired[str] - r"""The amount of the compensation for the pay period.""" - job_uuid: NotRequired[str] - r"""The UUID of the job for the compensation.""" - - -class PutV1CompaniesCompanyIDPayrollsFixedCompensations(BaseModel): - r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.""" - - name: Optional[str] = None - r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" - - amount: Optional[str] = None - r"""The amount of the compensation for the pay period.""" - - job_uuid: Optional[str] = None - r"""The UUID of the job for the compensation.""" - - -class PutV1CompaniesCompanyIDPayrollsHourlyCompensationsTypedDict(TypedDict): - r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.""" - - name: NotRequired[str] - r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" - hours: NotRequired[str] - r"""The number of hours to be compensated for this pay period.""" - job_uuid: NotRequired[str] - r"""The UUIDs of the job for the compensation.""" - - -class PutV1CompaniesCompanyIDPayrollsHourlyCompensations(BaseModel): - r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.""" - - name: Optional[str] = None - r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" - - hours: Optional[str] = None - r"""The number of hours to be compensated for this pay period.""" - - job_uuid: Optional[str] = None - r"""The UUIDs of the job for the compensation.""" - - -class PutV1CompaniesCompanyIDPayrollsPaidTimeOffTypedDict(TypedDict): - name: NotRequired[str] - r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO. Must pass in name or policy_uuid but not both.""" - hours: NotRequired[str] - r"""The hours of this PTO taken during the pay period.""" - policy_uuid: NotRequired[str] - r"""The uuid of the PTO policy. Must pass in name or policy_uuid but not both.""" - final_payout_unused_hours_input: NotRequired[str] - r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" - - -class PutV1CompaniesCompanyIDPayrollsPaidTimeOff(BaseModel): - name: Optional[str] = None - r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO. Must pass in name or policy_uuid but not both.""" - - hours: Optional[str] = None - r"""The hours of this PTO taken during the pay period.""" - - policy_uuid: Optional[str] = None - r"""The uuid of the PTO policy. Must pass in name or policy_uuid but not both.""" - - final_payout_unused_hours_input: Optional[str] = None - r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" - - -class EmployeeCompensationsTypedDict(TypedDict): - employee_uuid: NotRequired[str] - r"""The UUID of the employee.""" - version: NotRequired[str] - r"""The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" - excluded: NotRequired[bool] - r"""This employee will be excluded from payroll calculation and will not be paid for the payroll.""" - payment_method: NotRequired[PutV1CompaniesCompanyIDPayrollsPaymentMethod] - r"""The employee's compensation payment method. Invalid values will be ignored.""" - memo: NotRequired[str] - r"""Custom text that will be printed as a personal note to the employee on a paystub.""" - fixed_compensations: NotRequired[ - List[PutV1CompaniesCompanyIDPayrollsFixedCompensationsTypedDict] - ] - hourly_compensations: NotRequired[ - List[PutV1CompaniesCompanyIDPayrollsHourlyCompensationsTypedDict] - ] - paid_time_off: NotRequired[ - List[PutV1CompaniesCompanyIDPayrollsPaidTimeOffTypedDict] - ] - r"""An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid.""" - - -class EmployeeCompensations(BaseModel): - employee_uuid: Optional[str] = None - r"""The UUID of the employee.""" - - version: Optional[str] = None - r"""The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" - - excluded: Optional[bool] = None - r"""This employee will be excluded from payroll calculation and will not be paid for the payroll.""" - - payment_method: Optional[PutV1CompaniesCompanyIDPayrollsPaymentMethod] = None - r"""The employee's compensation payment method. Invalid values will be ignored.""" - - memo: Optional[str] = None - r"""Custom text that will be printed as a personal note to the employee on a paystub.""" - - fixed_compensations: Optional[ - List[PutV1CompaniesCompanyIDPayrollsFixedCompensations] - ] = None - - hourly_compensations: Optional[ - List[PutV1CompaniesCompanyIDPayrollsHourlyCompensations] - ] = None - - paid_time_off: Optional[List[PutV1CompaniesCompanyIDPayrollsPaidTimeOff]] = None - r"""An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid.""" - - -class WithholdingPayPeriod(str, Enum): - r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" - - EVERY_WEEK = "Every week" - EVERY_OTHER_WEEK = "Every other week" - TWICE_PER_MONTH = "Twice per month" - MONTHLY = "Monthly" - QUARTERLY = "Quarterly" - SEMIANNUALLY = "Semiannually" - ANNUALLY = "Annually" - - -class PutV1CompaniesCompanyIDPayrollsRequestBodyTypedDict(TypedDict): - employee_compensations: List[EmployeeCompensationsTypedDict] - withholding_pay_period: NotRequired[WithholdingPayPeriod] - r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" - skip_regular_deductions: NotRequired[bool] - r"""Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls.""" - fixed_withholding_rate: NotRequired[bool] - r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls.""" - - -class PutV1CompaniesCompanyIDPayrollsRequestBody(BaseModel): - employee_compensations: List[EmployeeCompensations] - - withholding_pay_period: Optional[WithholdingPayPeriod] = None - r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" - - skip_regular_deductions: Optional[bool] = None - r"""Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls.""" +class PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" - fixed_withholding_rate: Optional[bool] = None - r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls.""" + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" class PutV1CompaniesCompanyIDPayrollsRequestTypedDict(TypedDict): @@ -186,8 +26,10 @@ class PutV1CompaniesCompanyIDPayrollsRequestTypedDict(TypedDict): r"""The UUID of the company""" payroll_id: str r"""The UUID of the payroll""" - request_body: PutV1CompaniesCompanyIDPayrollsRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + payroll_update: PayrollUpdateTypedDict + x_gusto_api_version: NotRequired[ + PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -202,14 +44,14 @@ class PutV1CompaniesCompanyIDPayrollsRequest(BaseModel): ] r"""The UUID of the payroll""" - request_body: Annotated[ - PutV1CompaniesCompanyIDPayrollsRequestBody, + payroll_update: Annotated[ + PayrollUpdate, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/put_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py b/gusto_app_int/src/gusto_app_integration/models/put_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py new file mode 100644 index 00000000..d43d526a --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/put_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .contribution_exclusion import ( + ContributionExclusion, + ContributionExclusionTypedDict, +) +from .versionheader import VersionHeader +from gusto_app_integration.types import BaseModel +from gusto_app_integration.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBodyTypedDict( + TypedDict +): + contribution_exclusions: List[ContributionExclusionTypedDict] + r"""The list of contribution exclusions to update""" + + +class PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody(BaseModel): + contribution_exclusions: List[ContributionExclusion] + r"""The list of contribution exclusions to update""" + + +class PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict( + TypedDict +): + company_benefit_id: str + r"""The UUID of the company benefit""" + request_body: ( + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBodyTypedDict + ) + x_gusto_api_version: NotRequired[VersionHeader] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest(BaseModel): + company_benefit_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the company benefit""" + + request_body: Annotated[ + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + x_gusto_api_version: Annotated[ + Optional[VersionHeader], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/put_v1_employee_benefits_employee_benefit_idop.py b/gusto_app_int/src/gusto_app_integration/models/put_v1_employee_benefits_employee_benefit_idop.py index f96c9dfe..64ad997e 100644 --- a/gusto_app_int/src/gusto_app_integration/models/put_v1_employee_benefits_employee_benefit_idop.py +++ b/gusto_app_int/src/gusto_app_integration/models/put_v1_employee_benefits_employee_benefit_idop.py @@ -43,11 +43,15 @@ class PutV1EmployeeBenefitsEmployeeBenefitIDValue2TypedDict(TypedDict): rate: NotRequired[str] r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: NotRequired[str] - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + For example: + + If the first tier has a threshold of \"3\", and rate of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ @@ -58,11 +62,15 @@ class PutV1EmployeeBenefitsEmployeeBenefitIDValue2(BaseModel): r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: Optional[str] = None - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. + + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. + + For example: - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + If the first tier has a threshold of \"3\", and rate of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ diff --git a/gusto_app_int/src/gusto_app_integration/models/put_v1_employeesop.py b/gusto_app_int/src/gusto_app_integration/models/put_v1_employeesop.py index e3621526..842d5092 100644 --- a/gusto_app_int/src/gusto_app_integration/models/put_v1_employeesop.py +++ b/gusto_app_int/src/gusto_app_integration/models/put_v1_employeesop.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from enum import Enum from gusto_app_integration.types import ( BaseModel, Nullable, @@ -20,6 +21,12 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PutV1EmployeesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PutV1EmployeesRequestBodyTypedDict(TypedDict): version: str r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" @@ -27,6 +34,7 @@ class PutV1EmployeesRequestBodyTypedDict(TypedDict): middle_initial: NotRequired[Nullable[str]] last_name: NotRequired[str] email: NotRequired[str] + work_email: NotRequired[str] date_of_birth: NotRequired[str] ssn: NotRequired[str] preferred_first_name: NotRequired[Nullable[str]] @@ -46,6 +54,8 @@ class PutV1EmployeesRequestBody(BaseModel): email: Optional[str] = None + work_email: Optional[str] = None + date_of_birth: Optional[str] = None ssn: Optional[str] = None @@ -62,6 +72,7 @@ def serialize_model(self, handler): "middle_initial", "last_name", "email", + "work_email", "date_of_birth", "ssn", "preferred_first_name", @@ -99,7 +110,8 @@ class PutV1EmployeesRequestTypedDict(TypedDict): employee_id: str r"""The UUID of the employee""" request_body: PutV1EmployeesRequestBodyTypedDict - x_gusto_api_version: NotRequired[str] + x_gusto_api_version: NotRequired[PutV1EmployeesHeaderXGustoAPIVersion] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" class PutV1EmployeesRequest(BaseModel): @@ -114,7 +126,8 @@ class PutV1EmployeesRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[str], + Optional[PutV1EmployeesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = None + ] = PutV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/put_v1_home_addresses_home_address_uuidop.py b/gusto_app_int/src/gusto_app_integration/models/put_v1_home_addresses_home_address_uuidop.py index fc1312d0..579e19fe 100644 --- a/gusto_app_int/src/gusto_app_integration/models/put_v1_home_addresses_home_address_uuidop.py +++ b/gusto_app_int/src/gusto_app_integration/models/put_v1_home_addresses_home_address_uuidop.py @@ -1,8 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from datetime import date +from enum import Enum from gusto_app_integration.types import ( BaseModel, Nullable, @@ -22,21 +22,27 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict(TypedDict): version: str - r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field.""" + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" street_1: NotRequired[str] street_2: NotRequired[Nullable[str]] city: NotRequired[str] state: NotRequired[str] zip_code: NotRequired[str] - effective_date: NotRequired[date] + effective_date: NotRequired[Nullable[date]] courtesy_withholding: NotRequired[bool] class PutV1HomeAddressesHomeAddressUUIDRequestBody(BaseModel): version: str - r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field.""" + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" street_1: Optional[str] = None @@ -48,7 +54,7 @@ class PutV1HomeAddressesHomeAddressUUIDRequestBody(BaseModel): zip_code: Annotated[Optional[str], pydantic.Field(alias="zip")] = None - effective_date: Optional[date] = None + effective_date: OptionalNullable[date] = UNSET courtesy_withholding: Optional[bool] = None @@ -63,7 +69,7 @@ def serialize_model(self, handler): "effective_date", "courtesy_withholding", ] - nullable_fields = ["street_2"] + nullable_fields = ["street_2", "effective_date"] null_default_fields = [] serialized = handler(self) @@ -95,7 +101,9 @@ class PutV1HomeAddressesHomeAddressUUIDRequestTypedDict(TypedDict): home_address_uuid: str r"""The UUID of the home address""" request_body: PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -111,8 +119,8 @@ class PutV1HomeAddressesHomeAddressUUIDRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/put_v1_work_addresses_work_address_uuidop.py b/gusto_app_int/src/gusto_app_integration/models/put_v1_work_addresses_work_address_uuidop.py index 6440a803..e72e641a 100644 --- a/gusto_app_int/src/gusto_app_integration/models/put_v1_work_addresses_work_address_uuidop.py +++ b/gusto_app_int/src/gusto_app_integration/models/put_v1_work_addresses_work_address_uuidop.py @@ -1,8 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from datetime import date +from enum import Enum from gusto_app_integration.types import BaseModel from gusto_app_integration.utils import ( FieldMetadata, @@ -15,9 +15,15 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict(TypedDict): version: str - r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field.""" + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" location_uuid: NotRequired[str] r"""Reference to a company location""" effective_date: NotRequired[date] @@ -25,7 +31,7 @@ class PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict(TypedDict): class PutV1WorkAddressesWorkAddressUUIDRequestBody(BaseModel): version: str - r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field.""" + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" location_uuid: Optional[str] = None r"""Reference to a company location""" @@ -37,7 +43,9 @@ class PutV1WorkAddressesWorkAddressUUIDRequestTypedDict(TypedDict): work_address_uuid: str r"""The UUID of the work address""" request_body: PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -53,8 +61,8 @@ class PutV1WorkAddressesWorkAddressUUIDRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/report.py b/gusto_app_int/src/gusto_app_integration/models/report.py new file mode 100644 index 00000000..27cf096f --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/report.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gusto_app_integration.types import BaseModel +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class ReportTypedDict(TypedDict): + r"""Example response""" + + request_uuid: NotRequired[str] + r"""A unique identifier of the report request""" + status: NotRequired[str] + r"""Current status of the report, possible values are 'succeeded', 'pending', or 'failed'""" + report_urls: NotRequired[List[str]] + r"""The array of urls to access the report""" + + +class Report(BaseModel): + r"""Example response""" + + request_uuid: Optional[str] = None + r"""A unique identifier of the report request""" + + status: Optional[str] = None + r"""Current status of the report, possible values are 'succeeded', 'pending', or 'failed'""" + + report_urls: Optional[List[str]] = None + r"""The array of urls to access the report""" diff --git a/gusto_app_int/src/gusto_app_integration/models/responsevalidationerror.py b/gusto_app_int/src/gusto_app_integration/models/responsevalidationerror.py new file mode 100644 index 00000000..6a6b2012 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/responsevalidationerror.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import httpx +from typing import Optional +from dataclasses import dataclass + +from gusto_app_integration.models import GustoAppIntegrationError + + +@dataclass(unsafe_hash=True) +class ResponseValidationError(GustoAppIntegrationError): + """Error raised when there is a type mismatch between the response data and the expected Pydantic model.""" + + def __init__( + self, + message: str, + raw_response: httpx.Response, + cause: Exception, + body: Optional[str] = None, + ): + message = f"{message}: {cause}" + super().__init__(message, raw_response, body) + + @property + def cause(self): + """Normally the Pydantic ValidationError""" + return self.__cause__ diff --git a/gusto_app_int/src/gusto_app_integration/models/show_employees.py b/gusto_app_int/src/gusto_app_integration/models/show_employees.py new file mode 100644 index 00000000..c7d7e4c7 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/show_employees.py @@ -0,0 +1,358 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .employee_custom_field import EmployeeCustomField, EmployeeCustomFieldTypedDict +from .employee_home_address import EmployeeHomeAddress, EmployeeHomeAddressTypedDict +from .flsa_status_type import FlsaStatusType +from .garnishment import Garnishment, GarnishmentTypedDict +from .job import Job, JobTypedDict +from .paid_time_off import PaidTimeOff, PaidTimeOffTypedDict +from .termination import Termination, TerminationTypedDict +from datetime import date +from enum import Enum +from gusto_app_integration.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, List, Optional +from typing_extensions import NotRequired, TypedDict + + +class OnboardingStatus(str, Enum): + r"""The current onboarding status of the employee""" + + ONBOARDING_COMPLETED = "onboarding_completed" + ADMIN_ONBOARDING_INCOMPLETE = "admin_onboarding_incomplete" + SELF_ONBOARDING_PENDING_INVITE = "self_onboarding_pending_invite" + SELF_ONBOARDING_INVITED = "self_onboarding_invited" + SELF_ONBOARDING_INVITED_STARTED = "self_onboarding_invited_started" + SELF_ONBOARDING_INVITED_OVERDUE = "self_onboarding_invited_overdue" + SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE = "self_onboarding_completed_by_employee" + SELF_ONBOARDING_AWAITING_ADMIN_REVIEW = "self_onboarding_awaiting_admin_review" + + +class OnboardingDocumentsConfigTypedDict(TypedDict): + r"""Configuration for an employee onboarding documents during onboarding""" + + uuid: NotRequired[Nullable[str]] + r"""The UUID of the onboarding documents config""" + i9_document: NotRequired[bool] + r"""Whether to include Form I-9 for an employee during onboarding""" + + +class OnboardingDocumentsConfig(BaseModel): + r"""Configuration for an employee onboarding documents during onboarding""" + + uuid: OptionalNullable[str] = UNSET + r"""The UUID of the onboarding documents config""" + + i9_document: Optional[bool] = None + r"""Whether to include Form I-9 for an employee during onboarding""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["uuid", "i9_document"] + nullable_fields = ["uuid"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PaymentMethod(str, Enum): + r"""The employee's payment method""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class CurrentEmploymentStatus(str, Enum): + r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" + + FULL_TIME = "full_time" + PART_TIME_UNDER_TWENTY_HOURS = "part_time_under_twenty_hours" + PART_TIME_TWENTY_PLUS_HOURS = "part_time_twenty_plus_hours" + VARIABLE = "variable" + SEASONAL = "seasonal" + + +class ShowEmployeesTypedDict(TypedDict): + r"""The representation of an employee in Gusto.""" + + uuid: str + r"""The UUID of the employee in Gusto.""" + first_name: str + last_name: str + middle_initial: NotRequired[Nullable[str]] + email: NotRequired[Nullable[str]] + r"""The personal email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" + company_uuid: NotRequired[str] + r"""The UUID of the company the employee is employed by.""" + manager_uuid: NotRequired[Nullable[str]] + r"""The UUID of the employee's manager.""" + version: NotRequired[str] + r"""The current version of the employee. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + department: NotRequired[Nullable[str]] + r"""The employee's department in the company.""" + terminated: NotRequired[bool] + r"""Whether the employee is terminated.""" + two_percent_shareholder: NotRequired[Nullable[bool]] + r"""Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type.""" + work_email: NotRequired[Nullable[str]] + r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" + onboarded: NotRequired[bool] + r"""Whether the employee has completed onboarding.""" + onboarding_status: NotRequired[Nullable[OnboardingStatus]] + r"""The current onboarding status of the employee""" + onboarding_documents_config: NotRequired[OnboardingDocumentsConfigTypedDict] + r"""Configuration for an employee onboarding documents during onboarding""" + jobs: NotRequired[List[JobTypedDict]] + eligible_paid_time_off: NotRequired[List[PaidTimeOffTypedDict]] + terminations: NotRequired[List[TerminationTypedDict]] + garnishments: NotRequired[List[GarnishmentTypedDict]] + custom_fields: NotRequired[List[EmployeeCustomFieldTypedDict]] + r"""Custom fields are only included for the employee if the include param has the custom_fields value set""" + date_of_birth: NotRequired[Nullable[str]] + has_ssn: NotRequired[bool] + r"""Indicates whether the employee has an SSN in Gusto.""" + ssn: NotRequired[str] + r"""Deprecated. This field always returns an empty string.""" + phone: NotRequired[Nullable[str]] + preferred_first_name: NotRequired[Nullable[str]] + payment_method: NotRequired[PaymentMethod] + r"""The employee's payment method""" + current_employment_status: NotRequired[Nullable[CurrentEmploymentStatus]] + r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" + historical: NotRequired[bool] + employee_code: NotRequired[str] + r"""The short format code of the employee""" + department_uuid: NotRequired[Nullable[str]] + r"""The UUID of the department the employee is under""" + title: NotRequired[str] + hired_at: NotRequired[date] + r"""The date when the employee was hired to the company""" + hidden_ssn: NotRequired[str] + flsa_status: NotRequired[FlsaStatusType] + r"""The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company.""" + applicable_tax_ids: NotRequired[List[float]] + current_home_address: NotRequired[EmployeeHomeAddressTypedDict] + all_home_addresses: NotRequired[List[EmployeeHomeAddressTypedDict]] + + +class ShowEmployees(BaseModel): + r"""The representation of an employee in Gusto.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + uuid: str + r"""The UUID of the employee in Gusto.""" + + first_name: str + + last_name: str + + middle_initial: OptionalNullable[str] = UNSET + + email: OptionalNullable[str] = UNSET + r"""The personal email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" + + company_uuid: Optional[str] = None + r"""The UUID of the company the employee is employed by.""" + + manager_uuid: OptionalNullable[str] = UNSET + r"""The UUID of the employee's manager.""" + + version: Optional[str] = None + r"""The current version of the employee. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + + department: OptionalNullable[str] = UNSET + r"""The employee's department in the company.""" + + terminated: Optional[bool] = None + r"""Whether the employee is terminated.""" + + two_percent_shareholder: OptionalNullable[bool] = UNSET + r"""Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type.""" + + work_email: OptionalNullable[str] = UNSET + r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" + + onboarded: Optional[bool] = None + r"""Whether the employee has completed onboarding.""" + + onboarding_status: OptionalNullable[OnboardingStatus] = UNSET + r"""The current onboarding status of the employee""" + + onboarding_documents_config: Optional[OnboardingDocumentsConfig] = None + r"""Configuration for an employee onboarding documents during onboarding""" + + jobs: Optional[List[Job]] = None + + eligible_paid_time_off: Optional[List[PaidTimeOff]] = None + + terminations: Optional[List[Termination]] = None + + garnishments: Optional[List[Garnishment]] = None + + custom_fields: Optional[List[EmployeeCustomField]] = None + r"""Custom fields are only included for the employee if the include param has the custom_fields value set""" + + date_of_birth: OptionalNullable[str] = UNSET + + has_ssn: Optional[bool] = None + r"""Indicates whether the employee has an SSN in Gusto.""" + + ssn: Optional[str] = None + r"""Deprecated. This field always returns an empty string.""" + + phone: OptionalNullable[str] = UNSET + + preferred_first_name: OptionalNullable[str] = UNSET + + payment_method: Optional[PaymentMethod] = PaymentMethod.CHECK + r"""The employee's payment method""" + + current_employment_status: OptionalNullable[CurrentEmploymentStatus] = UNSET + r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" + + historical: Optional[bool] = None + + employee_code: Optional[str] = None + r"""The short format code of the employee""" + + department_uuid: OptionalNullable[str] = UNSET + r"""The UUID of the department the employee is under""" + + title: Optional[str] = None + + hired_at: Optional[date] = None + r"""The date when the employee was hired to the company""" + + hidden_ssn: Optional[str] = None + + flsa_status: Optional[FlsaStatusType] = None + r"""The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company.""" + + applicable_tax_ids: Optional[List[float]] = None + + current_home_address: Optional[EmployeeHomeAddress] = None + + all_home_addresses: Optional[List[EmployeeHomeAddress]] = None + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "middle_initial", + "email", + "company_uuid", + "manager_uuid", + "version", + "department", + "terminated", + "two_percent_shareholder", + "work_email", + "onboarded", + "onboarding_status", + "onboarding_documents_config", + "jobs", + "eligible_paid_time_off", + "terminations", + "garnishments", + "custom_fields", + "date_of_birth", + "has_ssn", + "ssn", + "phone", + "preferred_first_name", + "payment_method", + "current_employment_status", + "historical", + "employee_code", + "department_uuid", + "title", + "hired_at", + "hidden_ssn", + "flsa_status", + "applicable_tax_ids", + "current_home_address", + "all_home_addresses", + ] + nullable_fields = [ + "middle_initial", + "email", + "manager_uuid", + "department", + "two_percent_shareholder", + "work_email", + "onboarding_status", + "date_of_birth", + "phone", + "preferred_first_name", + "current_employment_status", + "department_uuid", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/gusto_app_int/src/gusto_app_integration/models/supported_benefit.py b/gusto_app_int/src/gusto_app_integration/models/supported_benefit.py index 57868f64..e032e324 100644 --- a/gusto_app_int/src/gusto_app_integration/models/supported_benefit.py +++ b/gusto_app_int/src/gusto_app_integration/models/supported_benefit.py @@ -29,6 +29,8 @@ class SupportedBenefitTypedDict(TypedDict): r"""Whether the benefit has a government mandated yearly limit. If the benefit has a government mandated yearly limit, employees cannot be added to more than one benefit of this type.""" category: NotRequired[str] r"""Category where the benefit belongs to.""" + writable_by_application: NotRequired[bool] + r"""Whether this benefit can be written (created, updated, or destroyed). Returns true if the benefit type is permitted for the application, false otherwise.""" class SupportedBenefit(BaseModel): @@ -63,3 +65,6 @@ class SupportedBenefit(BaseModel): category: Optional[str] = None r"""Category where the benefit belongs to.""" + + writable_by_application: Optional[bool] = None + r"""Whether this benefit can be written (created, updated, or destroyed). Returns true if the benefit type is permitted for the application, false otherwise.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/time_off_request.py b/gusto_app_int/src/gusto_app_integration/models/time_off_request.py new file mode 100644 index 00000000..8599c4d6 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/time_off_request.py @@ -0,0 +1,176 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_app_integration.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class TimeOffRequestStatus(str, Enum): + r"""The status of the time off request.""" + + PENDING = "pending" + APPROVED = "approved" + DENIED = "denied" + + +class RequestType(str, Enum): + r"""The type of time off request.""" + + VACATION = "vacation" + SICK = "sick" + + +class DaysTypedDict(TypedDict): + r"""An object that represents the days in the time off request. The keys of the object are the dates, formatted as a YYYY-MM-DD string. The values of the object are the number of hours requested off for each day, formatted as a string representation of a numeric decimal to the thousands place.""" + + +class Days(BaseModel): + r"""An object that represents the days in the time off request. The keys of the object are the dates, formatted as a YYYY-MM-DD string. The values of the object are the number of hours requested off for each day, formatted as a string representation of a numeric decimal to the thousands place.""" + + +class TimeOffRequestEmployeeTypedDict(TypedDict): + uuid: NotRequired[str] + r"""The UUID of the employee the time off request is for.""" + full_name: NotRequired[str] + r"""The full name of the employee the time off request is for.""" + + +class TimeOffRequestEmployee(BaseModel): + uuid: Optional[str] = None + r"""The UUID of the employee the time off request is for.""" + + full_name: Optional[str] = None + r"""The full name of the employee the time off request is for.""" + + +class InitiatorTypedDict(TypedDict): + uuid: NotRequired[str] + r"""The UUID of the employee who initiated the time off request.""" + full_name: NotRequired[str] + r"""The full name of the employee who initiated the time off request.""" + + +class Initiator(BaseModel): + uuid: Optional[str] = None + r"""The UUID of the employee who initiated the time off request.""" + + full_name: Optional[str] = None + r"""The full name of the employee who initiated the time off request.""" + + +class ApproverTypedDict(TypedDict): + r"""This value will be null if the request has not been approved.""" + + uuid: NotRequired[str] + r"""The UUID of the employee who approved the time off request.""" + full_name: NotRequired[str] + r"""The full name of the employee who approved the time off request.""" + + +class Approver(BaseModel): + r"""This value will be null if the request has not been approved.""" + + uuid: Optional[str] = None + r"""The UUID of the employee who approved the time off request.""" + + full_name: Optional[str] = None + r"""The full name of the employee who approved the time off request.""" + + +class TimeOffRequestTypedDict(TypedDict): + r"""The representation of a time off request.""" + + uuid: NotRequired[str] + r"""The UUID of the time off request.""" + status: NotRequired[TimeOffRequestStatus] + r"""The status of the time off request.""" + employee_note: NotRequired[str] + r"""A note about the time off request, from the employee to the employer.""" + employer_note: NotRequired[str] + r"""A note about the time off request, from the employer to the employee.""" + request_type: NotRequired[RequestType] + r"""The type of time off request.""" + days: NotRequired[DaysTypedDict] + r"""An object that represents the days in the time off request. The keys of the object are the dates, formatted as a YYYY-MM-DD string. The values of the object are the number of hours requested off for each day, formatted as a string representation of a numeric decimal to the thousands place.""" + employee: NotRequired[TimeOffRequestEmployeeTypedDict] + initiator: NotRequired[Nullable[InitiatorTypedDict]] + approver: NotRequired[Nullable[ApproverTypedDict]] + r"""This value will be null if the request has not been approved.""" + + +class TimeOffRequest(BaseModel): + r"""The representation of a time off request.""" + + uuid: Optional[str] = None + r"""The UUID of the time off request.""" + + status: Optional[TimeOffRequestStatus] = None + r"""The status of the time off request.""" + + employee_note: Optional[str] = None + r"""A note about the time off request, from the employee to the employer.""" + + employer_note: Optional[str] = None + r"""A note about the time off request, from the employer to the employee.""" + + request_type: Optional[RequestType] = None + r"""The type of time off request.""" + + days: Optional[Days] = None + r"""An object that represents the days in the time off request. The keys of the object are the dates, formatted as a YYYY-MM-DD string. The values of the object are the number of hours requested off for each day, formatted as a string representation of a numeric decimal to the thousands place.""" + + employee: Optional[TimeOffRequestEmployee] = None + + initiator: OptionalNullable[Initiator] = UNSET + + approver: OptionalNullable[Approver] = UNSET + r"""This value will be null if the request has not been approved.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "uuid", + "status", + "employee_note", + "employer_note", + "request_type", + "days", + "employee", + "initiator", + "approver", + ] + nullable_fields = ["initiator", "approver"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_app_int/src/gusto_app_integration/models/unprocessable_entity_error_object.py b/gusto_app_int/src/gusto_app_integration/models/unprocessable_entity_error_object.py index bbd159e7..a886fca1 100644 --- a/gusto_app_int/src/gusto_app_integration/models/unprocessable_entity_error_object.py +++ b/gusto_app_int/src/gusto_app_integration/models/unprocessable_entity_error_object.py @@ -2,26 +2,33 @@ from __future__ import annotations from .entity_error_object import EntityErrorObject -from gusto_app_integration import utils +from dataclasses import dataclass, field +from gusto_app_integration.models import GustoAppIntegrationError from gusto_app_integration.types import BaseModel -from typing import List +import httpx +from typing import List, Optional class UnprocessableEntityErrorObjectData(BaseModel): errors: List[EntityErrorObject] -class UnprocessableEntityErrorObject(Exception): +@dataclass(unsafe_hash=True) +class UnprocessableEntityErrorObject(GustoAppIntegrationError): r"""Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. """ - data: UnprocessableEntityErrorObjectData - - def __init__(self, data: UnprocessableEntityErrorObjectData): - self.data = data - - def __str__(self) -> str: - return utils.marshal_json(self.data, UnprocessableEntityErrorObjectData) + data: UnprocessableEntityErrorObjectData = field(hash=False) + + def __init__( + self, + data: UnprocessableEntityErrorObjectData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/gusto_app_int/src/gusto_app_integration/models/webhooks_health_check_status.py b/gusto_app_int/src/gusto_app_integration/models/webhooks_health_check_status.py new file mode 100644 index 00000000..13126af2 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/models/webhooks_health_check_status.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +from gusto_app_integration.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class WebhooksHealthCheckStatusStatus(str, Enum): + r"""Latest health status of the webhooks system""" + + HEALTHY = "healthy" + UNHEALTHY = "unhealthy" + UNKNOWN = "unknown" + + +class WebhooksHealthCheckStatusTypedDict(TypedDict): + r"""The representation of a webhooks health check response""" + + status: NotRequired[WebhooksHealthCheckStatusStatus] + r"""Latest health status of the webhooks system""" + last_checked_at: NotRequired[datetime] + r"""ISO8601 timestamp of the last successful health check with millisecond precision""" + + +class WebhooksHealthCheckStatus(BaseModel): + r"""The representation of a webhooks health check response""" + + status: Optional[WebhooksHealthCheckStatusStatus] = None + r"""Latest health status of the webhooks system""" + + last_checked_at: Optional[datetime] = None + r"""ISO8601 timestamp of the last successful health check with millisecond precision""" diff --git a/gusto_app_int/src/gusto_app_integration/notifications.py b/gusto_app_int/src/gusto_app_integration/notifications.py new file mode 100644 index 00000000..15c1f99e --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/notifications.py @@ -0,0 +1,206 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from gusto_app_integration import models, utils +from gusto_app_integration._hooks import HookContext +from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response +from typing import List, Mapping, Optional + + +class Notifications(BaseSDK): + def get_company_notifications( + self, + *, + company_uuid: str, + status: Optional[models.QueryParamStatus] = None, + x_gusto_api_version: Optional[ + models.GetCompanyNotificationsHeaderXGustoAPIVersion + ] = models.GetCompanyNotificationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + page: Optional[int] = None, + per: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.Notification]: + r"""Get notifications for company + + Returns all notifications relevant for the given company. + + scope: `notifications:read` + + + :param company_uuid: The UUID of the company for which you would like to return notifications + :param status: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCompanyNotificationsRequest( + company_uuid=company_uuid, + status=status, + x_gusto_api_version=x_gusto_api_version, + page=page, + per=per, + ) + + req = self._build_request( + method="GET", + path="/v1/companies/{company_uuid}/notifications", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-company-notifications", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.Notification], http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_company_notifications_async( + self, + *, + company_uuid: str, + status: Optional[models.QueryParamStatus] = None, + x_gusto_api_version: Optional[ + models.GetCompanyNotificationsHeaderXGustoAPIVersion + ] = models.GetCompanyNotificationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + page: Optional[int] = None, + per: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.Notification]: + r"""Get notifications for company + + Returns all notifications relevant for the given company. + + scope: `notifications:read` + + + :param company_uuid: The UUID of the company for which you would like to return notifications + :param status: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCompanyNotificationsRequest( + company_uuid=company_uuid, + status=status, + x_gusto_api_version=x_gusto_api_version, + page=page, + per=per, + ) + + req = self._build_request_async( + method="GET", + path="/v1/companies/{company_uuid}/notifications", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-company-notifications", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.Notification], http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/payrolls.py b/gusto_app_int/src/gusto_app_integration/payrolls.py index 092d7543..0e67ae9f 100644 --- a/gusto_app_int/src/gusto_app_integration/payrolls.py +++ b/gusto_app_int/src/gusto_app_integration/payrolls.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -12,24 +13,26 @@ def get_for_company( self, *, company_id: str, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, processing_statuses: Optional[List[models.ProcessingStatuses]] = None, payroll_types: Optional[List[models.PayrollTypes]] = None, + processed: Optional[bool] = None, + include_off_cycle: Optional[bool] = None, include: Optional[ List[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude] ] = None, start_date: Optional[str] = None, end_date: Optional[str] = None, - sort_order: Optional[models.SortOrder] = None, page: Optional[int] = None, per: Optional[int] = None, - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + sort_order: Optional[models.QueryParamSortOrder] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.PayrollMinimal]: + ) -> List[models.Payroll]: r"""Get all payrolls for a company Returns a list of payrolls for a company. You can change the payrolls returned by updating the processing_status, payroll_types, start_date, & end_date params. @@ -42,16 +45,19 @@ def get_for_company( scope: `payrolls:read` + :param company_id: The UUID of the company + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param processing_statuses: Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` :param payroll_types: Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` - :param include: Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta` + :param processed: Whether to return processed or unprocessed payrolls + :param include_off_cycle: Whether to include off cycle payrolls in the response + :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` :param start_date: Return payrolls whose pay period is after the start date :param end_date: Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. - :param sort_order: A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 - :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param sort_order: A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -69,15 +75,17 @@ def get_for_company( request = models.GetV1CompaniesCompanyIDPayrollsRequest( company_id=company_id, + x_gusto_api_version=x_gusto_api_version, processing_statuses=processing_statuses, payroll_types=payroll_types, + processed=processed, + include_off_cycle=include_off_cycle, include=include, start_date=start_date, end_date=end_date, - sort_order=sort_order, page=page, per=per, - x_gusto_api_version=x_gusto_api_version, + sort_order=sort_order, ) req = self._build_request( @@ -106,9 +114,10 @@ def get_for_company( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-payrolls", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -116,50 +125,47 @@ def get_for_company( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayrollMinimal]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.Payroll], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_for_company_async( self, *, company_id: str, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, processing_statuses: Optional[List[models.ProcessingStatuses]] = None, payroll_types: Optional[List[models.PayrollTypes]] = None, + processed: Optional[bool] = None, + include_off_cycle: Optional[bool] = None, include: Optional[ List[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude] ] = None, start_date: Optional[str] = None, end_date: Optional[str] = None, - sort_order: Optional[models.SortOrder] = None, page: Optional[int] = None, per: Optional[int] = None, - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + sort_order: Optional[models.QueryParamSortOrder] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.PayrollMinimal]: + ) -> List[models.Payroll]: r"""Get all payrolls for a company Returns a list of payrolls for a company. You can change the payrolls returned by updating the processing_status, payroll_types, start_date, & end_date params. @@ -172,16 +178,19 @@ async def get_for_company_async( scope: `payrolls:read` + :param company_id: The UUID of the company + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param processing_statuses: Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` :param payroll_types: Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` - :param include: Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta` + :param processed: Whether to return processed or unprocessed payrolls + :param include_off_cycle: Whether to include off cycle payrolls in the response + :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` :param start_date: Return payrolls whose pay period is after the start date :param end_date: Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. - :param sort_order: A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 - :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param sort_order: A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -199,15 +208,17 @@ async def get_for_company_async( request = models.GetV1CompaniesCompanyIDPayrollsRequest( company_id=company_id, + x_gusto_api_version=x_gusto_api_version, processing_statuses=processing_statuses, payroll_types=payroll_types, + processed=processed, + include_off_cycle=include_off_cycle, include=include, start_date=start_date, end_date=end_date, - sort_order=sort_order, page=page, per=per, - x_gusto_api_version=x_gusto_api_version, + sort_order=sort_order, ) req = self._build_request_async( @@ -236,9 +247,10 @@ async def get_for_company_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-payrolls", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -246,44 +258,42 @@ async def get_for_company_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayrollMinimal]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.Payroll], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, *, company_id: str, payroll_id: str, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, include: Optional[ List[models.GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude] ] = None, - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + page: Optional[int] = None, + per: Optional[int] = None, + sort_by: Optional[models.SortBy] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Payroll: + ) -> models.PayrollShow: r"""Get a single payroll Returns a payroll. If payroll is calculated or processed, will return employee_compensations and totals. @@ -297,10 +307,14 @@ def get( scope: `payrolls:read` + :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll - :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param sort_by: Field to sort employee compensations by :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -319,8 +333,11 @@ def get( request = models.GetV1CompaniesCompanyIDPayrollsPayrollIDRequest( company_id=company_id, payroll_id=payroll_id, - include=include, x_gusto_api_version=x_gusto_api_version, + include=include, + page=page, + per=per, + sort_by=sort_by, ) req = self._build_request( @@ -349,9 +366,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-payrolls-payroll_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -359,44 +377,42 @@ def get( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Payroll) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.PayrollShow, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, *, company_id: str, payroll_id: str, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, include: Optional[ List[models.GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude] ] = None, - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + page: Optional[int] = None, + per: Optional[int] = None, + sort_by: Optional[models.SortBy] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Payroll: + ) -> models.PayrollShow: r"""Get a single payroll Returns a payroll. If payroll is calculated or processed, will return employee_compensations and totals. @@ -410,10 +426,14 @@ async def get_async( scope: `payrolls:read` + :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll - :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param sort_by: Field to sort employee compensations by :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -432,8 +452,11 @@ async def get_async( request = models.GetV1CompaniesCompanyIDPayrollsPayrollIDRequest( company_id=company_id, payroll_id=payroll_id, - include=include, x_gusto_api_version=x_gusto_api_version, + include=include, + page=page, + per=per, + sort_by=sort_by, ) req = self._build_request_async( @@ -462,9 +485,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-payrolls-payroll_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -472,27 +496,22 @@ async def get_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Payroll) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.PayrollShow, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -500,12 +519,12 @@ def update( company_id: str, payroll_id: str, employee_compensations: Union[ - List[models.EmployeeCompensations], - List[models.EmployeeCompensationsTypedDict], + List[models.PayrollUpdateEmployeeCompensations], + List[models.PayrollUpdateEmployeeCompensationsTypedDict], ], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, withholding_pay_period: Optional[models.WithholdingPayPeriod] = None, skip_regular_deductions: Optional[bool] = None, fixed_withholding_rate: Optional[bool] = None, @@ -523,6 +542,7 @@ def update( scope: `payrolls:write` + :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll :param employee_compensations: @@ -546,12 +566,13 @@ def update( base_url = self._get_url(base_url, url_variables) request = models.PutV1CompaniesCompanyIDPayrollsRequest( + x_gusto_api_version=x_gusto_api_version, company_id=company_id, payroll_id=payroll_id, - x_gusto_api_version=x_gusto_api_version, - request_body=models.PutV1CompaniesCompanyIDPayrollsRequestBody( + payroll_update=models.PayrollUpdate( employee_compensations=utils.get_pydantic_model( - employee_compensations, List[models.EmployeeCompensations] + employee_compensations, + List[models.PayrollUpdateEmployeeCompensations], ), withholding_pay_period=withholding_pay_period, skip_regular_deductions=skip_regular_deductions, @@ -573,11 +594,7 @@ def update( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PutV1CompaniesCompanyIDPayrollsRequestBody, + request.payroll_update, False, False, "json", models.PayrollUpdate ), timeout_ms=timeout_ms, ) @@ -592,9 +609,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-payrolls", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -604,31 +622,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollPrepared) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + return unmarshal_json_response(models.PayrollPrepared, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -636,12 +643,12 @@ async def update_async( company_id: str, payroll_id: str, employee_compensations: Union[ - List[models.EmployeeCompensations], - List[models.EmployeeCompensationsTypedDict], + List[models.PayrollUpdateEmployeeCompensations], + List[models.PayrollUpdateEmployeeCompensationsTypedDict], ], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, withholding_pay_period: Optional[models.WithholdingPayPeriod] = None, skip_regular_deductions: Optional[bool] = None, fixed_withholding_rate: Optional[bool] = None, @@ -659,6 +666,7 @@ async def update_async( scope: `payrolls:write` + :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll :param employee_compensations: @@ -682,12 +690,13 @@ async def update_async( base_url = self._get_url(base_url, url_variables) request = models.PutV1CompaniesCompanyIDPayrollsRequest( + x_gusto_api_version=x_gusto_api_version, company_id=company_id, payroll_id=payroll_id, - x_gusto_api_version=x_gusto_api_version, - request_body=models.PutV1CompaniesCompanyIDPayrollsRequestBody( + payroll_update=models.PayrollUpdate( employee_compensations=utils.get_pydantic_model( - employee_compensations, List[models.EmployeeCompensations] + employee_compensations, + List[models.PayrollUpdateEmployeeCompensations], ), withholding_pay_period=withholding_pay_period, skip_regular_deductions=skip_regular_deductions, @@ -709,11 +718,7 @@ async def update_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PutV1CompaniesCompanyIDPayrollsRequestBody, + request.payroll_update, False, False, "json", models.PayrollUpdate ), timeout_ms=timeout_ms, ) @@ -728,9 +733,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-payrolls", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -740,40 +746,33 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollPrepared) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + return unmarshal_json_response(models.PayrollPrepared, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def prepare( self, *, company_id: str, payroll_id: str, + page: Optional[int] = None, + per: Optional[int] = None, + sort_by: Optional[models.PayrollPrepareSortBy] = None, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + employee_uuids: Optional[List[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -791,7 +790,11 @@ def prepare( :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param sort_by: Sort employee compenstations by name. Options: first_name, last_name :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param employee_uuids: An array of employee UUIDs. If passed, only those employees payroll items will be prepared. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -810,7 +813,13 @@ def prepare( request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest( company_id=company_id, payroll_id=payroll_id, + page=page, + per=per, + sort_by=sort_by, x_gusto_api_version=x_gusto_api_version, + request_body=models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody( + employee_uuids=employee_uuids, + ), ) req = self._build_request( @@ -826,6 +835,15 @@ def prepare( accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "json", + Optional[ + models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody + ], + ), timeout_ms=timeout_ms, ) @@ -839,9 +857,10 @@ def prepare( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-payrolls-payroll_id-prepare", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -850,35 +869,28 @@ def prepare( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollPrepared) + return unmarshal_json_response(models.PayrollPrepared, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def prepare_async( self, *, company_id: str, payroll_id: str, + page: Optional[int] = None, + per: Optional[int] = None, + sort_by: Optional[models.PayrollPrepareSortBy] = None, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + employee_uuids: Optional[List[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -896,7 +908,11 @@ async def prepare_async( :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param sort_by: Sort employee compenstations by name. Options: first_name, last_name :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param employee_uuids: An array of employee UUIDs. If passed, only those employees payroll items will be prepared. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -915,7 +931,13 @@ async def prepare_async( request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest( company_id=company_id, payroll_id=payroll_id, + page=page, + per=per, + sort_by=sort_by, x_gusto_api_version=x_gusto_api_version, + request_body=models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody( + employee_uuids=employee_uuids, + ), ) req = self._build_request_async( @@ -931,6 +953,15 @@ async def prepare_async( accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "json", + Optional[ + models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody + ], + ), timeout_ms=timeout_ms, ) @@ -944,9 +975,10 @@ async def prepare_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-payrolls-payroll_id-prepare", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -955,23 +987,12 @@ async def prepare_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollPrepared) + return unmarshal_json_response(models.PayrollPrepared, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/payschedules.py b/gusto_app_int/src/gusto_app_integration/payschedules.py index 24ba02cf..33ed14d0 100644 --- a/gusto_app_int/src/gusto_app_integration/payschedules.py +++ b/gusto_app_int/src/gusto_app_integration/payschedules.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import List, Mapping, Optional @@ -80,9 +81,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -91,26 +93,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayScheduleList]) + return unmarshal_json_response(List[models.PayScheduleList], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -184,9 +175,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -195,26 +187,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayScheduleList]) + return unmarshal_json_response(List[models.PayScheduleList], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -285,9 +266,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules-pay_schedule_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -296,26 +278,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleObject) + return unmarshal_json_response(models.PayScheduleObject, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -386,9 +357,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules-pay_schedule_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -397,26 +369,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleObject) + return unmarshal_json_response(models.PayScheduleObject, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_pay_periods( self, @@ -497,9 +458,10 @@ def get_pay_periods( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_periods", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -508,26 +470,15 @@ def get_pay_periods( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayPeriod]) + return unmarshal_json_response(List[models.PayPeriod], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_pay_periods_async( self, @@ -608,9 +559,10 @@ async def get_pay_periods_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_periods", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -619,26 +571,15 @@ async def get_pay_periods_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayPeriod]) + return unmarshal_json_response(List[models.PayPeriod], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_unprocessed_termination_pay_periods( self, @@ -708,9 +649,10 @@ def get_unprocessed_termination_pay_periods( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-unprocessed_termination_pay_periods", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -719,28 +661,17 @@ def get_unprocessed_termination_pay_periods( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.UnprocessedTerminationPayPeriod] + return unmarshal_json_response( + List[models.UnprocessedTerminationPayPeriod], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_unprocessed_termination_pay_periods_async( self, @@ -810,9 +741,10 @@ async def get_unprocessed_termination_pay_periods_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-unprocessed_termination_pay_periods", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -821,28 +753,17 @@ async def get_unprocessed_termination_pay_periods_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.UnprocessedTerminationPayPeriod] + return unmarshal_json_response( + List[models.UnprocessedTerminationPayPeriod], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_assignments( self, @@ -910,9 +831,10 @@ def get_assignments( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules-assignments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -921,26 +843,15 @@ def get_assignments( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleAssignment) + return unmarshal_json_response(models.PayScheduleAssignment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_assignments_async( self, @@ -1008,9 +919,10 @@ async def get_assignments_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules-assignments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1019,23 +931,12 @@ async def get_assignments_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleAssignment) + return unmarshal_json_response(models.PayScheduleAssignment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/reports.py b/gusto_app_int/src/gusto_app_integration/reports.py new file mode 100644 index 00000000..60a92384 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/reports.py @@ -0,0 +1,416 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from gusto_app_integration import models, utils +from gusto_app_integration._hooks import HookContext +from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional + + +class Reports(BaseSDK): + def post_payrolls_payroll_uuid_reports_general_ledger( + self, + *, + payroll_uuid: str, + aggregation: models.PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + integration_type: OptionalNullable[ + models.PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GeneralLedgerReport: + r"""Create a general ledger report + + Create a general ledger report for a payroll. The report can be aggregated by different dimensions such as job or department. + + Use the `request_uuid` in the response with the [report GET endpoint](../reference/get-reports-request_uuid) to poll for the status and report URL upon completion. The retrieved report will be generated in a JSON format. + + scope: `company_reports:write` OR `company_reports:write:general_ledger` + + :param payroll_uuid: The UUID of the payroll + :param aggregation: The breakdown of the report. Use 'default' for no split. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param integration_type: The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequest( + payroll_uuid=payroll_uuid, + x_gusto_api_version=x_gusto_api_version, + request_body=models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody( + aggregation=aggregation, + integration_type=integration_type, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/payrolls/{payroll_uuid}/reports/general_ledger", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-payrolls-payroll_uuid-reports-general_ledger", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GeneralLedgerReport, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def post_payrolls_payroll_uuid_reports_general_ledger_async( + self, + *, + payroll_uuid: str, + aggregation: models.PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + integration_type: OptionalNullable[ + models.PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GeneralLedgerReport: + r"""Create a general ledger report + + Create a general ledger report for a payroll. The report can be aggregated by different dimensions such as job or department. + + Use the `request_uuid` in the response with the [report GET endpoint](../reference/get-reports-request_uuid) to poll for the status and report URL upon completion. The retrieved report will be generated in a JSON format. + + scope: `company_reports:write` OR `company_reports:write:general_ledger` + + :param payroll_uuid: The UUID of the payroll + :param aggregation: The breakdown of the report. Use 'default' for no split. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param integration_type: The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequest( + payroll_uuid=payroll_uuid, + x_gusto_api_version=x_gusto_api_version, + request_body=models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody( + aggregation=aggregation, + integration_type=integration_type, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/payrolls/{payroll_uuid}/reports/general_ledger", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-payrolls-payroll_uuid-reports-general_ledger", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GeneralLedgerReport, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_reports_request_uuid( + self, + *, + request_uuid: str, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Report: + r"""Get a report + + Get a company's report given the `request_uuid`. The response will include the report request's status and, if complete, the report URL. + + Reports containing PHI are inaccessible with `company_reports:read:tier_2_only` data scope + + scope: `company_reports:read` + + :param request_uuid: The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetReportsRequestUUIDRequest( + request_uuid=request_uuid, + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request( + method="GET", + path="/v1/reports/{request_uuid}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-reports-request_uuid", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Report, http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_reports_request_uuid_async( + self, + *, + request_uuid: str, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Report: + r"""Get a report + + Get a company's report given the `request_uuid`. The response will include the report request's status and, if complete, the report URL. + + Reports containing PHI are inaccessible with `company_reports:read:tier_2_only` data scope + + scope: `company_reports:read` + + :param request_uuid: The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetReportsRequestUUIDRequest( + request_uuid=request_uuid, + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request_async( + method="GET", + path="/v1/reports/{request_uuid}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-reports-request_uuid", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Report, http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/sdk.py b/gusto_app_int/src/gusto_app_integration/sdk.py index f456dec8..6a5e2ff1 100644 --- a/gusto_app_int/src/gusto_app_integration/sdk.py +++ b/gusto_app_int/src/gusto_app_integration/sdk.py @@ -7,61 +7,123 @@ from .utils.retries import RetryConfig from gusto_app_integration import models, utils from gusto_app_integration._hooks import SDKHooks -from gusto_app_integration.companies import Companies -from gusto_app_integration.companybenefits import CompanyBenefits -from gusto_app_integration.companylocations import CompanyLocations -from gusto_app_integration.contractorpaymentgroups import ContractorPaymentGroups -from gusto_app_integration.contractorpayments import ContractorPayments -from gusto_app_integration.contractors import Contractors -from gusto_app_integration.departments import Departments -from gusto_app_integration.earningtypes import EarningTypes -from gusto_app_integration.employeeaddresses import EmployeeAddresses -from gusto_app_integration.employeebenefits import EmployeeBenefits -from gusto_app_integration.employeeemployments import EmployeeEmployments -from gusto_app_integration.employees import Employees -from gusto_app_integration.events import Events -from gusto_app_integration.garnishments import Garnishments -from gusto_app_integration.introspection import Introspection -from gusto_app_integration.jobs import Jobs -from gusto_app_integration.jobsandcompensations import JobsAndCompensations -from gusto_app_integration.locations import Locations -from gusto_app_integration.payrolls import Payrolls -from gusto_app_integration.payschedules import PaySchedules -from gusto_app_integration.time_tracking import TimeTracking -from gusto_app_integration.timeoffpolicies import TimeOffPolicies from gusto_app_integration.types import OptionalNullable, UNSET -from gusto_app_integration.webhooks import Webhooks import httpx -from typing import Any, Callable, Dict, Optional, Union, cast +import importlib +import sys +from typing import Any, Callable, Dict, Optional, TYPE_CHECKING, Union, cast import weakref +if TYPE_CHECKING: + from gusto_app_integration.companies import Companies + from gusto_app_integration.companybenefits import CompanyBenefits + from gusto_app_integration.companylocations import CompanyLocations + from gusto_app_integration.contractorpayments import ContractorPayments + from gusto_app_integration.contractors import Contractors + from gusto_app_integration.departments import Departments + from gusto_app_integration.earningtypes import EarningTypes + from gusto_app_integration.employeeaddresses import EmployeeAddresses + from gusto_app_integration.employeebenefits import EmployeeBenefits + from gusto_app_integration.employeeemployments import EmployeeEmployments + from gusto_app_integration.employees import Employees + from gusto_app_integration.events import Events + from gusto_app_integration.garnishments import Garnishments + from gusto_app_integration.introspection import Introspection + from gusto_app_integration.jobs import Jobs + from gusto_app_integration.jobsandcompensations import JobsAndCompensations + from gusto_app_integration.locations import Locations + from gusto_app_integration.notifications import Notifications + from gusto_app_integration.payrolls import Payrolls + from gusto_app_integration.payschedules import PaySchedules + from gusto_app_integration.reports import Reports + from gusto_app_integration.time_off_requests import TimeOffRequests + from gusto_app_integration.time_tracking import TimeTracking + from gusto_app_integration.timeoffpolicies import TimeOffPolicies + from gusto_app_integration.webhooks import Webhooks + class GustoAppIntegration(BaseSDK): r"""Gusto API: Welcome to Gusto's Embedded Payroll API documentation!""" - introspection: Introspection - companies: Companies - locations: Locations - company_locations: CompanyLocations - pay_schedules: PaySchedules - employees: Employees - departments: Departments - employee_employments: EmployeeEmployments - employee_addresses: EmployeeAddresses - jobs: Jobs - jobs_and_compensations: JobsAndCompensations - earning_types: EarningTypes - contractors: Contractors - webhooks: Webhooks - payrolls: Payrolls - time_off_policies: TimeOffPolicies - contractor_payments: ContractorPayments - contractor_payment_groups: ContractorPaymentGroups - company_benefits: CompanyBenefits - employee_benefits: EmployeeBenefits - garnishments: Garnishments - events: Events - time_tracking: TimeTracking + introspection: "Introspection" + companies: "Companies" + locations: "Locations" + company_locations: "CompanyLocations" + pay_schedules: "PaySchedules" + employees: "Employees" + departments: "Departments" + employee_employments: "EmployeeEmployments" + employee_addresses: "EmployeeAddresses" + jobs: "Jobs" + jobs_and_compensations: "JobsAndCompensations" + earning_types: "EarningTypes" + contractors: "Contractors" + webhooks: "Webhooks" + payrolls: "Payrolls" + time_off_policies: "TimeOffPolicies" + contractor_payments: "ContractorPayments" + reports: "Reports" + company_benefits: "CompanyBenefits" + employee_benefits: "EmployeeBenefits" + garnishments: "Garnishments" + events: "Events" + time_tracking: "TimeTracking" + notifications: "Notifications" + time_off_requests: "TimeOffRequests" + _sub_sdk_map = { + "introspection": ("gusto_app_integration.introspection", "Introspection"), + "companies": ("gusto_app_integration.companies", "Companies"), + "locations": ("gusto_app_integration.locations", "Locations"), + "company_locations": ( + "gusto_app_integration.companylocations", + "CompanyLocations", + ), + "pay_schedules": ("gusto_app_integration.payschedules", "PaySchedules"), + "employees": ("gusto_app_integration.employees", "Employees"), + "departments": ("gusto_app_integration.departments", "Departments"), + "employee_employments": ( + "gusto_app_integration.employeeemployments", + "EmployeeEmployments", + ), + "employee_addresses": ( + "gusto_app_integration.employeeaddresses", + "EmployeeAddresses", + ), + "jobs": ("gusto_app_integration.jobs", "Jobs"), + "jobs_and_compensations": ( + "gusto_app_integration.jobsandcompensations", + "JobsAndCompensations", + ), + "earning_types": ("gusto_app_integration.earningtypes", "EarningTypes"), + "contractors": ("gusto_app_integration.contractors", "Contractors"), + "webhooks": ("gusto_app_integration.webhooks", "Webhooks"), + "payrolls": ("gusto_app_integration.payrolls", "Payrolls"), + "time_off_policies": ( + "gusto_app_integration.timeoffpolicies", + "TimeOffPolicies", + ), + "contractor_payments": ( + "gusto_app_integration.contractorpayments", + "ContractorPayments", + ), + "reports": ("gusto_app_integration.reports", "Reports"), + "company_benefits": ( + "gusto_app_integration.companybenefits", + "CompanyBenefits", + ), + "employee_benefits": ( + "gusto_app_integration.employeebenefits", + "EmployeeBenefits", + ), + "garnishments": ("gusto_app_integration.garnishments", "Garnishments"), + "events": ("gusto_app_integration.events", "Events"), + "time_tracking": ("gusto_app_integration.time_tracking", "TimeTracking"), + "notifications": ("gusto_app_integration.notifications", "Notifications"), + "time_off_requests": ( + "gusto_app_integration.time_off_requests", + "TimeOffRequests", + ), + } def __init__( self, @@ -90,7 +152,7 @@ def __init__( """ client_supplied = True if client is None: - client = httpx.Client() + client = httpx.Client(follow_redirects=True) client_supplied = False assert issubclass( @@ -99,7 +161,7 @@ def __init__( async_client_supplied = True if async_client is None: - async_client = httpx.AsyncClient() + async_client = httpx.AsyncClient(follow_redirects=True) async_client_supplied = False if debug_logger is None: @@ -136,10 +198,14 @@ def __init__( timeout_ms=timeout_ms, debug_logger=debug_logger, ), + parent_ref=self, ) hooks = SDKHooks() + # pylint: disable=protected-access + self.sdk_configuration.__dict__["_hooks"] = hooks + current_server_url, *_ = self.sdk_configuration.get_server_details() server_url, self.sdk_configuration.client = hooks.sdk_init( current_server_url, client @@ -147,9 +213,6 @@ def __init__( if current_server_url != server_url: self.sdk_configuration.server_url = server_url - # pylint: disable=protected-access - self.sdk_configuration.__dict__["_hooks"] = hooks - weakref.finalize( self, close_clients, @@ -160,32 +223,43 @@ def __init__( self.sdk_configuration.async_client_supplied, ) - self._init_sdks() - - def _init_sdks(self): - self.introspection = Introspection(self.sdk_configuration) - self.companies = Companies(self.sdk_configuration) - self.locations = Locations(self.sdk_configuration) - self.company_locations = CompanyLocations(self.sdk_configuration) - self.pay_schedules = PaySchedules(self.sdk_configuration) - self.employees = Employees(self.sdk_configuration) - self.departments = Departments(self.sdk_configuration) - self.employee_employments = EmployeeEmployments(self.sdk_configuration) - self.employee_addresses = EmployeeAddresses(self.sdk_configuration) - self.jobs = Jobs(self.sdk_configuration) - self.jobs_and_compensations = JobsAndCompensations(self.sdk_configuration) - self.earning_types = EarningTypes(self.sdk_configuration) - self.contractors = Contractors(self.sdk_configuration) - self.webhooks = Webhooks(self.sdk_configuration) - self.payrolls = Payrolls(self.sdk_configuration) - self.time_off_policies = TimeOffPolicies(self.sdk_configuration) - self.contractor_payments = ContractorPayments(self.sdk_configuration) - self.contractor_payment_groups = ContractorPaymentGroups(self.sdk_configuration) - self.company_benefits = CompanyBenefits(self.sdk_configuration) - self.employee_benefits = EmployeeBenefits(self.sdk_configuration) - self.garnishments = Garnishments(self.sdk_configuration) - self.events = Events(self.sdk_configuration) - self.time_tracking = TimeTracking(self.sdk_configuration) + def dynamic_import(self, modname, retries=3): + for attempt in range(retries): + try: + return importlib.import_module(modname) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + def __getattr__(self, name: str): + if name in self._sub_sdk_map: + module_path, class_name = self._sub_sdk_map[name] + try: + module = self.dynamic_import(module_path) + klass = getattr(module, class_name) + instance = klass(self.sdk_configuration, parent_ref=self) + setattr(self, name, instance) + return instance + except ImportError as e: + raise AttributeError( + f"Failed to import module {module_path} for attribute {name}: {e}" + ) from e + except AttributeError as e: + raise AttributeError( + f"Failed to find class {class_name} in module {module_path} for attribute {name}: {e}" + ) from e + + raise AttributeError( + f"'{type(self).__name__}' object has no attribute '{name}'" + ) + + def __dir__(self): + default_attrs = list(super().__dir__()) + lazy_attrs = list(self._sub_sdk_map.keys()) + return sorted(list(set(default_attrs + lazy_attrs))) def __enter__(self): return self diff --git a/gusto_app_int/src/gusto_app_integration/sdkconfiguration.py b/gusto_app_int/src/gusto_app_integration/sdkconfiguration.py index a8cd44dd..950d2020 100644 --- a/gusto_app_int/src/gusto_app_integration/sdkconfiguration.py +++ b/gusto_app_int/src/gusto_app_integration/sdkconfiguration.py @@ -1,6 +1,5 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from ._hooks import SDKHooks from ._version import ( __gen_version__, __openapi_doc_version__, @@ -45,9 +44,6 @@ class SDKConfiguration: retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None - def __post_init__(self): - self._hooks = SDKHooks() - def get_server_details(self) -> Tuple[str, Dict[str, str]]: if self.server_url is not None and self.server_url: return remove_suffix(self.server_url, "/"), {} @@ -58,6 +54,3 @@ def get_server_details(self) -> Tuple[str, Dict[str, str]]: raise ValueError(f'Invalid server "{self.server}"') return SERVERS[self.server], {} - - def get_hooks(self) -> SDKHooks: - return self._hooks diff --git a/gusto_app_int/src/gusto_app_integration/time_off_requests.py b/gusto_app_int/src/gusto_app_integration/time_off_requests.py new file mode 100644 index 00000000..798e1234 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/time_off_requests.py @@ -0,0 +1,232 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from gusto_app_integration import models, utils +from gusto_app_integration._hooks import HookContext +from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response +from typing import List, Mapping, Optional + + +class TimeOffRequests(BaseSDK): + def get_v1_companies_company_id_time_off_requests( + self, + *, + company_id: str, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.TimeOffRequest]: + r"""Get time off requests for a company + + Get all time off requests, past and present, for a company. + + In order to reduce the number of time off requests returned in a single response, or to retrieve time off requests from a time period of interest, you may use the `start_date` and `end_date` parameters. + + You may provide both or either parameters to scope the returned data. For example: + + `?start_date=2019-01-01` + + Returns all time off requests where the request start date is equal to or after January 1, 2019. + + `?end_date=2019-01-01` + + Returns all time off requests where the request end date is equal to or before January 1, 2019. + + `?start_date=2019-05-01&end_date=2019-08-31` + + Returns all time off requests where the request start date is equal to or after May 1, 2019 and the request end date is equal to or before August 31, 2019. + + `scope: time_off_requests:read` + + + :param company_id: The company UUID + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param start_date: Filter time off requests starting on or after this date + :param end_date: Filter time off requests ending on or before this date + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1CompaniesCompanyIDTimeOffRequestsRequest( + x_gusto_api_version=x_gusto_api_version, + company_id=company_id, + start_date=start_date, + end_date=end_date, + ) + + req = self._build_request( + method="GET", + path="/v1/companies/{company_id}/time_off_requests", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-time_off_requests", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.TimeOffRequest], http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_companies_company_id_time_off_requests_async( + self, + *, + company_id: str, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDTimeOffRequestsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.TimeOffRequest]: + r"""Get time off requests for a company + + Get all time off requests, past and present, for a company. + + In order to reduce the number of time off requests returned in a single response, or to retrieve time off requests from a time period of interest, you may use the `start_date` and `end_date` parameters. + + You may provide both or either parameters to scope the returned data. For example: + + `?start_date=2019-01-01` + + Returns all time off requests where the request start date is equal to or after January 1, 2019. + + `?end_date=2019-01-01` + + Returns all time off requests where the request end date is equal to or before January 1, 2019. + + `?start_date=2019-05-01&end_date=2019-08-31` + + Returns all time off requests where the request start date is equal to or after May 1, 2019 and the request end date is equal to or before August 31, 2019. + + `scope: time_off_requests:read` + + + :param company_id: The company UUID + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param start_date: Filter time off requests starting on or after this date + :param end_date: Filter time off requests ending on or before this date + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1CompaniesCompanyIDTimeOffRequestsRequest( + x_gusto_api_version=x_gusto_api_version, + company_id=company_id, + start_date=start_date, + end_date=end_date, + ) + + req = self._build_request_async( + method="GET", + path="/v1/companies/{company_id}/time_off_requests", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-time_off_requests", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.TimeOffRequest], http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/time_tracking.py b/gusto_app_int/src/gusto_app_integration/time_tracking.py index fa614a91..f2de6556 100644 --- a/gusto_app_int/src/gusto_app_integration/time_tracking.py +++ b/gusto_app_int/src/gusto_app_integration/time_tracking.py @@ -5,6 +5,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Dict, List, Mapping, Optional, Union @@ -44,7 +45,7 @@ def get_companies_company_uuid_time_tracking_time_sheets( :param entity_type: Type of entities to filter. One of: \"Employee\", \"Contractor\" :param status: Status of time sheets. One of: \"approved\", \"pending\", \"rejected\" :param sort_by: Field to sort by. One of: \"created_at\", \"updated_at\", \"shift_started_at\", \"shift_ended_at\" - :param sort_order: Sortinng order. One of: \"asc\", \"desc\" + :param sort_order: Sorting order. One of: \"asc\", \"desc\" :param before: time sheets that were created before ISO 8601 timestamp. Filtering by \"created_at\" :param after: time sheets that were created before ISO 8601 timestamp. Filtering by \"created_at\" :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. @@ -105,9 +106,10 @@ def get_companies_company_uuid_time_tracking_time_sheets( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-time_tracking-time_sheets", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -116,26 +118,15 @@ def get_companies_company_uuid_time_tracking_time_sheets( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.TimeSheet]) + return unmarshal_json_response(List[models.TimeSheet], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_companies_company_uuid_time_tracking_time_sheets_async( self, @@ -172,7 +163,7 @@ async def get_companies_company_uuid_time_tracking_time_sheets_async( :param entity_type: Type of entities to filter. One of: \"Employee\", \"Contractor\" :param status: Status of time sheets. One of: \"approved\", \"pending\", \"rejected\" :param sort_by: Field to sort by. One of: \"created_at\", \"updated_at\", \"shift_started_at\", \"shift_ended_at\" - :param sort_order: Sortinng order. One of: \"asc\", \"desc\" + :param sort_order: Sorting order. One of: \"asc\", \"desc\" :param before: time sheets that were created before ISO 8601 timestamp. Filtering by \"created_at\" :param after: time sheets that were created before ISO 8601 timestamp. Filtering by \"created_at\" :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. @@ -233,9 +224,10 @@ async def get_companies_company_uuid_time_tracking_time_sheets_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-time_tracking-time_sheets", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -244,26 +236,15 @@ async def get_companies_company_uuid_time_tracking_time_sheets_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.TimeSheet]) + return unmarshal_json_response(List[models.TimeSheet], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def post_companies_company_uuid_time_tracking_time_sheets( self, @@ -383,9 +364,10 @@ def post_companies_company_uuid_time_tracking_time_sheets( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-companies-company_uuid-time_tracking-time_sheets", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -395,31 +377,20 @@ def post_companies_company_uuid_time_tracking_time_sheets( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeSheet) + return unmarshal_json_response(models.TimeSheet, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def post_companies_company_uuid_time_tracking_time_sheets_async( self, @@ -539,9 +510,10 @@ async def post_companies_company_uuid_time_tracking_time_sheets_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-companies-company_uuid-time_tracking-time_sheets", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -551,31 +523,20 @@ async def post_companies_company_uuid_time_tracking_time_sheets_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeSheet) + return unmarshal_json_response(models.TimeSheet, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_time_tracking_time_sheets_time_sheet_uuid( self, @@ -646,9 +607,10 @@ def get_time_tracking_time_sheets_time_sheet_uuid( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-time_tracking-time_sheets-time_sheet_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -657,26 +619,15 @@ def get_time_tracking_time_sheets_time_sheet_uuid( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeSheet) + return unmarshal_json_response(models.TimeSheet, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_time_tracking_time_sheets_time_sheet_uuid_async( self, @@ -747,9 +698,10 @@ async def get_time_tracking_time_sheets_time_sheet_uuid_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-time_tracking-time_sheets-time_sheet_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -758,26 +710,15 @@ async def get_time_tracking_time_sheets_time_sheet_uuid_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeSheet) + return unmarshal_json_response(models.TimeSheet, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def put_time_tracking_time_sheets_time_sheet_uuid( self, @@ -894,9 +835,10 @@ def put_time_tracking_time_sheets_time_sheet_uuid( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-time_tracking-time_sheets-time_sheet_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -906,31 +848,20 @@ def put_time_tracking_time_sheets_time_sheet_uuid( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeSheet) + return unmarshal_json_response(models.TimeSheet, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def put_time_tracking_time_sheets_time_sheet_uuid_async( self, @@ -1047,9 +978,10 @@ async def put_time_tracking_time_sheets_time_sheet_uuid_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-time_tracking-time_sheets-time_sheet_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1059,31 +991,20 @@ async def put_time_tracking_time_sheets_time_sheet_uuid_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeSheet) + return unmarshal_json_response(models.TimeSheet, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_time_tracking_time_sheets_time_sheet_uuid( self, @@ -1157,9 +1078,10 @@ def delete_time_tracking_time_sheets_time_sheet_uuid( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-time_tracking-time_sheets-time_sheet_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1171,29 +1093,18 @@ def delete_time_tracking_time_sheets_time_sheet_uuid( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_time_tracking_time_sheets_time_sheet_uuid_async( self, @@ -1267,9 +1178,10 @@ async def delete_time_tracking_time_sheets_time_sheet_uuid_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-time_tracking-time_sheets-time_sheet_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1281,26 +1193,15 @@ async def delete_time_tracking_time_sheets_time_sheet_uuid_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/timeoffpolicies.py b/gusto_app_int/src/gusto_app_integration/timeoffpolicies.py index 3dbb7423..6e955b5b 100644 --- a/gusto_app_int/src/gusto_app_integration/timeoffpolicies.py +++ b/gusto_app_int/src/gusto_app_integration/timeoffpolicies.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Mapping, Optional @@ -109,9 +110,10 @@ def calculate_accruing_time_off_hours( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-payrolls-payroll_id-calculate_accruing_time_off_hours", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -121,31 +123,20 @@ def calculate_accruing_time_off_hours( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.AccruingTimeOffHourObject) + return unmarshal_json_response(models.AccruingTimeOffHourObject, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def calculate_accruing_time_off_hours_async( self, @@ -248,9 +239,10 @@ async def calculate_accruing_time_off_hours_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-payrolls-payroll_id-calculate_accruing_time_off_hours", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -260,28 +252,17 @@ async def calculate_accruing_time_off_hours_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.AccruingTimeOffHourObject) + return unmarshal_json_response(models.AccruingTimeOffHourObject, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_app_int/src/gusto_app_integration/utils/__init__.py b/gusto_app_int/src/gusto_app_integration/utils/__init__.py index f2950eed..56164cf3 100644 --- a/gusto_app_int/src/gusto_app_integration/utils/__init__.py +++ b/gusto_app_int/src/gusto_app_integration/utils/__init__.py @@ -1,51 +1,57 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from .annotations import get_discriminator -from .datetimes import parse_datetime -from .enums import OpenEnumMeta -from .headers import get_headers, get_response_headers -from .metadata import ( - FieldMetadata, - find_metadata, - FormMetadata, - HeaderMetadata, - MultipartFormMetadata, - PathParamMetadata, - QueryParamMetadata, - RequestMetadata, - SecurityMetadata, -) -from .queryparams import get_query_params -from .retries import BackoffStrategy, Retries, retry, retry_async, RetryConfig -from .requestbodies import serialize_request_body, SerializedRequestBody -from .security import get_security -from .serializers import ( - get_pydantic_model, - marshal_json, - unmarshal, - unmarshal_json, - serialize_decimal, - serialize_float, - serialize_int, - stream_to_text, - stream_to_text_async, - stream_to_bytes, - stream_to_bytes_async, - validate_const, - validate_decimal, - validate_float, - validate_int, - validate_open_enum, -) -from .url import generate_url, template_url, remove_suffix -from .values import ( - get_global_from_env, - match_content_type, - match_status_codes, - match_response, - cast_partial, -) -from .logger import Logger, get_body_content, get_default_logger +from typing import TYPE_CHECKING +from importlib import import_module +import builtins +import sys + +if TYPE_CHECKING: + from .annotations import get_discriminator + from .datetimes import parse_datetime + from .enums import OpenEnumMeta + from .headers import get_headers, get_response_headers + from .metadata import ( + FieldMetadata, + find_metadata, + FormMetadata, + HeaderMetadata, + MultipartFormMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, + SecurityMetadata, + ) + from .queryparams import get_query_params + from .retries import BackoffStrategy, Retries, retry, retry_async, RetryConfig + from .requestbodies import serialize_request_body, SerializedRequestBody + from .security import get_security + from .serializers import ( + get_pydantic_model, + marshal_json, + unmarshal, + unmarshal_json, + serialize_decimal, + serialize_float, + serialize_int, + stream_to_text, + stream_to_text_async, + stream_to_bytes, + stream_to_bytes_async, + validate_const, + validate_decimal, + validate_float, + validate_int, + validate_open_enum, + ) + from .url import generate_url, template_url, remove_suffix + from .values import ( + get_global_from_env, + match_content_type, + match_status_codes, + match_response, + cast_partial, + ) + from .logger import Logger, get_body_content, get_default_logger __all__ = [ "BackoffStrategy", @@ -56,6 +62,7 @@ "get_body_content", "get_default_logger", "get_discriminator", + "parse_datetime", "get_global_from_env", "get_headers", "get_pydantic_model", @@ -98,3 +105,93 @@ "validate_open_enum", "cast_partial", ] + +_dynamic_imports: dict[str, str] = { + "BackoffStrategy": ".retries", + "FieldMetadata": ".metadata", + "find_metadata": ".metadata", + "FormMetadata": ".metadata", + "generate_url": ".url", + "get_body_content": ".logger", + "get_default_logger": ".logger", + "get_discriminator": ".annotations", + "parse_datetime": ".datetimes", + "get_global_from_env": ".values", + "get_headers": ".headers", + "get_pydantic_model": ".serializers", + "get_query_params": ".queryparams", + "get_response_headers": ".headers", + "get_security": ".security", + "HeaderMetadata": ".metadata", + "Logger": ".logger", + "marshal_json": ".serializers", + "match_content_type": ".values", + "match_status_codes": ".values", + "match_response": ".values", + "MultipartFormMetadata": ".metadata", + "OpenEnumMeta": ".enums", + "PathParamMetadata": ".metadata", + "QueryParamMetadata": ".metadata", + "remove_suffix": ".url", + "Retries": ".retries", + "retry": ".retries", + "retry_async": ".retries", + "RetryConfig": ".retries", + "RequestMetadata": ".metadata", + "SecurityMetadata": ".metadata", + "serialize_decimal": ".serializers", + "serialize_float": ".serializers", + "serialize_int": ".serializers", + "serialize_request_body": ".requestbodies", + "SerializedRequestBody": ".requestbodies", + "stream_to_text": ".serializers", + "stream_to_text_async": ".serializers", + "stream_to_bytes": ".serializers", + "stream_to_bytes_async": ".serializers", + "template_url": ".url", + "unmarshal": ".serializers", + "unmarshal_json": ".serializers", + "validate_decimal": ".serializers", + "validate_const": ".serializers", + "validate_float": ".serializers", + "validate_int": ".serializers", + "validate_open_enum": ".serializers", + "cast_partial": ".values", +} + + +def dynamic_import(modname, retries=3): + for attempt in range(retries): + try: + return import_module(modname, __package__) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + +def __getattr__(attr_name: str) -> object: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError( + f"no {attr_name} found in _dynamic_imports, module name -> {__name__} " + ) + + try: + module = dynamic_import(module_name) + return getattr(module, attr_name) + except ImportError as e: + raise ImportError( + f"Failed to import {attr_name} from {module_name}: {e}" + ) from e + except AttributeError as e: + raise AttributeError( + f"Failed to get {attr_name} from {module_name}: {e}" + ) from e + + +def __dir__(): + lazy_attrs = builtins.list(_dynamic_imports.keys()) + return builtins.sorted(lazy_attrs) diff --git a/gusto_app_int/src/gusto_app_integration/utils/annotations.py b/gusto_app_int/src/gusto_app_integration/utils/annotations.py index 387874ed..12e0aa4f 100644 --- a/gusto_app_int/src/gusto_app_integration/utils/annotations.py +++ b/gusto_app_int/src/gusto_app_integration/utils/annotations.py @@ -3,6 +3,7 @@ from enum import Enum from typing import Any, Optional + def get_discriminator(model: Any, fieldname: str, key: str) -> str: """ Recursively search for the discriminator attribute in a model. @@ -25,31 +26,54 @@ def get_field_discriminator(field: Any) -> Optional[str]: if isinstance(field, dict): if key in field: - return f'{field[key]}' + return f"{field[key]}" if hasattr(field, fieldname): attr = getattr(field, fieldname) if isinstance(attr, Enum): - return f'{attr.value}' - return f'{attr}' + return f"{attr.value}" + return f"{attr}" if hasattr(field, upper_fieldname): attr = getattr(field, upper_fieldname) if isinstance(attr, Enum): - return f'{attr.value}' - return f'{attr}' + return f"{attr.value}" + return f"{attr}" return None + def search_nested_discriminator(obj: Any) -> Optional[str]: + """Recursively search for discriminator in nested structures.""" + # First try direct field lookup + discriminator = get_field_discriminator(obj) + if discriminator is not None: + return discriminator + + # If it's a dict, search in nested values + if isinstance(obj, dict): + for value in obj.values(): + if isinstance(value, list): + # Search in list items + for item in value: + nested_discriminator = search_nested_discriminator(item) + if nested_discriminator is not None: + return nested_discriminator + elif isinstance(value, dict): + # Search in nested dict + nested_discriminator = search_nested_discriminator(value) + if nested_discriminator is not None: + return nested_discriminator + + return None if isinstance(model, list): for field in model: - discriminator = get_field_discriminator(field) + discriminator = search_nested_discriminator(field) if discriminator is not None: return discriminator - discriminator = get_field_discriminator(model) + discriminator = search_nested_discriminator(model) if discriminator is not None: return discriminator - raise ValueError(f'Could not find discriminator field {fieldname} in {model}') + raise ValueError(f"Could not find discriminator field {fieldname} in {model}") diff --git a/gusto_app_int/src/gusto_app_integration/utils/eventstreaming.py b/gusto_app_int/src/gusto_app_integration/utils/eventstreaming.py index 74a63f75..0969899b 100644 --- a/gusto_app_int/src/gusto_app_integration/utils/eventstreaming.py +++ b/gusto_app_int/src/gusto_app_integration/utils/eventstreaming.py @@ -17,6 +17,9 @@ class EventStream(Generic[T]): + # Holds a reference to the SDK client to avoid it being garbage collected + # and cause termination of the underlying httpx client. + client_ref: Optional[object] response: httpx.Response generator: Generator[T, None, None] @@ -25,9 +28,11 @@ def __init__( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + client_ref: Optional[object] = None, ): self.response = response self.generator = stream_events(response, decoder, sentinel) + self.client_ref = client_ref def __iter__(self): return self @@ -43,6 +48,9 @@ def __exit__(self, exc_type, exc_val, exc_tb): class EventStreamAsync(Generic[T]): + # Holds a reference to the SDK client to avoid it being garbage collected + # and cause termination of the underlying httpx client. + client_ref: Optional[object] response: httpx.Response generator: AsyncGenerator[T, None] @@ -51,9 +59,11 @@ def __init__( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + client_ref: Optional[object] = None, ): self.response = response self.generator = stream_events_async(response, decoder, sentinel) + self.client_ref = client_ref def __aiter__(self): return self diff --git a/gusto_app_int/src/gusto_app_integration/utils/forms.py b/gusto_app_int/src/gusto_app_integration/utils/forms.py index 0472aba8..e873495f 100644 --- a/gusto_app_int/src/gusto_app_integration/utils/forms.py +++ b/gusto_app_int/src/gusto_app_integration/utils/forms.py @@ -86,11 +86,39 @@ def _populate_form( return form +def _extract_file_properties(file_obj: Any) -> Tuple[str, Any, Any]: + """Extract file name, content, and content type from a file object.""" + file_fields: Dict[str, FieldInfo] = file_obj.__class__.model_fields + + file_name = "" + content = None + content_type = None + + for file_field_name in file_fields: + file_field = file_fields[file_field_name] + + file_metadata = find_field_metadata(file_field, MultipartFormMetadata) + if file_metadata is None: + continue + + if file_metadata.content: + content = getattr(file_obj, file_field_name, None) + elif file_field_name == "content_type": + content_type = getattr(file_obj, file_field_name, None) + else: + file_name = getattr(file_obj, file_field_name) + + if file_name == "" or content is None: + raise ValueError("invalid multipart/form-data file") + + return file_name, content, content_type + + def serialize_multipart_form( media_type: str, request: Any -) -> Tuple[str, Dict[str, Any], Dict[str, Any]]: +) -> Tuple[str, Dict[str, Any], List[Tuple[str, Any]]]: form: Dict[str, Any] = {} - files: Dict[str, Any] = {} + files: List[Tuple[str, Any]] = [] if not isinstance(request, BaseModel): raise TypeError("invalid request body type") @@ -112,39 +140,32 @@ def serialize_multipart_form( f_name = field.alias if field.alias else name if field_metadata.file: - file_fields: Dict[str, FieldInfo] = val.__class__.model_fields - - file_name = "" - content = None - content_type = None - - for file_field_name in file_fields: - file_field = file_fields[file_field_name] + if isinstance(val, List): + # Handle array of files + for file_obj in val: + if not _is_set(file_obj): + continue + + file_name, content, content_type = _extract_file_properties(file_obj) - file_metadata = find_field_metadata(file_field, MultipartFormMetadata) - if file_metadata is None: - continue + if content_type is not None: + files.append((f_name + "[]", (file_name, content, content_type))) + else: + files.append((f_name + "[]", (file_name, content))) + else: + # Handle single file + file_name, content, content_type = _extract_file_properties(val) - if file_metadata.content: - content = getattr(val, file_field_name, None) - elif file_field_name == "content_type": - content_type = getattr(val, file_field_name, None) + if content_type is not None: + files.append((f_name, (file_name, content, content_type))) else: - file_name = getattr(val, file_field_name) - - if file_name == "" or content is None: - raise ValueError("invalid multipart/form-data file") - - if content_type is not None: - files[f_name] = (file_name, content, content_type) - else: - files[f_name] = (file_name, content) + files.append((f_name, (file_name, content))) elif field_metadata.json: - files[f_name] = ( + files.append((f_name, ( None, marshal_json(val, request_field_types[name]), "application/json", - ) + ))) else: if isinstance(val, List): values = [] diff --git a/gusto_app_int/src/gusto_app_integration/utils/serializers.py b/gusto_app_int/src/gusto_app_integration/utils/serializers.py index 76e44d71..378a14c0 100644 --- a/gusto_app_int/src/gusto_app_integration/utils/serializers.py +++ b/gusto_app_int/src/gusto_app_integration/utils/serializers.py @@ -192,7 +192,9 @@ def is_union(obj: object) -> bool: """ Returns True if the given object is a typing.Union or typing_extensions.Union. """ - return any(obj is typing_obj for typing_obj in _get_typing_objects_by_name_of("Union")) + return any( + obj is typing_obj for typing_obj in _get_typing_objects_by_name_of("Union") + ) def stream_to_text(stream: httpx.Response) -> str: @@ -245,4 +247,3 @@ def _get_typing_objects_by_name_of(name: str) -> Tuple[Any, ...]: f"Neither typing nor typing_extensions has an object called {name!r}" ) return result - diff --git a/gusto_app_int/src/gusto_app_integration/utils/unmarshal_json_response.py b/gusto_app_int/src/gusto_app_integration/utils/unmarshal_json_response.py new file mode 100644 index 00000000..f25a5e56 --- /dev/null +++ b/gusto_app_int/src/gusto_app_integration/utils/unmarshal_json_response.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from typing import Any, Optional + +import httpx + +from .serializers import unmarshal_json +from gusto_app_integration import models + + +def unmarshal_json_response( + typ: Any, http_res: httpx.Response, body: Optional[str] = None +) -> Any: + if body is None: + body = http_res.text + try: + return unmarshal_json(body, typ) + except Exception as e: + raise models.ResponseValidationError( + "Response validation failed", + http_res, + e, + body, + ) from e diff --git a/gusto_app_int/src/gusto_app_integration/webhooks.py b/gusto_app_int/src/gusto_app_integration/webhooks.py index f1aec9aa..c011a4b4 100644 --- a/gusto_app_int/src/gusto_app_integration/webhooks.py +++ b/gusto_app_int/src/gusto_app_integration/webhooks.py @@ -4,6 +4,7 @@ from gusto_app_integration import models, utils from gusto_app_integration._hooks import HookContext from gusto_app_integration.types import OptionalNullable, UNSET +from gusto_app_integration.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -97,6 +98,7 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-webhook-subscription", oauth2_scopes=None, @@ -109,31 +111,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -224,6 +215,7 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-webhook-subscription", oauth2_scopes=None, @@ -236,31 +228,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list_subscriptions( self, @@ -336,6 +317,7 @@ def list_subscriptions( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscriptions", oauth2_scopes=None, @@ -347,26 +329,15 @@ def list_subscriptions( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.WebhookSubscription]) + return unmarshal_json_response(List[models.WebhookSubscription], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_subscriptions_async( self, @@ -442,6 +413,7 @@ async def list_subscriptions_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscriptions", oauth2_scopes=None, @@ -453,26 +425,15 @@ async def list_subscriptions_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.WebhookSubscription]) + return unmarshal_json_response(List[models.WebhookSubscription], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_subscription( self, @@ -564,6 +525,7 @@ def update_subscription( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -576,31 +538,20 @@ def update_subscription( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_subscription_async( self, @@ -692,6 +643,7 @@ async def update_subscription_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -704,31 +656,20 @@ async def update_subscription_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_subscription( self, @@ -808,6 +749,7 @@ def get_subscription( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -819,26 +761,15 @@ def get_subscription( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_subscription_async( self, @@ -918,6 +849,7 @@ async def get_subscription_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -929,26 +861,15 @@ async def get_subscription_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_subscription( self, @@ -1028,6 +949,7 @@ def delete_subscription( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -1042,23 +964,12 @@ def delete_subscription( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_subscription_async( self, @@ -1138,6 +1049,7 @@ async def delete_subscription_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -1152,23 +1064,12 @@ async def delete_subscription_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def verify( self, @@ -1262,6 +1163,7 @@ def verify( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-verify-webhook-subscription-uuid", oauth2_scopes=None, @@ -1274,31 +1176,20 @@ def verify( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def verify_async( self, @@ -1392,6 +1283,7 @@ async def verify_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-verify-webhook-subscription-uuid", oauth2_scopes=None, @@ -1404,31 +1296,20 @@ async def verify_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObject(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def request_verification_token( self, @@ -1508,6 +1389,7 @@ def request_verification_token( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscription-verification-token-uuid", oauth2_scopes=None, @@ -1522,23 +1404,12 @@ def request_verification_token( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def request_verification_token_async( self, @@ -1618,6 +1489,7 @@ async def request_verification_token_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscription-verification-token-uuid", oauth2_scopes=None, @@ -1632,20 +1504,195 @@ async def request_verification_token_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_v1_webhooks_health_check( + self, + *, + security: Union[ + models.GetV1WebhooksHealthCheckSecurity, + models.GetV1WebhooksHealthCheckSecurityTypedDict, + ], + x_gusto_api_version: Optional[ + models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion + ] = models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WebhooksHealthCheckStatus: + r"""Get the webhooks health status + + Returns the health status (`healthy`, `unhealthy`, or `unknown`) of the webhooks system based on the last ten minutes of activity. + + scope: `webhook_subscriptions:read` + + + :param security: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1WebhooksHealthCheckRequest( + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request( + method="GET", + path="/v1/webhooks/health_check", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=utils.get_pydantic_model( + security, models.GetV1WebhooksHealthCheckSecurity + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-webhooks-health_check", + oauth2_scopes=None, + security_source=security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WebhooksHealthCheckStatus, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_webhooks_health_check_async( + self, + *, + security: Union[ + models.GetV1WebhooksHealthCheckSecurity, + models.GetV1WebhooksHealthCheckSecurityTypedDict, + ], + x_gusto_api_version: Optional[ + models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion + ] = models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WebhooksHealthCheckStatus: + r"""Get the webhooks health status + + Returns the health status (`healthy`, `unhealthy`, or `unknown`) of the webhooks system based on the last ten minutes of activity. + + scope: `webhook_subscriptions:read` + + + :param security: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, + request = models.GetV1WebhooksHealthCheckRequest( + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request_async( + method="GET", + path="/v1/webhooks/health_check", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=utils.get_pydantic_model( + security, models.GetV1WebhooksHealthCheckSecurity + ), + timeout_ms=timeout_ms, ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-webhooks-health_check", + oauth2_scopes=None, + security_source=security, + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WebhooksHealthCheckStatus, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/.devcontainer/setup.sh b/gusto_embedded/.devcontainer/setup.sh index ff033980..fd498209 100644 --- a/gusto_embedded/.devcontainer/setup.sh +++ b/gusto_embedded/.devcontainer/setup.sh @@ -7,6 +7,7 @@ curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/instal rmdir samples || true mkdir samples + python -m pip install --upgrade pip pip install -e . diff --git a/gusto_embedded/.gitignore b/gusto_embedded/.gitignore index 32b5e095..58aad17f 100644 --- a/gusto_embedded/.gitignore +++ b/gusto_embedded/.gitignore @@ -1,3 +1,5 @@ +.env +.env.local **/__pycache__/ README-PYPI.md **/.speakeasy/temp/ diff --git a/gusto_embedded/.speakeasy/gen.lock b/gusto_embedded/.speakeasy/gen.lock index d21fc9b7..b0c4133d 100644 --- a/gusto_embedded/.speakeasy/gen.lock +++ b/gusto_embedded/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: f70034eb-4870-4b8d-aeb4-4c71b6c1ec45 management: - docChecksum: f4f6f427918093569260c3d5bae4c757 + docChecksum: d369e50c5ff63d49fa40498b8ab74a16 docVersion: "2024-04-01" - speakeasyVersion: 1.545.0 - generationVersion: 2.599.0 - releaseVersion: 0.3.0 - configChecksum: f554a5d7f81cea188f14c86406f3f0f0 + speakeasyVersion: 1.639.3 + generationVersion: 2.730.5 + releaseVersion: 0.4.0 + configChecksum: b12d76689424c5c0170a5bdc600c0c9d repoURL: https://github.com/Gusto/gusto-python-client.git repoSubDirectory: gusto_embedded installationURL: https://github.com/Gusto/gusto-python-client.git#subdirectory=gusto_embedded @@ -16,21 +16,22 @@ features: additionalDependencies: 1.0.0 additionalProperties: 1.0.1 constsAndDefaults: 1.0.5 - core: 5.18.0 + core: 5.23.0 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 devContainers: 3.0.0 + downloadStreams: 1.0.1 enumUnions: 0.1.0 envVarSecurityUsage: 0.3.2 errorUnions: 1.0.2 flatRequests: 1.0.1 flattening: 3.1.1 getRequestBodies: 3.0.0 - globalSecurity: 3.0.3 + globalSecurity: 3.0.4 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 globalServerURLs: 3.1.1 - groups: 3.0.0 + groups: 3.0.1 inputOutputModels: 3.0.0 methodArguments: 1.0.2 methodSecurity: 3.0.1 @@ -39,16 +40,15 @@ features: nullables: 1.0.1 responseFormat: 1.0.1 retries: 3.0.2 - sdkHooks: 1.0.1 + sdkHooks: 1.1.0 serverIDs: 3.0.0 - unions: 3.0.4 + unions: 3.1.0 uploadStreams: 1.0.0 generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json - .devcontainer/setup.sh - .gitattributes - - .python-version - .vscode/settings.json - USAGE.md - docs/models/accounttype.md @@ -61,6 +61,8 @@ generatedFiles: - docs/models/address.md - docs/models/admin.md - docs/models/agencies.md + - docs/models/aggregation.md + - docs/models/amounttype.md - docs/models/answers.md - docs/models/applicablebenefits.md - docs/models/applicableearnings.md @@ -82,6 +84,8 @@ generatedFiles: - docs/models/benefittyperequirementsdeductaspercentagedefaultvalue.md - docs/models/benefittyperequirementsdefaultvalue.md - docs/models/benefittyperequirementslimitoptiondefaultvalue.md + - docs/models/blockertype.md + - docs/models/blsoccupation.md - docs/models/catchup.md - docs/models/category.md - docs/models/checkdate.md @@ -93,6 +97,8 @@ generatedFiles: - docs/models/companyaddress.md - docs/models/companyattachment.md - docs/models/companybankaccount.md + - docs/models/companybankaccountrequest.md + - docs/models/companybankaccountrequestaccounttype.md - docs/models/companybenefit.md - docs/models/companybenefitwithemployeebenefits.md - docs/models/companybenefitwithemployeebenefitscontribution.md @@ -103,11 +109,13 @@ generatedFiles: - docs/models/companycontributionannualmaximum.md - docs/models/companycustomfield.md - docs/models/companycustomfieldlist.md + - docs/models/companyformssortby.md - docs/models/companyhomeaddress.md - docs/models/companyonboardingstatus.md - docs/models/companypaidtimeoff.md - docs/models/companystatus.md - docs/models/companysuspension.md + - docs/models/companysuspensioncreationerrorserror.md - docs/models/compensation.md - docs/models/compensations.md - docs/models/contractor.md @@ -119,16 +127,29 @@ generatedFiles: - docs/models/contractoronboardingstatusonboardingstatus.md - docs/models/contractoronboardingstatusonboardingstep.md - docs/models/contractorpayment.md + - docs/models/contractorpaymentdetailslist.md + - docs/models/contractorpaymentdetailslistpaymentmethod.md + - docs/models/contractorpaymentdetailslistsplitby.md - docs/models/contractorpaymentforgroup.md - docs/models/contractorpaymentforgrouppaymentmethod.md + - docs/models/contractorpaymentforgrouppreview.md + - docs/models/contractorpaymentforgrouppreviewpaymentmethod.md + - docs/models/contractorpaymentforgrouppreviewstatus.md + - docs/models/contractorpaymentforgrouppreviewwagetype.md - docs/models/contractorpaymentforgroupstatus.md - docs/models/contractorpaymentforgroupwagetype.md - docs/models/contractorpaymentgroup.md - - docs/models/contractorpaymentgroupminimal.md - - docs/models/contractorpaymentgroupminimalstatus.md - - docs/models/contractorpaymentgroupminimaltotals.md + - docs/models/contractorpaymentgrouppartnerdisbursements.md + - docs/models/contractorpaymentgrouppartnerdisbursementspaymentmethod.md + - docs/models/contractorpaymentgrouppartnerdisbursementspaymentstatus.md + - docs/models/contractorpaymentgrouppreview.md + - docs/models/contractorpaymentgrouppreviewstatus.md + - docs/models/contractorpaymentgrouppreviewtotals.md - docs/models/contractorpaymentgroupstatus.md - docs/models/contractorpaymentgrouptotals.md + - docs/models/contractorpaymentgroupwithblockers.md + - docs/models/contractorpaymentgroupwithblockersstatus.md + - docs/models/contractorpaymentgroupwithblockerstotals.md - docs/models/contractorpaymentmethod.md - docs/models/contractorpaymentmethod1.md - docs/models/contractorpaymentmethodsplitby.md @@ -136,6 +157,7 @@ generatedFiles: - docs/models/contractorpaymentpaymentmethod.md - docs/models/contractorpaymentreceipt.md - docs/models/contractorpaymentreceiptlicensee.md + - docs/models/contractorpaymentreceiptpaymentmethod.md - docs/models/contractorpaymentreceipttotals.md - docs/models/contractorpaymentsmodel.md - docs/models/contractorpaymentstatus.md @@ -146,8 +168,10 @@ generatedFiles: - docs/models/contractorpaymentsummarycontractorpayments.md - docs/models/contractorpaymentwagetype.md - docs/models/contractorsmodel.md + - docs/models/contractorssortby.md - docs/models/contractortype.md - docs/models/contribution.md + - docs/models/contributionexclusion.md - docs/models/coverageamount.md - docs/models/coveragesalarymultiplier.md - docs/models/createreport.md @@ -159,14 +183,18 @@ generatedFiles: - docs/models/defaultvalue.md - docs/models/deletecompaniescompanyuuidholidaypaypolicyrequest.md - docs/models/deletedepartmentrequest.md + - docs/models/deletev1companiescompanyidbankaccountsbankaccountidheaderxgustoapiversion.md + - docs/models/deletev1companiescompanyidbankaccountsbankaccountidrequest.md - docs/models/deletev1companiescompanyidcontractorpaymentcontractorpaymentrequest.md - docs/models/deletev1companiescompanyidearningtypesearningtypeuuidrequest.md + - docs/models/deletev1companiescompanyidpayrollsheaderxgustoapiversion.md - docs/models/deletev1companiescompanyidpayrollsrequest.md - docs/models/deletev1companiescompanyuuidsignatoriessignatoryuuidrequest.md - docs/models/deletev1companybenefitscompanybenefitiderrors.md - docs/models/deletev1companybenefitscompanybenefitidrequest.md - docs/models/deletev1companybenefitscompanybenefitidresponsebody.md - docs/models/deletev1compensationscompensationidrequest.md + - docs/models/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md - docs/models/deletev1contractorpaymentgroupscontractorpaymentgroupidrequest.md - docs/models/deletev1contractorscontractoruuidrequest.md - docs/models/deletev1employeebenefitsemployeebenefitidrequest.md @@ -177,23 +205,31 @@ generatedFiles: - docs/models/deletev1employeesemployeeidrehirerequest.md - docs/models/deletev1employeesemployeeidterminationsrequest.md - docs/models/deletev1externalpayrollrequest.md + - docs/models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md - docs/models/deletev1homeaddresseshomeaddressuuidrequest.md - docs/models/deletev1jobsjobidrequest.md + - docs/models/deletev1recurringreimbursementsheaderxgustoapiversion.md + - docs/models/deletev1recurringreimbursementsrequest.md - docs/models/deletev1webhooksubscriptionuuidrequest.md - docs/models/deletev1webhooksubscriptionuuidsecurity.md + - docs/models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md - docs/models/deletev1workaddressesworkaddressuuidrequest.md - docs/models/department.md - docs/models/departmentemployees.md - docs/models/departmentsmodel.md + - docs/models/detailedpaymentaccountsplit.md + - docs/models/disbursements.md - docs/models/document.md - docs/models/documentpdf.md - docs/models/documents.md - docs/models/documentsigned.md - docs/models/documentsignedrecipienttype.md - docs/models/documenttype.md + - docs/models/earnedfastachblockers.md - docs/models/earnings.md - docs/models/earningtype.md - docs/models/earningtypelist.md + - docs/models/einverification.md - docs/models/employee.md - docs/models/employeeaddress.md - docs/models/employeebankaccount.md @@ -207,19 +243,30 @@ generatedFiles: - docs/models/employeebenefitvalue.md - docs/models/employeechecknumbermapping.md - docs/models/employeecompensations.md + - docs/models/employeecurrentemploymentstatus.md - docs/models/employeecustomfield.md - docs/models/employeededuction.md - docs/models/employeefederaltax.md + - docs/models/employeehomeaddress.md - docs/models/employeeonboardingdocument.md + - docs/models/employeeonboardingdocumentsconfig.md - docs/models/employeeonboardingstatus.md + - docs/models/employeeonboardingstatus1.md - docs/models/employeeonboardingstatusonboardingstep.md + - docs/models/employeepaymentdetail.md + - docs/models/employeepaymentdetailpaymentmethod.md - docs/models/employeepaymentmethod.md + - docs/models/employeepaymentmethod1.md + - docs/models/employeepaymentmethodsplitby.md - docs/models/employeepaymentmethodtype.md - docs/models/employeepaystubslist.md + - docs/models/employeepaystubslistpaymentmethod.md - docs/models/employeesmodel.md - - docs/models/employeestatetax.md - docs/models/employeestatetaxanswer.md - docs/models/employeestatetaxes.md + - docs/models/employeestatetaxeslist.md + - docs/models/employeestatetaxesrequest.md + - docs/models/employeestatetaxesrequestvalue.md - docs/models/employeestatetaxinputquestionformat.md - docs/models/employeestatetaxinputquestionformatvalue.md - docs/models/employeestatetaxquestion.md @@ -232,10 +279,10 @@ generatedFiles: - docs/models/entitytype.md - docs/models/errors.md - docs/models/event.md + - docs/models/experiencelevel.md - docs/models/externalpayroll.md - docs/models/externalpayrollbasic.md - docs/models/externalpayrollbasicstatus.md - - docs/models/externalpayrollbenefits.md - docs/models/externalpayrollitems.md - docs/models/externalpayrollmetadata.md - docs/models/externalpayrolltaxes.md @@ -243,6 +290,7 @@ generatedFiles: - docs/models/fastpaymentlimitrequiredbody.md - docs/models/federalholidays.md - docs/models/federaltaxdetails.md + - docs/models/federaltaxdetailsstatus.md - docs/models/fields.md - docs/models/filetype.md - docs/models/filingform.md @@ -259,6 +307,7 @@ generatedFiles: - docs/models/garnishment.md - docs/models/garnishmentchildsupport.md - docs/models/garnishmenttype.md + - docs/models/generalledgerreport.md - docs/models/generateddocument.md - docs/models/generateddocumentstatus.md - docs/models/getachtransactionsrequest.md @@ -273,10 +322,13 @@ generatedFiles: - docs/models/getcompaniescompanyuuidpaidholidaysrequest.md - docs/models/getcompaniescompanyuuidpaidholidaysrequestbody.md - docs/models/getcompaniescompanyuuidreporttemplatesreporttyperequest.md + - docs/models/getcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md - docs/models/getcompaniescompanyuuidsuspensionsrequest.md - docs/models/getcompaniescompanyuuidtimeoffpoliciesrequest.md - docs/models/getcompaniescompanyuuidwireinrequestuuidrequest.md - docs/models/getcompaniesdepartmentsrequest.md + - docs/models/getcompanynotificationsheaderxgustoapiversion.md + - docs/models/getcompanynotificationsrequest.md - docs/models/getdepartmentrequest.md - docs/models/getemployeeytdbenefitamountsfromdifferentcompanyrequest.md - docs/models/geteventsrequest.md @@ -286,7 +338,7 @@ generatedFiles: - docs/models/getinvoicesinvoiceperiodsecurity.md - docs/models/getnotificationsnotificationuuidrequest.md - docs/models/getrecoverycasesrequest.md - - docs/models/getreportsreportuuidrequest.md + - docs/models/getreportsrequestuuidrequest.md - docs/models/gettimeoffpoliciestimeoffpolicyuuidrequest.md - docs/models/getv1benefitsbenefitidrequest.md - docs/models/getv1benefitsbenefitsidrequirementsrequest.md @@ -297,20 +349,29 @@ generatedFiles: - docs/models/getv1companiesattachmenturlrequest.md - docs/models/getv1companiesattachmenturlresponsebody.md - docs/models/getv1companiescompanyidadminsrequest.md + - docs/models/getv1companiescompanyidbankaccountsheaderxgustoapiversion.md - docs/models/getv1companiescompanyidbankaccountsrequest.md - docs/models/getv1companiescompanyidcompanybenefitsrequest.md - docs/models/getv1companiescompanyidcontractorpaymentcontractorpaymentrequest.md + - docs/models/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md - docs/models/getv1companiescompanyidcontractorpaymentgroupsrequest.md - docs/models/getv1companiescompanyidcontractorpaymentsrequest.md - docs/models/getv1companiescompanyidcontractorpaymentsresponsebody.md + - docs/models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md + - docs/models/getv1companiescompanyidcontractorspaymentdetailsrequest.md - docs/models/getv1companiescompanyidcustomfieldsrequest.md - docs/models/getv1companiescompanyidearningtypesrequest.md - docs/models/getv1companiescompanyidemployeesheaderxgustoapiversion.md + - docs/models/getv1companiescompanyidemployeespaymentdetailsrequest.md - docs/models/getv1companiescompanyidemployeesrequest.md - docs/models/getv1companiescompanyidfederaltaxdetailsrequest.md - docs/models/getv1companiescompanyidlocationsrequest.md - docs/models/getv1companiescompanyidpayperiodsrequest.md - docs/models/getv1companiescompanyidpayrollreversalsrequest.md + - docs/models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md + - docs/models/getv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md + - docs/models/getv1companiescompanyidpayrollsidpartnerdisbursementsrequest.md + - docs/models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md - docs/models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md - docs/models/getv1companiescompanyidpayrollspayrollidrequest.md - docs/models/getv1companiescompanyidpayrollsqueryparaminclude.md @@ -327,6 +388,7 @@ generatedFiles: - docs/models/getv1companiescompanyuuidtaxrequirementsstaterequest.md - docs/models/getv1companiespayrollblockerscompanyuuidrequest.md - docs/models/getv1companiesrequest.md + - docs/models/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md - docs/models/getv1companybenefitscompanybenefitidemployeebenefitsrequest.md - docs/models/getv1companybenefitscompanybenefitidrequest.md - docs/models/getv1companyexternalpayrollsrequest.md @@ -344,7 +406,10 @@ generatedFiles: - docs/models/getv1contractorformpdfrequest.md - docs/models/getv1contractorformrequest.md - docs/models/getv1contractorformsrequest.md + - docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md - docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md + - docs/models/getv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md + - docs/models/getv1contractorpaymentgroupsidpartnerdisbursementsrequest.md - docs/models/getv1contractorpaymentscontractorpaymentuuidfundrequest.md - docs/models/getv1contractorpaymentscontractorpaymentuuidreceiptrequest.md - docs/models/getv1contractorscontractoruuidaddressrequest.md @@ -364,6 +429,7 @@ generatedFiles: - docs/models/getv1employeesemployeeidemploymenthistoryrequest.md - docs/models/getv1employeesemployeeidfederaltaxesrequest.md - docs/models/getv1employeesemployeeidgarnishmentsrequest.md + - docs/models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md - docs/models/getv1employeesemployeeidhomeaddressesrequest.md - docs/models/getv1employeesemployeeidi9authorizationdocumentoptionsrequest.md - docs/models/getv1employeesemployeeidi9authorizationdocumentsrequest.md @@ -373,9 +439,14 @@ generatedFiles: - docs/models/getv1employeesemployeeidonboardingstatusheaderxgustoapiversion.md - docs/models/getv1employeesemployeeidonboardingstatusrequest.md - docs/models/getv1employeesemployeeidpaymentmethodrequest.md + - docs/models/getv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md + - docs/models/getv1employeesemployeeidrecurringreimbursementsrequest.md + - docs/models/getv1employeesemployeeidrecurringreimbursementsresponsebody.md - docs/models/getv1employeesemployeeidrehirerequest.md + - docs/models/getv1employeesemployeeidstatetaxesheaderxgustoapiversion.md - docs/models/getv1employeesemployeeidstatetaxesrequest.md - docs/models/getv1employeesemployeeidterminationsrequest.md + - docs/models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md - docs/models/getv1employeesemployeeidworkaddressesrequest.md - docs/models/getv1employeesemployeeuuidpaystubsheaderxgustoapiversion.md - docs/models/getv1employeesemployeeuuidpaystubsrequest.md @@ -386,6 +457,7 @@ generatedFiles: - docs/models/getv1garnishmentschildsupportrequest.md - docs/models/getv1garnishmentsgarnishmentidrequest.md - docs/models/getv1generateddocumentsdocumenttyperequestuuidrequest.md + - docs/models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md - docs/models/getv1homeaddresseshomeaddressuuidrequest.md - docs/models/getv1jobsjobidcompensationsqueryparaminclude.md - docs/models/getv1jobsjobidcompensationsrequest.md @@ -394,19 +466,32 @@ generatedFiles: - docs/models/getv1locationslocationidrequest.md - docs/models/getv1locationslocationuuidminimumwagesheaderxgustoapiversion.md - docs/models/getv1locationslocationuuidminimumwagesrequest.md + - docs/models/getv1paymentreceiptspayrollspayrolluuidheaderxgustoapiversion.md - docs/models/getv1paymentreceiptspayrollspayrolluuidrequest.md - docs/models/getv1payrollspayrolluuidemployeesemployeeuuidpaystubheaderxgustoapiversion.md - docs/models/getv1payrollspayrolluuidemployeesemployeeuuidpaystubrequest.md + - docs/models/getv1recurringreimbursementsheaderxgustoapiversion.md + - docs/models/getv1recurringreimbursementsrequest.md + - docs/models/getv1recurringreimbursementsresponsebody.md + - docs/models/getv1salaryestimatesidheaderxgustoapiversion.md + - docs/models/getv1salaryestimatesidrequest.md + - docs/models/getv1salaryestimatesoccupationsheaderxgustoapiversion.md + - docs/models/getv1salaryestimatesoccupationsrequest.md + - docs/models/getv1salaryestimatesoccupationssecurity.md - docs/models/getv1taxliabilitiesrequest.md - docs/models/getv1tokeninforequest.md - docs/models/getv1tokeninforesponsebody.md - docs/models/getv1tokeninfotype.md + - docs/models/getv1webhookshealthcheckheaderxgustoapiversion.md + - docs/models/getv1webhookshealthcheckrequest.md + - docs/models/getv1webhookshealthchecksecurity.md - docs/models/getv1webhooksubscriptionsrequest.md - docs/models/getv1webhooksubscriptionssecurity.md - docs/models/getv1webhooksubscriptionuuidrequest.md - docs/models/getv1webhooksubscriptionuuidsecurity.md - docs/models/getv1webhooksubscriptionverificationtokenuuidrequest.md - docs/models/getv1webhooksubscriptionverificationtokenuuidsecurity.md + - docs/models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md - docs/models/getv1workaddressesworkaddressuuidrequest.md - docs/models/getversionemployeestimeoffactivitiesrequest.md - docs/models/getwireinrequestswireinrequestuuidrequest.md @@ -434,6 +519,7 @@ generatedFiles: - docs/models/informationrequest.md - docs/models/informationrequeststatus.md - docs/models/informationrequesttype.md + - docs/models/integrationtype.md - docs/models/invoicedata.md - docs/models/job.md - docs/models/juneteenth.md @@ -454,8 +540,11 @@ generatedFiles: - docs/models/mlkday.md - docs/models/name.md - docs/models/newyearsday.md + - docs/models/notfounderrorobject.md - docs/models/notification.md + - docs/models/notificationentitytype.md - docs/models/notificationstatus.md + - docs/models/occupations.md - docs/models/offcyclereason.md - docs/models/offcyclereasontype.md - docs/models/onboardingdocumentsconfig.md @@ -466,6 +555,18 @@ generatedFiles: - docs/models/pages.md - docs/models/paidholidays.md - docs/models/paidtimeoff.md + - docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsdisbursements.md + - docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md + - docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementspaymentmethod.md + - docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementspaymentstatus.md + - docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsrequest.md + - docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsrequestbody.md + - docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsdisbursements.md + - docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md + - docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementspaymentmethod.md + - docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementspaymentstatus.md + - docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsrequest.md + - docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsrequestbody.md - docs/models/paymentconfigs.md - docs/models/paymentdirection.md - docs/models/paymenteventtype.md @@ -475,8 +576,8 @@ generatedFiles: - docs/models/paymentspeedparam.md - docs/models/paymentspeedrequiredbody.md - docs/models/paymentstatus.md + - docs/models/paymenttype.md - docs/models/paymentunit.md - - docs/models/paymentuuid.md - docs/models/payperiod.md - docs/models/payperiodpayroll.md - docs/models/payperiods.md @@ -495,22 +596,46 @@ generatedFiles: - docs/models/payrollemployeecompensationstypepaidtimeoff.md - docs/models/payrollemployeecompensationstypepaymentmethod.md - docs/models/payrollfixedcompensationtypestype.md - - docs/models/payrollminimal.md + - docs/models/payrollpartnerdisbursements.md + - docs/models/payrollpartnerdisbursementsdisbursements.md + - docs/models/payrollpartnerdisbursementspaymentmethod.md + - docs/models/payrollpartnerdisbursementspaymentstatus.md - docs/models/payrollpaymentspeedchangedtype.md - docs/models/payrollpayperiodtype.md - docs/models/payrollpayrollstatusmetatype.md - docs/models/payrollprepared.md + - docs/models/payrollpreparesortby.md - docs/models/payrollprocessingrequest.md - docs/models/payrollprocessingrequeststatus.md - docs/models/payrollreceipt.md - - docs/models/payrollreceipttaxes.md + - docs/models/payrollreceiptemployeecompensations.md + - docs/models/payrollreceiptpaymentmethod.md - docs/models/payrollreversal.md + - docs/models/payrollshow.md + - docs/models/payrollshowamounttype.md + - docs/models/payrollshowbenefits.md + - docs/models/payrollshowdeductions.md + - docs/models/payrollshowfixedcompensations.md + - docs/models/payrollshowhourlycompensations.md + - docs/models/payrollshowpaidtimeoff.md + - docs/models/payrollshowpaymentmethod.md + - docs/models/payrollshowreimbursements.md + - docs/models/payrollshowtaxes.md - docs/models/payrollsubmissionblockerstype.md - docs/models/payrollsubmissionblockerstypemetadata.md - docs/models/payrollsubmissionblockerstypestatus.md + - docs/models/payrolltaxestype.md - docs/models/payrolltotalstype.md - docs/models/payrolltype.md - docs/models/payrolltypes.md + - docs/models/payrollupdate.md + - docs/models/payrollupdateamounttype.md + - docs/models/payrollupdatedeductions.md + - docs/models/payrollupdateemployeecompensations.md + - docs/models/payrollupdatefixedcompensations.md + - docs/models/payrollupdatehourlycompensations.md + - docs/models/payrollupdatepaidtimeoff.md + - docs/models/payrollupdatepaymentmethod.md - docs/models/payrollwithholdingpayperiodtype.md - docs/models/payscheduleassignment.md - docs/models/payscheduleassignmentbody.md @@ -548,6 +673,7 @@ generatedFiles: - docs/models/postcompaniescompanyuuidreportspaymentmethod.md - docs/models/postcompaniescompanyuuidreportsrequest.md - docs/models/postcompaniescompanyuuidreportsrequestbody.md + - docs/models/postcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md - docs/models/postcompaniescompanyuuidsuspensionsreconciletaxmethod.md - docs/models/postcompaniescompanyuuidsuspensionsrequest.md - docs/models/postcompaniescompanyuuidsuspensionsrequestbody.md @@ -571,20 +697,25 @@ generatedFiles: - docs/models/postpayrollsgrossuppayrolluuidrequest.md - docs/models/postpayrollsgrossuppayrolluuidrequestbody.md - docs/models/postpayrollsgrossuppayrolluuidresponsebody.md + - docs/models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md + - docs/models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md + - docs/models/postpayrollspayrolluuidreportsgeneralledgerrequest.md + - docs/models/postpayrollspayrolluuidreportsgeneralledgerrequestbody.md - docs/models/postv1companiesattachmentcategory.md - docs/models/postv1companiesattachmentdocument.md - docs/models/postv1companiesattachmentrequest.md - docs/models/postv1companiesattachmentrequestbody.md - docs/models/postv1companiescompanyidadminsrequest.md - docs/models/postv1companiescompanyidadminsrequestbody.md - - docs/models/postv1companiescompanyidbankaccountsaccounttype.md + - docs/models/postv1companiescompanyidbankaccountsheaderxgustoapiversion.md - docs/models/postv1companiescompanyidbankaccountsrequest.md - - docs/models/postv1companiescompanyidbankaccountsrequestbody.md - docs/models/postv1companiescompanyidcompanybenefitsrequest.md - docs/models/postv1companiescompanyidcompanybenefitsrequestbody.md - docs/models/postv1companiescompanyidcontractorpaymentgroupscontractorpayments.md + - docs/models/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md - docs/models/postv1companiescompanyidcontractorpaymentgroupspaymentmethod.md - docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md + - docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.md - docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md - docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md - docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md @@ -597,8 +728,10 @@ generatedFiles: - docs/models/postv1companiescompanyidearningtypesrequestbody.md - docs/models/postv1companiescompanyidlocationsrequest.md - docs/models/postv1companiescompanyidlocationsrequestbody.md + - docs/models/postv1companiescompanyidpayrollsheaderxgustoapiversion.md - docs/models/postv1companiescompanyidpayrollsrequest.md - docs/models/postv1companiescompanyidpayrollsrequestbody.md + - docs/models/postv1companiescompanyidpayrollswithholdingpayperiod.md - docs/models/postv1companiescompanyidpayschedulesassignmentpreviewrequest.md - docs/models/postv1companiescompanyidpayschedulesassignrequest.md - docs/models/postv1companiescompanyidpayschedulesrequest.md @@ -636,11 +769,22 @@ generatedFiles: - docs/models/postv1employeesemployeeidgarnishmentsgarnishmenttype.md - docs/models/postv1employeesemployeeidgarnishmentsrequest.md - docs/models/postv1employeesemployeeidgarnishmentsrequestbody.md + - docs/models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md - docs/models/postv1employeesemployeeidhomeaddressesrequest.md - docs/models/postv1employeesemployeeidhomeaddressesrequestbody.md + - docs/models/postv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md + - docs/models/postv1employeesemployeeidrecurringreimbursementsrequest.md + - docs/models/postv1employeesemployeeidrecurringreimbursementsrequestbody.md + - docs/models/postv1employeesemployeeidrecurringreimbursementsresponsebody.md - docs/models/postv1employeesemployeeidrehirerequest.md + - docs/models/postv1employeesemployeeidsalaryestimatesexperiencelevel.md + - docs/models/postv1employeesemployeeidsalaryestimatesheaderxgustoapiversion.md + - docs/models/postv1employeesemployeeidsalaryestimatesoccupations.md + - docs/models/postv1employeesemployeeidsalaryestimatesrequest.md + - docs/models/postv1employeesemployeeidsalaryestimatesrequestbody.md - docs/models/postv1employeesemployeeidterminationsrequest.md - docs/models/postv1employeesemployeeidterminationsrequestbody.md + - docs/models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md - docs/models/postv1employeesemployeeidworkaddressesrequest.md - docs/models/postv1employeesemployeeidworkaddressesrequestbody.md - docs/models/postv1employeesheaderxgustoapiversion.md @@ -663,6 +807,9 @@ generatedFiles: - docs/models/postv1plaidprocessortokenrequest.md - docs/models/postv1plaidprocessortokenrequestbody.md - docs/models/postv1plaidprocessortokenresponsebody.md + - docs/models/postv1salaryestimatesuuidacceptheaderxgustoapiversion.md + - docs/models/postv1salaryestimatesuuidacceptrequest.md + - docs/models/postv1salaryestimatesuuidacceptrequestbody.md - docs/models/postv1sandboxgenerate1099request.md - docs/models/postv1sandboxgenerate1099requestbody.md - docs/models/postv1sandboxgeneratew2form.md @@ -716,20 +863,15 @@ generatedFiles: - docs/models/putv1companiescompanyidearningtypesearningtypeuuidrequestbody.md - docs/models/putv1companiescompanyidfederaltaxdetailsrequest.md - docs/models/putv1companiescompanyidfederaltaxdetailsrequestbody.md - - docs/models/putv1companiescompanyidpayrollsemployeecompensations.md - - docs/models/putv1companiescompanyidpayrollsfixedcompensations.md - - docs/models/putv1companiescompanyidpayrollshourlycompensations.md - - docs/models/putv1companiescompanyidpayrollspaidtimeoff.md - - docs/models/putv1companiescompanyidpayrollspaymentmethod.md + - docs/models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md - docs/models/putv1companiescompanyidpayrollspayrollidcalculaterequest.md - docs/models/putv1companiescompanyidpayrollspayrollidcalculateresponsebody.md - docs/models/putv1companiescompanyidpayrollspayrollidpreparerequest.md + - docs/models/putv1companiescompanyidpayrollspayrollidpreparerequestbody.md - docs/models/putv1companiescompanyidpayrollspayrollidsubmitrequest.md - docs/models/putv1companiescompanyidpayrollspayrollidsubmitrequestbody.md - docs/models/putv1companiescompanyidpayrollspayrollidsubmitresponsebody.md - docs/models/putv1companiescompanyidpayrollsrequest.md - - docs/models/putv1companiescompanyidpayrollsrequestbody.md - - docs/models/putv1companiescompanyidpayrollswithholdingpayperiod.md - docs/models/putv1companiescompanyidpayschedulespayscheduleidfrequency.md - docs/models/putv1companiescompanyidpayschedulespayscheduleidrequest.md - docs/models/putv1companiescompanyidpayschedulespayscheduleidrequestbody.md @@ -741,6 +883,8 @@ generatedFiles: - docs/models/putv1companiescompanyuuidtaxrequirementsstaterequirements.md - docs/models/putv1companiesrequest.md - docs/models/putv1companiesrequestbody.md + - docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md + - docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md - docs/models/putv1companybenefitscompanybenefitidemployeebenefitsrequest.md - docs/models/putv1companybenefitscompanybenefitidemployeebenefitsrequestbody.md - docs/models/putv1companybenefitscompanybenefitidrequest.md @@ -758,6 +902,7 @@ generatedFiles: - docs/models/putv1contractordocumentsignfields.md - docs/models/putv1contractordocumentsignrequest.md - docs/models/putv1contractordocumentsignrequestbody.md + - docs/models/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.md - docs/models/putv1contractorpaymentgroupscontractorpaymentgroupidfundrequest.md - docs/models/putv1contractorscontractoridpaymentmethodrequest.md - docs/models/putv1contractorscontractoridpaymentmethodrequestbody.md @@ -803,13 +948,14 @@ generatedFiles: - docs/models/putv1employeesemployeeidpaymentmethodrequest.md - docs/models/putv1employeesemployeeidpaymentmethodrequestbody.md - docs/models/putv1employeesemployeeidpaymentmethodsplitby.md + - docs/models/putv1employeesemployeeidpaymentmethodsplits.md - docs/models/putv1employeesemployeeidpaymentmethodtype.md - docs/models/putv1employeesemployeeidrehireemploymentstatus.md - docs/models/putv1employeesemployeeidrehirerequest.md - docs/models/putv1employeesemployeeidrehirerequestbody.md + - docs/models/putv1employeesemployeeidstatetaxesheaderxgustoapiversion.md - docs/models/putv1employeesemployeeidstatetaxesrequest.md - - docs/models/putv1employeesemployeeidstatetaxesrequestbody.md - - docs/models/putv1employeesemployeeidstatetaxesvalue.md + - docs/models/putv1employeesheaderxgustoapiversion.md - docs/models/putv1employeesrequest.md - docs/models/putv1employeesrequestbody.md - docs/models/putv1externalpayrollbenefits.md @@ -828,6 +974,7 @@ generatedFiles: - docs/models/putv1historicalemployeesrequestbody.md - docs/models/putv1historicalemployeestermination.md - docs/models/putv1historicalemployeesworkaddress.md + - docs/models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md - docs/models/putv1homeaddresseshomeaddressuuidrequest.md - docs/models/putv1homeaddresseshomeaddressuuidrequestbody.md - docs/models/putv1jobsjobidrequest.md @@ -837,6 +984,15 @@ generatedFiles: - docs/models/putv1partnermanagedcompaniescompanyuuidmigraterequest.md - docs/models/putv1partnermanagedcompaniescompanyuuidmigraterequestbody.md - docs/models/putv1partnermanagedcompaniescompanyuuidmigrateresponsebody.md + - docs/models/putv1recurringreimbursementsheaderxgustoapiversion.md + - docs/models/putv1recurringreimbursementsrequest.md + - docs/models/putv1recurringreimbursementsrequestbody.md + - docs/models/putv1recurringreimbursementsresponsebody.md + - docs/models/putv1salaryestimatesidexperiencelevel.md + - docs/models/putv1salaryestimatesidheaderxgustoapiversion.md + - docs/models/putv1salaryestimatesidoccupations.md + - docs/models/putv1salaryestimatesidrequest.md + - docs/models/putv1salaryestimatesidrequestbody.md - docs/models/putv1taxliabilitiesfinishrequest.md - docs/models/putv1taxliabilitiesrequest.md - docs/models/putv1taxliabilitiesrequestbody.md @@ -853,6 +1009,7 @@ generatedFiles: - docs/models/putv1webhooksubscriptionuuidrequestbody.md - docs/models/putv1webhooksubscriptionuuidsecurity.md - docs/models/putv1webhooksubscriptionuuidsubscriptiontypes.md + - docs/models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md - docs/models/putv1workaddressesworkaddressuuidrequest.md - docs/models/putv1workaddressesworkaddressuuidrequestbody.md - docs/models/putversiontimeoffpoliciestimeoffpolicyuuidaddemployeesemployees.md @@ -865,6 +1022,8 @@ generatedFiles: - docs/models/putwireinrequestswireinrequestuuidrequestbody.md - docs/models/queryparamfrequency.md - docs/models/queryparaminclude.md + - docs/models/queryparamsortorder.md + - docs/models/queryparamstatus.md - docs/models/questions.md - docs/models/ratetype.md - docs/models/reason.md @@ -878,6 +1037,7 @@ generatedFiles: - docs/models/rehire.md - docs/models/rehirebody.md - docs/models/rehireemploymentstatus.md + - docs/models/reimbursementsmodel.md - docs/models/report.md - docs/models/reporttemplate.md - docs/models/requiredattributes.md @@ -888,10 +1048,13 @@ generatedFiles: - docs/models/resources.md - docs/models/resourcetype.md - docs/models/responsebody.md + - docs/models/salaryestimate.md - docs/models/schema.md - docs/models/section.md - docs/models/security.md + - docs/models/showemployees.md - docs/models/signatory.md + - docs/models/sortby.md - docs/models/sortorder.md - docs/models/source.md - docs/models/splitby.md @@ -929,7 +1092,7 @@ generatedFiles: - docs/models/two.md - docs/models/type.md - docs/models/unblockoptions.md - - docs/models/unprocessableentityerrorobjecterror.md + - docs/models/unprocessableentityerrorobject.md - docs/models/unprocessedterminationpayperiod.md - docs/models/user.md - docs/models/utils/retryconfig.md @@ -943,6 +1106,8 @@ generatedFiles: - docs/models/veteransday.md - docs/models/w4datatype.md - docs/models/wagetype.md + - docs/models/webhookshealthcheckstatus.md + - docs/models/webhookshealthcheckstatusstatus.md - docs/models/webhooksubscription.md - docs/models/webhooksubscriptionstatus.md - docs/models/wireinrequest.md @@ -981,7 +1146,6 @@ generatedFiles: - docs/sdks/flows/README.md - docs/sdks/garnishments/README.md - docs/sdks/generateddocuments/README.md - - docs/sdks/gusto/README.md - docs/sdks/historicalemployees/README.md - docs/sdks/holidaypaypolicies/README.md - docs/sdks/i9verification/README.md @@ -996,7 +1160,9 @@ generatedFiles: - docs/sdks/payrolls/README.md - docs/sdks/payschedules/README.md - docs/sdks/recoverycases/README.md + - docs/sdks/reimbursements/README.md - docs/sdks/reports/README.md + - docs/sdks/salaryestimates/README.md - docs/sdks/signatories/README.md - docs/sdks/suspensions/README.md - docs/sdks/taxrequirements/README.md @@ -1064,34 +1230,45 @@ generatedFiles: - src/gusto_embedded/models/authentication.py - src/gusto_embedded/models/benefit_summary.py - src/gusto_embedded/models/benefit_type_requirements.py + - src/gusto_embedded/models/bls_occupation.py - src/gusto_embedded/models/child_support_data.py - src/gusto_embedded/models/company.py - src/gusto_embedded/models/company_address.py - src/gusto_embedded/models/company_attachment.py - src/gusto_embedded/models/company_bank_account.py + - src/gusto_embedded/models/company_bank_account_request.py - src/gusto_embedded/models/company_benefit.py - src/gusto_embedded/models/company_benefit_with_employee_benefits.py - src/gusto_embedded/models/company_custom_field.py - src/gusto_embedded/models/company_custom_field_list.py + - src/gusto_embedded/models/company_forms_sort_by.py - src/gusto_embedded/models/company_onboarding_status.py - src/gusto_embedded/models/company_suspension.py + - src/gusto_embedded/models/company_suspension_creation_errors_error.py - src/gusto_embedded/models/compensation.py - src/gusto_embedded/models/contractor.py - src/gusto_embedded/models/contractor_address.py - src/gusto_embedded/models/contractor_bank_account.py - src/gusto_embedded/models/contractor_onboarding_status.py - src/gusto_embedded/models/contractor_payment.py + - src/gusto_embedded/models/contractor_payment_details_list.py - src/gusto_embedded/models/contractor_payment_for_group.py + - src/gusto_embedded/models/contractor_payment_for_group_preview.py - src/gusto_embedded/models/contractor_payment_group.py - - src/gusto_embedded/models/contractor_payment_group_minimal.py + - src/gusto_embedded/models/contractor_payment_group_partner_disbursements.py + - src/gusto_embedded/models/contractor_payment_group_preview.py + - src/gusto_embedded/models/contractor_payment_group_with_blockers.py - src/gusto_embedded/models/contractor_payment_method.py - src/gusto_embedded/models/contractor_payment_receipt.py - src/gusto_embedded/models/contractor_payment_summary.py - src/gusto_embedded/models/contractor_payment_summary_by_dates.py + - src/gusto_embedded/models/contractors_sort_by.py + - src/gusto_embedded/models/contribution_exclusion.py - src/gusto_embedded/models/create_report.py - src/gusto_embedded/models/custom_field_type.py - src/gusto_embedded/models/delete_companies_company_uuid_holiday_pay_policyop.py - src/gusto_embedded/models/delete_departmentop.py + - src/gusto_embedded/models/delete_v1_companies_company_id_bank_accounts_bank_account_idop.py - src/gusto_embedded/models/delete_v1_companies_company_id_contractor_payment_contractor_paymentop.py - src/gusto_embedded/models/delete_v1_companies_company_id_earning_types_earning_type_uuidop.py - src/gusto_embedded/models/delete_v1_companies_company_id_payrollsop.py @@ -1109,9 +1286,11 @@ generatedFiles: - src/gusto_embedded/models/delete_v1_external_payrollop.py - src/gusto_embedded/models/delete_v1_home_addresses_home_address_uuidop.py - src/gusto_embedded/models/delete_v1_jobs_job_idop.py + - src/gusto_embedded/models/delete_v1_recurring_reimbursementsop.py - src/gusto_embedded/models/delete_v1_webhook_subscription_uuidop.py - src/gusto_embedded/models/delete_v1_work_addresses_work_address_uuidop.py - src/gusto_embedded/models/department.py + - src/gusto_embedded/models/detailedpaymentaccountsplit.py - src/gusto_embedded/models/document.py - src/gusto_embedded/models/document_pdf.py - src/gusto_embedded/models/document_signed.py @@ -1125,15 +1304,18 @@ generatedFiles: - src/gusto_embedded/models/employee_benefit_for_company_benefit.py - src/gusto_embedded/models/employee_custom_field.py - src/gusto_embedded/models/employee_federal_tax.py + - src/gusto_embedded/models/employee_home_address.py - src/gusto_embedded/models/employee_onboarding_document.py - src/gusto_embedded/models/employee_onboarding_status.py - src/gusto_embedded/models/employee_pay_stubs_list.py - src/gusto_embedded/models/employee_payment_method.py - - src/gusto_embedded/models/employee_state_tax.py - src/gusto_embedded/models/employee_state_tax_answer.py - src/gusto_embedded/models/employee_state_tax_input_question_format.py - src/gusto_embedded/models/employee_state_tax_question.py + - src/gusto_embedded/models/employee_state_taxes_list.py + - src/gusto_embedded/models/employee_state_taxes_request.py - src/gusto_embedded/models/employee_work_address.py + - src/gusto_embedded/models/employeepaymentdetail.py - src/gusto_embedded/models/employment_history_list.py - src/gusto_embedded/models/entity_error_object.py - src/gusto_embedded/models/event.py @@ -1149,6 +1331,7 @@ generatedFiles: - src/gusto_embedded/models/form_pdf.py - src/gusto_embedded/models/garnishment.py - src/gusto_embedded/models/garnishment_child_support.py + - src/gusto_embedded/models/general_ledger_report.py - src/gusto_embedded/models/generated_document.py - src/gusto_embedded/models/get_ach_transactionsop.py - src/gusto_embedded/models/get_companies_company_uuid_contractor_payments_previewop.py @@ -1159,6 +1342,7 @@ generatedFiles: - src/gusto_embedded/models/get_companies_company_uuid_time_off_policiesop.py - src/gusto_embedded/models/get_companies_company_uuid_wire_in_request_uuidop.py - src/gusto_embedded/models/get_companies_departmentsop.py + - src/gusto_embedded/models/get_company_notificationsop.py - src/gusto_embedded/models/get_departmentop.py - src/gusto_embedded/models/get_employee_ytd_benefit_amounts_from_different_companyop.py - src/gusto_embedded/models/get_eventsop.py @@ -1166,7 +1350,7 @@ generatedFiles: - src/gusto_embedded/models/get_invoices_invoice_periodop.py - src/gusto_embedded/models/get_notifications_notification_uuidop.py - src/gusto_embedded/models/get_recovery_casesop.py - - src/gusto_embedded/models/get_reports_report_uuidop.py + - src/gusto_embedded/models/get_reports_request_uuidop.py - src/gusto_embedded/models/get_time_off_policies_time_off_policy_uuidop.py - src/gusto_embedded/models/get_v1_benefits_benefit_idop.py - src/gusto_embedded/models/get_v1_benefits_benefits_id_requirementsop.py @@ -1181,8 +1365,10 @@ generatedFiles: - src/gusto_embedded/models/get_v1_companies_company_id_contractor_payment_contractor_paymentop.py - src/gusto_embedded/models/get_v1_companies_company_id_contractor_payment_groupsop.py - src/gusto_embedded/models/get_v1_companies_company_id_contractor_paymentsop.py + - src/gusto_embedded/models/get_v1_companies_company_id_contractors_payment_detailsop.py - src/gusto_embedded/models/get_v1_companies_company_id_custom_fieldsop.py - src/gusto_embedded/models/get_v1_companies_company_id_earning_typesop.py + - src/gusto_embedded/models/get_v1_companies_company_id_employees_payment_detailsop.py - src/gusto_embedded/models/get_v1_companies_company_id_employeesop.py - src/gusto_embedded/models/get_v1_companies_company_id_federal_tax_detailsop.py - src/gusto_embedded/models/get_v1_companies_company_id_locationsop.py @@ -1192,6 +1378,7 @@ generatedFiles: - src/gusto_embedded/models/get_v1_companies_company_id_pay_schedules_previewop.py - src/gusto_embedded/models/get_v1_companies_company_id_pay_schedulesop.py - src/gusto_embedded/models/get_v1_companies_company_id_payroll_reversalsop.py + - src/gusto_embedded/models/get_v1_companies_company_id_payrolls_id_partner_disbursementsop.py - src/gusto_embedded/models/get_v1_companies_company_id_payrolls_payroll_idop.py - src/gusto_embedded/models/get_v1_companies_company_id_payrollsop.py - src/gusto_embedded/models/get_v1_companies_company_id_unprocessed_termination_pay_periodsop.py @@ -1201,6 +1388,7 @@ generatedFiles: - src/gusto_embedded/models/get_v1_companies_company_uuid_tax_requirementsop.py - src/gusto_embedded/models/get_v1_companies_payroll_blockers_company_uuidop.py - src/gusto_embedded/models/get_v1_companiesop.py + - src/gusto_embedded/models/get_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py - src/gusto_embedded/models/get_v1_company_benefits_company_benefit_id_employee_benefitsop.py - src/gusto_embedded/models/get_v1_company_benefits_company_benefit_idop.py - src/gusto_embedded/models/get_v1_company_external_payrollsop.py @@ -1219,6 +1407,7 @@ generatedFiles: - src/gusto_embedded/models/get_v1_contractor_formop.py - src/gusto_embedded/models/get_v1_contractor_formsop.py - src/gusto_embedded/models/get_v1_contractor_payment_groups_contractor_payment_group_idop.py + - src/gusto_embedded/models/get_v1_contractor_payment_groups_id_partner_disbursementsop.py - src/gusto_embedded/models/get_v1_contractor_payments_contractor_payment_uuid_fundop.py - src/gusto_embedded/models/get_v1_contractor_payments_contractor_payment_uuid_receiptop.py - src/gusto_embedded/models/get_v1_contractors_contractor_uuid_addressop.py @@ -1243,6 +1432,7 @@ generatedFiles: - src/gusto_embedded/models/get_v1_employees_employee_id_jobsop.py - src/gusto_embedded/models/get_v1_employees_employee_id_onboarding_statusop.py - src/gusto_embedded/models/get_v1_employees_employee_id_payment_methodop.py + - src/gusto_embedded/models/get_v1_employees_employee_id_recurring_reimbursementsop.py - src/gusto_embedded/models/get_v1_employees_employee_id_rehireop.py - src/gusto_embedded/models/get_v1_employees_employee_id_state_taxesop.py - src/gusto_embedded/models/get_v1_employees_employee_id_terminationsop.py @@ -1261,15 +1451,20 @@ generatedFiles: - src/gusto_embedded/models/get_v1_locations_location_uuid_minimum_wagesop.py - src/gusto_embedded/models/get_v1_payment_receipts_payrolls_payroll_uuidop.py - src/gusto_embedded/models/get_v1_payrolls_payroll_uuid_employees_employee_uuid_pay_stubop.py + - src/gusto_embedded/models/get_v1_recurring_reimbursementsop.py + - src/gusto_embedded/models/get_v1_salary_estimates_idop.py + - src/gusto_embedded/models/get_v1_salary_estimates_occupationsop.py - src/gusto_embedded/models/get_v1_tax_liabilitiesop.py - src/gusto_embedded/models/get_v1_token_infoop.py - src/gusto_embedded/models/get_v1_webhook_subscription_uuidop.py - src/gusto_embedded/models/get_v1_webhook_subscription_verification_token_uuidop.py - src/gusto_embedded/models/get_v1_webhook_subscriptionsop.py + - src/gusto_embedded/models/get_v1_webhooks_health_checkop.py - src/gusto_embedded/models/get_v1_work_addresses_work_address_uuidop.py - src/gusto_embedded/models/get_version_employees_time_off_activitiesop.py - src/gusto_embedded/models/get_wire_in_requests_wire_in_request_uuidop.py - src/gusto_embedded/models/gross_up_pay.py + - src/gusto_embedded/models/gustoerror.py - src/gusto_embedded/models/historical_employee_body.py - src/gusto_embedded/models/holiday_pay_policy.py - src/gusto_embedded/models/i9_authorization.py @@ -1283,10 +1478,14 @@ generatedFiles: - src/gusto_embedded/models/metadata_with_multiple_entities.py - src/gusto_embedded/models/metadata_with_one_entity.py - src/gusto_embedded/models/minimum_wage.py + - src/gusto_embedded/models/no_response_error.py + - src/gusto_embedded/models/not_found_error_object.py - src/gusto_embedded/models/notification.py - src/gusto_embedded/models/off_cycle_reason_type.py - src/gusto_embedded/models/paid_holidays.py - src/gusto_embedded/models/paid_time_off.py + - src/gusto_embedded/models/patch_v1_companies_company_id_payrolls_id_partner_disbursementsop.py + - src/gusto_embedded/models/patch_v1_contractor_payment_groups_id_partner_disbursementsop.py - src/gusto_embedded/models/pay_period.py - src/gusto_embedded/models/pay_schedule_assignment.py - src/gusto_embedded/models/pay_schedule_assignment_body.py @@ -1313,16 +1512,20 @@ generatedFiles: - src/gusto_embedded/models/payroll_credit_blockers_type.py - src/gusto_embedded/models/payroll_employee_compensations_type.py - src/gusto_embedded/models/payroll_fixed_compensation_types_type.py - - src/gusto_embedded/models/payroll_minimal.py + - src/gusto_embedded/models/payroll_partner_disbursements.py - src/gusto_embedded/models/payroll_pay_period_type.py - src/gusto_embedded/models/payroll_payment_speed_changed_type.py - src/gusto_embedded/models/payroll_payroll_status_meta_type.py + - src/gusto_embedded/models/payroll_prepare_sort_by.py - src/gusto_embedded/models/payroll_prepared.py - src/gusto_embedded/models/payroll_processing_request.py - src/gusto_embedded/models/payroll_receipt.py - src/gusto_embedded/models/payroll_reversal.py + - src/gusto_embedded/models/payroll_show.py - src/gusto_embedded/models/payroll_submission_blockers_type.py + - src/gusto_embedded/models/payroll_taxes_type.py - src/gusto_embedded/models/payroll_totals_type.py + - src/gusto_embedded/models/payroll_update.py - src/gusto_embedded/models/payroll_withholding_pay_period_type.py - src/gusto_embedded/models/post_companies_company_uuid_holiday_pay_policyop.py - src/gusto_embedded/models/post_companies_company_uuid_reportsop.py @@ -1335,6 +1538,7 @@ generatedFiles: - src/gusto_embedded/models/post_partner_managed_companies_company_uuid_accept_terms_of_serviceop.py - src/gusto_embedded/models/post_partner_managed_companies_company_uuid_retrieve_terms_of_serviceop.py - src/gusto_embedded/models/post_payrolls_gross_up_payroll_uuidop.py + - src/gusto_embedded/models/post_payrolls_payroll_uuid_reports_general_ledgerop.py - src/gusto_embedded/models/post_v1_companies_attachmentop.py - src/gusto_embedded/models/post_v1_companies_company_id_adminsop.py - src/gusto_embedded/models/post_v1_companies_company_id_bank_accountsop.py @@ -1358,7 +1562,9 @@ generatedFiles: - src/gusto_embedded/models/post_v1_employees_employee_id_employee_benefitsop.py - src/gusto_embedded/models/post_v1_employees_employee_id_garnishmentsop.py - src/gusto_embedded/models/post_v1_employees_employee_id_home_addressesop.py + - src/gusto_embedded/models/post_v1_employees_employee_id_recurring_reimbursementsop.py - src/gusto_embedded/models/post_v1_employees_employee_id_rehireop.py + - src/gusto_embedded/models/post_v1_employees_employee_id_salary_estimatesop.py - src/gusto_embedded/models/post_v1_employees_employee_id_terminationsop.py - src/gusto_embedded/models/post_v1_employees_employee_id_work_addressesop.py - src/gusto_embedded/models/post_v1_employeesop.py @@ -1369,6 +1575,7 @@ generatedFiles: - src/gusto_embedded/models/post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop.py - src/gusto_embedded/models/post_v1_payrolls_payroll_uuid_generated_documents_printable_payroll_checksop.py - src/gusto_embedded/models/post_v1_plaid_processor_tokenop.py + - src/gusto_embedded/models/post_v1_salary_estimates_uuid_acceptop.py - src/gusto_embedded/models/post_v1_sandbox_generate_1099op.py - src/gusto_embedded/models/post_v1_sandbox_generate_w2op.py - src/gusto_embedded/models/post_v1_webhook_subscriptionop.py @@ -1391,6 +1598,7 @@ generatedFiles: - src/gusto_embedded/models/put_v1_companies_company_uuid_signatories_signatory_uuidop.py - src/gusto_embedded/models/put_v1_companies_company_uuid_tax_requirements_stateop.py - src/gusto_embedded/models/put_v1_companiesop.py + - src/gusto_embedded/models/put_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py - src/gusto_embedded/models/put_v1_company_benefits_company_benefit_id_employee_benefitsop.py - src/gusto_embedded/models/put_v1_company_benefits_company_benefit_idop.py - src/gusto_embedded/models/put_v1_company_form_signop.py @@ -1423,6 +1631,8 @@ generatedFiles: - src/gusto_embedded/models/put_v1_jobs_job_idop.py - src/gusto_embedded/models/put_v1_locations_location_idop.py - src/gusto_embedded/models/put_v1_partner_managed_companies_company_uuid_migrateop.py + - src/gusto_embedded/models/put_v1_recurring_reimbursementsop.py + - src/gusto_embedded/models/put_v1_salary_estimates_idop.py - src/gusto_embedded/models/put_v1_tax_liabilities_finishop.py - src/gusto_embedded/models/put_v1_tax_liabilitiesop.py - src/gusto_embedded/models/put_v1_terminations_employee_idop.py @@ -1441,7 +1651,10 @@ generatedFiles: - src/gusto_embedded/models/rehire_body.py - src/gusto_embedded/models/report.py - src/gusto_embedded/models/report_template.py + - src/gusto_embedded/models/responsevalidationerror.py + - src/gusto_embedded/models/salary_estimate.py - src/gusto_embedded/models/security.py + - src/gusto_embedded/models/show_employees.py - src/gusto_embedded/models/signatory.py - src/gusto_embedded/models/sort_order.py - src/gusto_embedded/models/supported_benefit.py @@ -1453,10 +1666,11 @@ generatedFiles: - src/gusto_embedded/models/termination.py - src/gusto_embedded/models/time_off_activity.py - src/gusto_embedded/models/time_off_policy.py - - src/gusto_embedded/models/unprocessable_entity_error_object_error.py + - src/gusto_embedded/models/unprocessable_entity_error_object.py - src/gusto_embedded/models/unprocessed_termination_pay_period.py - src/gusto_embedded/models/versionheader.py - src/gusto_embedded/models/webhook_subscription.py + - src/gusto_embedded/models/webhooks_health_check_status.py - src/gusto_embedded/models/wire_in_request.py - src/gusto_embedded/models/ytd_benefit_amounts_from_different_company.py - src/gusto_embedded/notifications.py @@ -1465,7 +1679,9 @@ generatedFiles: - src/gusto_embedded/payschedules.py - src/gusto_embedded/py.typed - src/gusto_embedded/recoverycases.py + - src/gusto_embedded/reimbursements.py - src/gusto_embedded/reports.py + - src/gusto_embedded/salary_estimates.py - src/gusto_embedded/sdk.py - src/gusto_embedded/sdkconfiguration.py - src/gusto_embedded/signatories.py @@ -1488,19 +1704,20 @@ generatedFiles: - src/gusto_embedded/utils/retries.py - src/gusto_embedded/utils/security.py - src/gusto_embedded/utils/serializers.py + - src/gusto_embedded/utils/unmarshal_json_response.py - src/gusto_embedded/utils/url.py - src/gusto_embedded/utils/values.py - src/gusto_embedded/webhooks.py - src/gusto_embedded/wireinrequests.py examples: get-v1-token-info: - Example: + speakeasy-default-get-v1-token-info: parameters: header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"scope": "companies:read companies:write employees:read", "resource": {"type": "Company", "uuid": "5eca5127-6048-43ad-91ee-b56a0c34bc85"}, "resource_owner": {"type": "CompanyAdmin", "uuid": "367871c2-3f70-4874-adc9-f1736647e8e1"}} + application/json: {"scope": "", "resource": {"type": "", "uuid": "ee9b2192-c07e-46f4-ac9b-5e81bfdf7346"}, "resource_owner": {"type": "Employee", "uuid": "85b82eed-4e3d-4fac-b07a-d3e80bc73315"}} refresh-access-token: Example: parameters: @@ -1520,13 +1737,15 @@ examples: application/json: {"user": {"first_name": "Frank", "last_name": "Ocean", "email": "frank@example.com", "phone": "2345558899"}, "company": {"name": "Frank's Ocean, LLC", "trade_name": "Frank’s Ocean", "ein": "123456789", "contractor_only": false}} responses: "200": - application/json: {"access_token": "de6780bc506a0446309bd9362820ba8aed28aa506c71eedbe1c5c4f9dd350e54", "refresh_token": "8257e65c97202ed1726cf9571600918f3bffb2544b26e00a61df9897668c33a1", "company_uuid": "d525dd21-ba6e-482c-be15-c2c7237f1364", "expires_in": 7200} + application/json: {} + "422": + application/json: {"errors": [{"error_key": "", "category": ""}]} Basic: parameters: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"user": {"first_name": "Gail", "last_name": "Stracke", "email": "Emanuel.McClure@gmail.com"}, "company": {"name": ""}} + application/json: {"user": {"first_name": "Randi", "last_name": "Schaden", "email": "Geovanni_Mertz12@yahoo.com"}, "company": {"name": ""}} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -1535,7 +1754,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"user": {"first_name": "Gretchen", "last_name": "Vandervort", "email": "Giuseppe_Turcotte@yahoo.com"}, "company": {"name": ""}} + application/json: {"user": {"first_name": "Randi", "last_name": "Schaden", "email": "Geovanni_Mertz12@yahoo.com"}, "company": {"name": ""}} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -1544,10 +1763,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"user": {"first_name": "Dominic", "last_name": "Bins", "email": "Maxime41@hotmail.com"}, "company": {"name": ""}} + application/json: {"user": {"first_name": "Randi", "last_name": "Schaden", "email": "Geovanni_Mertz12@yahoo.com"}, "company": {"name": ""}} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies: Example: parameters: @@ -1557,7 +1776,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"ein": "00-0000001", "entity_type": "C-Corporation", "contractor_only": false, "tier": "core", "is_suspended": false, "company_status": "Approved", "uuid": "c7a07c73-a703-4462-9343-1b181182b6e0", "name": "Shoppe Studios LLC", "slug": "record-shoppe", "trade_name": "Record Shoppe", "is_partner_managed": false, "pay_schedule_type": "by_department", "join_date": "2023-03-01", "funding_type": "ach", "locations": [{"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true}, {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": true}], "compensations": {"hourly": [{"name": "Overtime", "multiple": 1.5}, {"name": "Double overtime", "multiple": 2}, {"name": "Regular", "multiple": 1}, {"name": "Outstanding vacation", "multiple": 1}, {"name": "Holiday", "multiple": 1}, {"name": "Emergency sick - self care", "multiple": 1}, {"name": "Emergency sick - caring for others", "multiple": 1}, {"name": "FMLA Public Health Emergency Leave", "multiple": 1}, {"name": "Regular Hours", "multiple": 1}], "fixed": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Severance"}, {"name": "Minimum Wage Adjustment"}, {"name": "Reimbursement"}], "paid_time_off": [{"name": "Vacation Hours"}, {"name": "Sick Hours"}, {"name": "Holiday Hours"}]}, "primary_signatory": {"uuid": "8a2ed9c2-9d1e-443a-8e56-a490d8bf73bb", "first_name": "Alda", "middle_initial": "", "last_name": "Carter", "phone": "1-565-710-7558", "email": "louie.hessel7757869450111547@zemlak.biz", "home_address": {"street_1": "524 Roob Divide", "street_2": "Suite 565", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}}, "primary_payroll_admin": {"first_name": "Ian", "last_name": "Labadie", "phone": "1-565-710-7559", "email": "louie.hessel7757869450111547@zemlak.biz"}} + application/json: {"ein": "00-0000001", "entity_type": "C-Corporation", "contractor_only": false, "tier": "core", "is_suspended": false, "company_status": "Approved", "uuid": "c7a07c73-a703-4462-9343-1b181182b6e0", "name": "Shoppe Studios LLC", "slug": "record-shoppe", "trade_name": "Record Shoppe", "is_partner_managed": false, "pay_schedule_type": "by_department", "join_date": "2023-03-01", "funding_type": "ach", "locations": [{"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}, {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA"}], "compensations": {"hourly": [{"name": "Overtime", "multiple": 1.5}, {"name": "Double overtime", "multiple": 2}, {"name": "Regular", "multiple": 1}, {"name": "Outstanding vacation", "multiple": 1}, {"name": "Holiday", "multiple": 1}, {"name": "Emergency sick - self care", "multiple": 1}, {"name": "Emergency sick - caring for others", "multiple": 1}, {"name": "FMLA Public Health Emergency Leave", "multiple": 1}, {"name": "Regular Hours", "multiple": 1}], "fixed": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Severance"}, {"name": "Minimum Wage Adjustment"}, {"name": "Reimbursement"}], "paid_time_off": [{"name": "Vacation Hours"}, {"name": "Sick Hours"}, {"name": "Holiday Hours"}]}, "primary_signatory": {"uuid": "8a2ed9c2-9d1e-443a-8e56-a490d8bf73bb", "first_name": "Alda", "middle_initial": "", "last_name": "Carter", "phone": "1-565-710-7558", "email": "louie.hessel7757869450111547@zemlak.biz", "home_address": {"street_1": "524 Roob Divide", "street_2": "Suite 565", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}}, "primary_payroll_admin": {"first_name": "Ian", "last_name": "Labadie", "phone": "1-565-710-7559", "email": "louie.hessel7757869450111547@zemlak.biz"}} put-v1-companies: Example: parameters: @@ -1569,7 +1788,7 @@ examples: application/json: {"contractor_only": false} responses: "200": - application/json: {"ein": "00-0000001", "entity_type": "C-Corporation", "contractor_only": false, "tier": "core", "is_suspended": false, "company_status": "Approved", "uuid": "c7a07c73-a703-4462-9343-1b181182b6e0", "name": "Shoppe Studios LLC", "slug": "record-shoppe", "trade_name": "Record Shoppe", "is_partner_managed": false, "pay_schedule_type": "by_department", "join_date": "2023-03-01", "funding_type": "ach", "locations": [{"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true}, {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": true}], "compensations": {"hourly": [{"name": "Overtime", "multiple": 1.5}, {"name": "Double overtime", "multiple": 2}, {"name": "Regular", "multiple": 1}, {"name": "Outstanding vacation", "multiple": 1}, {"name": "Holiday", "multiple": 1}, {"name": "Emergency sick - self care", "multiple": 1}, {"name": "Emergency sick - caring for others", "multiple": 1}, {"name": "FMLA Public Health Emergency Leave", "multiple": 1}, {"name": "Regular Hours", "multiple": 1}], "fixed": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Severance"}, {"name": "Minimum Wage Adjustment"}, {"name": "Reimbursement"}], "paid_time_off": [{"name": "Vacation Hours"}, {"name": "Sick Hours"}, {"name": "Holiday Hours"}]}, "primary_signatory": {"uuid": "8a2ed9c2-9d1e-443a-8e56-a490d8bf73bb", "first_name": "Alda", "middle_initial": "", "last_name": "Carter", "phone": "1-565-710-7558", "email": "louie.hessel7757869450111547@zemlak.biz", "home_address": {"street_1": "524 Roob Divide", "street_2": "Suite 565", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}}, "primary_payroll_admin": {"first_name": "Ian", "last_name": "Labadie", "phone": "1-565-710-7559", "email": "louie.hessel7757869450111547@zemlak.biz"}} + application/json: {"ein": "00-0000001", "entity_type": "C-Corporation", "contractor_only": false, "tier": "core", "is_suspended": false, "company_status": "Approved", "uuid": "c7a07c73-a703-4462-9343-1b181182b6e0", "name": "Shoppe Studios LLC", "slug": "record-shoppe", "trade_name": "Record Shoppe", "is_partner_managed": false, "pay_schedule_type": "by_department", "join_date": "2023-03-01", "funding_type": "ach", "locations": [{"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}, {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA"}], "compensations": {"hourly": [{"name": "Overtime", "multiple": 1.5}, {"name": "Double overtime", "multiple": 2}, {"name": "Regular", "multiple": 1}, {"name": "Outstanding vacation", "multiple": 1}, {"name": "Holiday", "multiple": 1}, {"name": "Emergency sick - self care", "multiple": 1}, {"name": "Emergency sick - caring for others", "multiple": 1}, {"name": "FMLA Public Health Emergency Leave", "multiple": 1}, {"name": "Regular Hours", "multiple": 1}], "fixed": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Severance"}, {"name": "Minimum Wage Adjustment"}, {"name": "Reimbursement"}], "paid_time_off": [{"name": "Vacation Hours"}, {"name": "Sick Hours"}, {"name": "Holiday Hours"}]}, "primary_signatory": {"uuid": "8a2ed9c2-9d1e-443a-8e56-a490d8bf73bb", "first_name": "Alda", "middle_initial": "", "last_name": "Carter", "phone": "1-565-710-7558", "email": "louie.hessel7757869450111547@zemlak.biz", "home_address": {"street_1": "524 Roob Divide", "street_2": "Suite 565", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}}, "primary_payroll_admin": {"first_name": "Ian", "last_name": "Labadie", "phone": "1-565-710-7559", "email": "louie.hessel7757869450111547@zemlak.biz"}} Basic: parameters: path: @@ -1577,7 +1796,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"contractor_only": false} + application/json: {"contractor_only": true} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -1588,7 +1807,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"contractor_only": false} + application/json: {"contractor_only": true} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -1602,19 +1821,8 @@ examples: application/json: {"contractor_only": true} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-v1-partner-managed-companies-company-uuid-migrate: - Example: - parameters: - path: - company_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"email": "Benjamin_Kihn44@yahoo.com", "ip_address": "198.52.136.51", "external_user_id": ""} - responses: - "200": - application/json: {"company_uuid": "39abf9b9-650b-4e67-89a0-389dc6ee8a71", "migration_status": "success"} Basic: parameters: path: @@ -1622,7 +1830,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "Erna62@gmail.com", "ip_address": "02de:9982:167f:34c3:bfe5:a8ab:0cf3:5c87", "external_user_id": ""} + application/json: {"email": "Janice18@gmail.com", "ip_address": "75.249.55.210", "external_user_id": ""} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -1633,7 +1841,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "Lyric_Beer@yahoo.com", "ip_address": "217.131.195.126", "external_user_id": ""} + application/json: {"email": "Janice18@gmail.com", "ip_address": "75.249.55.210", "external_user_id": ""} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -1644,10 +1852,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "Johann_Thompson@hotmail.com", "ip_address": "82.48.167.70", "external_user_id": ""} + application/json: {"email": "Janice18@gmail.com", "ip_address": "75.249.55.210", "external_user_id": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-partner-managed-companies-company_uuid-accept_terms_of_service: Example: parameters: @@ -1659,7 +1867,9 @@ examples: application/json: {"email": "jsmith99@gmail.com", "ip_address": "192.168.1.2", "external_user_id": "2005648946132"} responses: "200": - application/json: {"latest_terms_accepted": true} + application/json: {} + "422": + application/json: {"errors": [{"error_key": "", "category": ""}]} Basic: parameters: path: @@ -1667,7 +1877,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "Justine73@gmail.com", "ip_address": "168.91.169.217", "external_user_id": ""} + application/json: {"email": "Mary_Welch@hotmail.com", "ip_address": "ad95:edec:dbf8:daea:be73:caca:2bf2:c269", "external_user_id": ""} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -1678,7 +1888,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "William_Goldner@hotmail.com", "ip_address": "bf16:0638:d9db:4e8a:c5ee:c9cd:bb4f:1d5d", "external_user_id": ""} + application/json: {"email": "Mary_Welch@hotmail.com", "ip_address": "ad95:edec:dbf8:daea:be73:caca:2bf2:c269", "external_user_id": ""} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -1689,10 +1899,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "Jerad_Dicki@yahoo.com", "ip_address": "61.236.253.221", "external_user_id": ""} + application/json: {"email": "Mary_Welch@hotmail.com", "ip_address": "ad95:edec:dbf8:daea:be73:caca:2bf2:c269", "external_user_id": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-partner-managed-companies-company_uuid-retrieve_terms_of_service: Example: parameters: @@ -1704,7 +1914,9 @@ examples: application/json: {"email": "jsmith99@gmail.com"} responses: "200": - application/json: {"latest_terms_accepted": true} + application/json: {} + "422": + application/json: {"errors": [{"error_key": "", "category": ""}]} Basic: parameters: path: @@ -1712,7 +1924,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "Erika_Schuster@yahoo.com"} + application/json: {"email": "Valentin_Ziemann@yahoo.com"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -1723,7 +1935,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "Sarina_Hand68@yahoo.com"} + application/json: {"email": "Valentin_Ziemann@yahoo.com"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -1734,10 +1946,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "Katheryn_Ernser@hotmail.com"} + application/json: {"email": "Valentin_Ziemann@yahoo.com"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-companies-company_id-admins: Example: parameters: @@ -1757,7 +1969,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"first_name": "Guillermo", "last_name": "Koch", "email": "Justine_Gusikowski92@yahoo.com"} + application/json: {"first_name": "Hilbert", "last_name": "Hilll", "email": "Dejah.Pagac14@gmail.com"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -1768,7 +1980,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"first_name": "Jaquelin", "last_name": "Leannon", "email": "Neil_Parisian@hotmail.com"} + application/json: {"first_name": "Hilbert", "last_name": "Hilll", "email": "Dejah.Pagac14@gmail.com"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -1779,16 +1991,15 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"first_name": "Jessika", "last_name": "Hudson", "email": "Cornell_Monahan86@hotmail.com"} + application/json: {"first_name": "Hilbert", "last_name": "Hilll", "email": "Dejah.Pagac14@gmail.com"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-admins: Example: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -1805,7 +2016,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "c44d66dc-c41b-4a60-9e25-5e93ff8583f2", "onboarding_completed": false, "onboarding_steps": [{"title": "Add Your Company's Addresses", "id": "add_addresses", "required": true, "completed": true, "skippable": false, "requirements": []}, {"title": "Enter Your Federal Tax Information", "id": "federal_tax_setup", "required": true, "completed": true, "skippable": false, "requirements": []}, {"title": "Select Industry", "id": "select_industry", "required": true, "completed": true, "skippable": false, "requirements": []}, {"title": "Add Your Bank Account", "id": "add_bank_info", "required": true, "completed": true, "skippable": false, "requirements": []}, {"title": "Add Your Employees", "id": "add_employees", "required": true, "completed": true, "skippable": true, "requirements": ["add_addresses"]}, {"title": "Enter Your State Tax Information", "id": "state_setup", "required": true, "completed": false, "skippable": false, "requirements": ["add_addresses", "add_employees"]}, {"title": "Select a Pay Schedule", "id": "payroll_schedule", "required": true, "completed": false, "skippable": false, "requirements": []}, {"title": "Sign Documents", "id": "sign_all_forms", "required": true, "completed": false, "skippable": false, "requirements": ["add_employees", "federal_tax_setup", "state_setup", "add_bank_info", "payroll_schedule"]}, {"title": "Verify Your Bank Account", "id": "verify_bank_info", "required": true, "completed": false, "skippable": false, "requirements": ["add_bank_info"]}]} + application/json: {"uuid": "c44d66dc-c41b-4a60-9e25-5e93ff8583f2", "onboarding_completed": false, "onboarding_steps": [{"title": "Add Your Company's Addresses", "id": "add_addresses", "required": true, "completed": true, "completed_at": "2025-02-18T10:00:00Z", "skippable": false, "requirements": []}, {"title": "Enter Your Federal Tax Information", "id": "federal_tax_setup", "required": true, "completed": true, "completed_at": "2025-02-18T10:00:00Z", "skippable": false, "requirements": []}, {"title": "Select Industry", "id": "select_industry", "required": true, "completed": true, "completed_at": "2025-02-18T10:00:00Z", "skippable": false, "requirements": []}, {"title": "Add Your Bank Account", "id": "add_bank_info", "required": true, "completed": true, "completed_at": "2025-02-18T10:00:00Z", "skippable": false, "requirements": []}, {"title": "Add Your Employees", "id": "add_employees", "required": true, "completed": true, "completed_at": "2025-02-18T10:00:00Z", "skippable": true, "requirements": ["add_addresses"]}, {"title": "Enter Your State Tax Information", "id": "state_setup", "required": true, "completed": false, "completed_at": null, "skippable": false, "requirements": ["add_addresses", "add_employees"]}, {"title": "Select a Pay Schedule", "id": "payroll_schedule", "required": true, "completed": false, "completed_at": null, "skippable": false, "requirements": []}, {"title": "Sign Documents", "id": "sign_all_forms", "required": true, "completed": false, "completed_at": null, "skippable": false, "requirements": ["add_employees", "federal_tax_setup", "state_setup", "add_bank_info", "payroll_schedule"]}, {"title": "Verify Your Bank Account", "id": "verify_bank_info", "required": true, "completed": false, "completed_at": null, "skippable": false, "requirements": ["add_bank_info"]}]} get-v1-company-finish-onboarding: Example: parameters: @@ -1842,13 +2053,12 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-custom_fields: Example: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -1863,69 +2073,28 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{}, {}, {}] + application/json: [{}] + "404": + application/json: {"errors": []} post-companies-company_uuid-suspensions: - Leaving to join another payroll provider: - parameters: - path: - company_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"file_quarterly_forms": true, "file_yearly_forms": true, "reconcile_tax_method": "pay_taxes", "reason": "switching_provider", "leaving_for": "other"} - responses: - "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - Company is shutting down: - parameters: - path: - company_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"file_quarterly_forms": true, "file_yearly_forms": true, "reconcile_tax_method": "pay_taxes", "reason": "shutting_down"} - responses: - "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - Basic: - parameters: - path: - company_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"file_quarterly_forms": false, "file_yearly_forms": true, "reconcile_tax_method": "refund_taxes", "reason": "changing_ein_or_entity_type"} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - company_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"file_quarterly_forms": false, "file_yearly_forms": true, "reconcile_tax_method": "refund_taxes", "reason": "acquired"} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: + speakeasy-default-post-companies-company-uuid-suspensions: parameters: path: company_uuid: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"file_quarterly_forms": true, "file_yearly_forms": false, "reconcile_tax_method": "refund_taxes", "reason": "shutting_down"} + application/json: {"file_quarterly_forms": true, "file_yearly_forms": false, "reconcile_tax_method": "pay_taxes", "reason": "acquired"} responses: + "200": + application/json: {} "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": []} get-invoices-invoice-period: example: parameters: path: invoice_period: "2020-01" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -1935,7 +2104,6 @@ examples: parameters: path: invoice_period: "2020-01" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -1945,7 +2113,6 @@ examples: parameters: path: invoice_period: "2020-01" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -1955,12 +2122,11 @@ examples: parameters: path: invoice_period: "2020-01" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-attachment: Example: parameters: @@ -1990,7 +2156,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - multipart/form-data: {"document": {"": "x-file: example.file"}, "category": "gep_notice"} + multipart/form-data: {"document": "x-file: example.file", "category": "gep_notice"} responses: "201": application/json: {"uuid": "1263eae5-4411-48d9-bd6d-18ed93082e65", "name": "Company_Attachment_File.pdf", "category": "gep_notice", "upload_time": "2022-02-01T00:00:00.000Z"} @@ -2001,7 +2167,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - multipart/form-data: {"document": {"": "x-file: example.file"}, "category": "compliance"} + multipart/form-data: {"document": "x-file: example.file", "category": "gep_notice"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -2012,7 +2178,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - multipart/form-data: {"document": {"": "x-file: example.file"}, "category": "gep_notice"} + multipart/form-data: {"document": "x-file: example.file", "category": "gep_notice"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -2023,12 +2189,12 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - multipart/form-data: {"document": {"": "x-file: example.file"}, "category": "gep_notice"} + multipart/form-data: {"document": "x-file: example.file", "category": "gep_notice"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-attachment-url: - Example: + speakeasy-default-get-v1-companies-attachment-url: parameters: path: company_id: "" @@ -2037,7 +2203,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"url": "https://s3.amazonaws.com/static.gusto.com/assets/uploaded_files/334721.pdf?parameter=daer8r3432423djklsdafaso"} + application/json: {"url": "https://fond-hunt.info"} get-v1-companies-company_id-federal_tax_details: Example: parameters: @@ -2047,7 +2213,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"version": "5521489cc7c93732300805dcf87a5fd3", "tax_payer_type": "S-Corporation", "taxable_as_scorp": true, "filing_form": "941", "has_ein": true, "ein_verified": true, "legal_name": "Company Name LLC", "effective_date": "2024-01-01", "deposit_schedule": "Semiweekly"} + application/json: {"version": "5521489cc7c93732300805dcf87a5fd3", "tax_payer_type": "S-Corporation", "taxable_as_scorp": true, "filing_form": "941", "has_ein": true, "ein_verified": true, "ein_verification": {"status": "verified"}, "legal_name": "Company Name LLC", "effective_date": "2024-01-01", "deposit_schedule": "Semiweekly"} put-v1-companies-company_id-federal_tax_details: Example: parameters: @@ -2059,7 +2225,7 @@ examples: application/json: {"legal_name": "Acme Corp.", "tax_payer_type": "LLP", "filing_form": "944", "taxable_as_scorp": false, "version": "6cb95e00540706ca48d4577b3c839fbe"} responses: "200": - application/json: {"version": "5521489cc7c93732300805dcf87a5fd3", "tax_payer_type": "S-Corporation", "taxable_as_scorp": true, "filing_form": "941", "has_ein": true, "ein_verified": true, "legal_name": "Company Name LLC", "effective_date": "2024-01-01", "deposit_schedule": "Semiweekly"} + application/json: {"version": "5521489cc7c93732300805dcf87a5fd3", "tax_payer_type": "S-Corporation", "taxable_as_scorp": true, "filing_form": "941", "has_ein": true, "ein_verified": true, "ein_verification": {"status": "verified"}, "legal_name": "Company Name LLC", "effective_date": "2024-01-01", "deposit_schedule": "Semiweekly"} Basic: parameters: path: @@ -2092,7 +2258,7 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-company-industry: Example: parameters: @@ -2147,7 +2313,7 @@ examples: application/json: {"naics_code": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-company-signatories: Example: parameters: @@ -2156,7 +2322,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"ssn": "", "first_name": "Jed", "last_name": "Johnson", "email": "Annie.Wiegand16@gmail.com", "title": "", "phone": "857-932-0220 x31016", "birthday": "", "home_address": {"street_1": "", "city": "North Lilly", "state": "North Carolina", "zip": "05065"}} + application/json: {"ssn": "", "first_name": "Ed", "last_name": "Reichert", "email": "Shanny62@hotmail.com", "title": "", "phone": "1-346-396-8392 x69356", "birthday": "", "home_address": {"street_1": "", "city": "East Clydefield", "state": "Kentucky", "zip": "13719-5134"}} responses: "200": application/json: {"uuid": "f8c653dc-0094-41fb-8670-45d6399afade", "first_name": "Bob", "last_name": "Johnson", "title": "Owner", "phone": "4239879876", "email": "olin.okuneva@denesik.us", "birthday": "2002-10-31", "is_admin": false, "has_ssn": true, "version": "49ea586f528411f5cfadfd54452b2423", "identity_verification_status": "Skipped", "home_address": {"street_1": "524 Roob Divide", "street_2": "Suite 565", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}} @@ -2167,7 +2333,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"ssn": "", "first_name": "Sven", "last_name": "Kunze", "email": "Otho78@gmail.com", "title": "", "phone": "545.244.3901", "birthday": "", "home_address": {"street_1": "", "city": "New Josiane", "state": "Kentucky", "zip": "11880"}} + application/json: {"ssn": "", "first_name": "Ed", "last_name": "Reichert", "email": "Shanny62@hotmail.com", "title": "", "phone": "1-346-396-8392 x69356", "birthday": "", "home_address": {"street_1": "", "city": "East Clydefield", "state": "Kentucky", "zip": "13719-5134"}} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -2178,7 +2344,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"ssn": "", "first_name": "Tania", "last_name": "Lindgren", "email": "Clotilde.Hermann67@gmail.com", "title": "", "phone": "(952) 347-9826 x26246", "birthday": "", "home_address": {"street_1": "", "city": "Montanafield", "state": "Colorado", "zip": "82730-9658"}} + application/json: {"ssn": "", "first_name": "Ed", "last_name": "Reichert", "email": "Shanny62@hotmail.com", "title": "", "phone": "1-346-396-8392 x69356", "birthday": "", "home_address": {"street_1": "", "city": "East Clydefield", "state": "Kentucky", "zip": "13719-5134"}} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -2189,10 +2355,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"ssn": "", "first_name": "Winfield", "last_name": "Grady-Cruickshank", "email": "Paula_Weber@hotmail.com", "title": "", "phone": "(773) 321-8929", "birthday": "", "home_address": {"street_1": "", "city": "Lakeland", "state": "Louisiana", "zip": "12614-6739"}} + application/json: {"ssn": "", "first_name": "Ed", "last_name": "Reichert", "email": "Shanny62@hotmail.com", "title": "", "phone": "1-346-396-8392 x69356", "birthday": "", "home_address": {"street_1": "", "city": "East Clydefield", "state": "Kentucky", "zip": "13719-5134"}} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_uuid-signatories: Example: parameters: @@ -2211,7 +2377,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "Maureen_Wyman@yahoo.com"} + application/json: {"email": "Kamron.Nikolaus@yahoo.com"} responses: "200": application/json: {"uuid": "f8c653dc-0094-41fb-8670-45d6399afade", "first_name": "Bob", "last_name": "Johnson", "title": "Owner", "phone": "4239879876", "email": "olin.okuneva@denesik.us", "birthday": "2002-10-31", "is_admin": false, "has_ssn": true, "version": "49ea586f528411f5cfadfd54452b2423", "identity_verification_status": "Skipped", "home_address": {"street_1": "524 Roob Divide", "street_2": "Suite 565", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA"}} @@ -2222,7 +2388,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "Fidel_Witting91@gmail.com"} + application/json: {"email": "Kamron.Nikolaus@yahoo.com"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -2233,7 +2399,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "David.Prosacco54@yahoo.com"} + application/json: {"email": "Kamron.Nikolaus@yahoo.com"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -2244,10 +2410,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"email": "Cassie.Corwin26@yahoo.com"} + application/json: {"email": "Kamron.Nikolaus@yahoo.com"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-v1-companies-company_uuid-signatories-signatory_uuid: Example: parameters: @@ -2296,7 +2462,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-companies-company_uuid-signatories-signatory_uuid: speakeasy-default-delete-v1-companies-company-uuid-signatories-signatory-uuid: parameters: @@ -2313,10 +2479,23 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"flow_type": "company_onboarding"} + application/json: {"flow_type": "company_retirement_benefits"} responses: "201": application/json: {"url": "https://flows.gusto-demo.com/flows/lO2BHHAMCScPVV9G5WEURW0Im_nP9mGYloQgjUWbenQ"} + Example with options: + parameters: + path: + company_uuid: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"flow_type": "company_retirement_benefits", "entity_type": "Company", "options": {"provider": "guideline"}} + responses: + "201": + application/json: {} + "422": + application/json: {"errors": [{"error_key": "", "category": ""}]} Basic: parameters: path: @@ -2349,7 +2528,7 @@ examples: application/json: {"flow_type": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-companies-company_id-locations: Example: parameters: @@ -2361,7 +2540,7 @@ examples: application/json: {"phone_number": "8009360383", "street_1": "425 2nd Street", "street_2": "Suite 602", "city": "San Francisco", "state": "CA", "zip": "94107"} responses: "201": - application/json: {"uuid": "04552eb9-7829-4b18-ae96-6983552948df", "version": "7d9753112507b9dda4fb97910f39b06e", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "5825710808", "street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true, "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00"} + application/json: {"uuid": "04552eb9-7829-4b18-ae96-6983552948df", "version": "7d9753112507b9dda4fb97910f39b06e", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "5825710808", "street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00", "active": true} Basic: parameters: path: @@ -2369,7 +2548,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"phone_number": "741.279.0107 x857", "street_1": "", "city": "Grand Island", "state": "Illinois", "zip": "22031"} + application/json: {"phone_number": "841-814-9427 x9355", "street_1": "", "city": "Chynastad", "state": "Wisconsin", "zip": "88336"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -2380,7 +2559,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"phone_number": "(263) 266-2050", "street_1": "", "city": "Lubowitzside", "state": "Minnesota", "zip": "27179"} + application/json: {"phone_number": "841-814-9427 x9355", "street_1": "", "city": "Chynastad", "state": "Wisconsin", "zip": "88336"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -2391,23 +2570,22 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"phone_number": "824-550-4439 x01255", "street_1": "", "city": "South Barrett", "state": "Georgia", "zip": "80985-0183"} + application/json: {"phone_number": "841-814-9427 x9355", "street_1": "", "city": "Chynastad", "state": "Wisconsin", "zip": "88336"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-locations: Example: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "04552eb9-7829-4b18-ae96-6983552948df", "version": "7d9753112507b9dda4fb97910f39b06e", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "5825710808", "street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true, "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00"}, {"uuid": "fa94a2fd-11a8-4024-87ff-85c587d9d2b4", "version": "15e6b9680e00f3122729e64e3cef3224", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "2866070827", "street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": true, "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00"}] + application/json: [{"uuid": "04552eb9-7829-4b18-ae96-6983552948df", "version": "7d9753112507b9dda4fb97910f39b06e", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "5825710808", "street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00", "active": true}, {"uuid": "fa94a2fd-11a8-4024-87ff-85c587d9d2b4", "version": "15e6b9680e00f3122729e64e3cef3224", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "phone_number": "2866070827", "street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "mailing_address": false, "filing_address": false, "created_at": "2023-09-12T16:42:25.000-07:00", "updated_at": "2023-09-12T16:42:25.000-07:00", "active": true}] get-v1-locations-location_id: - test_example: + speakeasy-default-get-v1-locations-location-id: parameters: path: location_id: "" @@ -2415,38 +2593,25 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "bd6fc55c-1263-4432-aef0-d667b9e0aef7", "version": "2a98f99d7e8e3ede9b04a6494b7f3fcf", "company_uuid": "393b7c66-66a1-4967-ab19-32eca5db9edd", "phone_number": "7425583363", "street_1": "3079 Hackett Landing", "street_2": "Suite 671", "city": "Belmont", "state": "IN", "zip": "47448", "country": "USA", "active": true, "mailing_address": true, "filing_address": false, "created_at": "2025-05-15T08:01:01.000-07:00", "updated_at": "2025-05-15T08:01:01.000-07:00"} + application/json: {"uuid": "42569fb0-7d3c-4045-9023-5b279bee7e9c", "country": "USA"} "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + application/json: {"errors": []} put-v1-locations-location_id: - request_example_1: - parameters: - path: - location_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": "aa2c4db94c2e968aa0cf51f346007c5f", "phone_number": "8009360383", "street_1": "300 3rd Street", "street_2": "Apartment 318", "city": "San Francisco", "zip": "94107", "filing_address": true} - responses: - "200": - application/json: {"uuid": "d95fa7f0-e743-42ce-b47c-b60cc78135dd", "country": "USA"} - "404": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - test_example: + speakeasy-default-put-v1-locations-location-id: parameters: path: location_id: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "phone_number": "8009360383", "street_1": "300 3rd Street", "street_2": "Apartment 318", "city": "San Francisco", "zip": "94107"} responses: "200": - application/json: {"uuid": "a8b2221c-c063-4417-8c72-9b8e535ff7c4", "version": "65aacee259b7169fe6287ddda9fa7d22", "company_uuid": "7692323a-d689-436c-b9f3-df05d4f16f0f", "phone_number": "8009360383", "street_1": "300 3rd Street", "street_2": "Apartment 318", "city": "San Francisco", "state": "MN", "zip": "94107", "country": "USA", "active": true, "mailing_address": true, "filing_address": true, "created_at": "2025-05-15T08:01:03.000-07:00", "updated_at": "2025-05-15T08:01:03.000-07:00"} + application/json: {"uuid": "ced517c9-1c22-4468-88f7-bea752987d03", "country": "USA"} "404": - application/json: {"errors": [{"error_key": "state", "category": "invalid_attribute_value", "message": "State is in the wrong format"}]} + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-locations-location_uuid-minimum_wages: - "": + speakeasy-default-get-v1-locations-location-uuid-minimum-wages: parameters: path: location_uuid: "" @@ -2456,77 +2621,35 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "51a05d45-4150-43d0-817d-ded00b53e08d", "wage": "", "wage_type": "", "effective_date": "2025-07-18", "authority": ""}, {"uuid": "6bcf0983-eca2-4a56-b844-6e8c6e9a7665", "wage": "", "wage_type": "", "effective_date": "2024-05-23", "authority": ""}, {"uuid": "6279a5fa-0ee0-4322-b251-c08f7a91301b", "wage": "", "wage_type": "", "effective_date": "2024-02-09", "authority": ""}] + application/json: [{"uuid": "4e403e89-9737-4a6e-a024-d90811702355", "wage": "", "wage_type": "", "effective_date": "2023-01-11", "authority": ""}] "404": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - test_example: + application/json: {"errors": []} + get-v1-companies-company_id-bank-accounts: + speakeasy-default-get-v1-companies-company-id-bank-accounts: parameters: path: - location_uuid: "" - query: - effective_date: "2020-01-31" + company_id: "" header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "f236d80d-52d2-495e-8538-884162a383f4", "wage": "15.0", "wage_type": "Regular", "effective_date": "2017-01-01", "authority": "City", "notes": "large companies"}, {"uuid": "0f86fd12-a2fd-45b4-b3ab-fb8400b383b2", "wage": "10.5", "wage_type": "Regular", "effective_date": "2017-01-01", "authority": "City", "notes": "large companies"}, {"uuid": "648c12be-857b-4c4e-9667-4e4480ddf794", "wage": "10.5", "wage_type": "Regular", "effective_date": "2017-01-01", "authority": "State", "notes": "large companies"}, {"uuid": "9eb81bb8-2a5f-4cba-ab74-da2e2cd35a5f", "wage": "10.5", "wage_type": "Regular", "effective_date": "2017-01-01", "authority": "Federal", "notes": "large companies"}] + application/json: [{"uuid": "e6efb88c-6c67-46bf-9667-a7f5c6e14bb7"}] "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + application/json: {"errors": []} post-v1-companies-company_id-bank-accounts: - Example: + speakeasy-default-post-v1-companies-company-id-bank-accounts: parameters: path: company_id: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"routing_number": "115092013", "account_number": "9775014007", "account_type": "Checking"} + application/json: {"routing_number": "", "account_number": "", "account_type": "Savings"} responses: "201": - application/json: {"uuid": "1263eae5-4411-48d9-bd6d-18ed93082e65", "company_uuid": "e2c4c0ce-2986-48b9-86cf-ec27f6ed9a36", "account_type": "Checking", "routing_number": "851070439", "hidden_account_number": "XXXX4087", "verification_status": "verified", "verification_type": "bank_deposits", "name": "Employer Funding Account"} - Basic: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} - get-v1-companies-company_id-bank-accounts: - Example: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "200": - application/json: [{"uuid": "1263eae5-4411-48d9-bd6d-18ed93082e65", "company_uuid": "e2c4c0ce-2986-48b9-86cf-ec27f6ed9a36", "account_type": "Checking", "routing_number": "851070439", "hidden_account_number": "XXXX4087", "verification_status": "verified", "verification_type": "bank_deposits", "name": "Employer Funding Account"}] + application/json: {"uuid": "035098fc-43ca-4e65-9b38-e0b3c4343abe"} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} put-v1-companies-company_id-bank-accounts-verify: Example: parameters: @@ -2548,7 +2671,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"deposit_1": 7888.92, "deposit_2": 1895.95} + application/json: {"deposit_1": 8299.3, "deposit_2": 7367.9} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -2560,7 +2683,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"deposit_1": 1870.97, "deposit_2": 2271.38} + application/json: {"deposit_1": 8299.3, "deposit_2": 7367.9} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -2572,10 +2695,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"deposit_1": 7567.55, "deposit_2": 3940.54} + application/json: {"deposit_1": 8299.3, "deposit_2": 7367.9} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-plaid-processor_token: Create a company bank account: parameters: @@ -2585,18 +2708,9 @@ examples: application/json: {"owner_type": "Company", "owner_id": "ef279fbd-0fc6-4cf1-a977-6939d621c429", "processor_token": "processor-sandbox-0asd1-a92nc"} responses: "201": - application/json: {"uuid": "afd4e6f4-0bd3-4b76-a322-cf15a57e637c"} + application/json: {"uuid": "cad871b5-7c72-4398-9874-9b5407e7ce36"} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - Example: - parameters: - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"owner_type": "Company", "owner_id": "", "processor_token": ""} - responses: - "201": - application/json: {"uuid": "1263eae5-4411-48d9-bd6d-18ed93082e65", "company_uuid": "e2c4c0ce-2986-48b9-86cf-ec27f6ed9a36", "account_type": "Checking", "routing_number": "851070439", "hidden_account_number": "XXXX4087", "verification_status": "verified", "verification_type": "plaid_external", "name": "Employer Funding Account"} + application/json: {"errors": [{"error_key": "", "category": ""}]} Basic: parameters: header: @@ -2623,7 +2737,18 @@ examples: application/json: {"owner_type": "Company", "owner_id": "", "processor_token": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + delete-v1-companies-company_id-bank-accounts-bank_account_id: + speakeasy-default-delete-v1-companies-company-id-bank-accounts-bank-account-id: + parameters: + path: + company_id: "" + bank_account_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} post-v1-external-payroll: Example: parameters: @@ -2635,7 +2760,7 @@ examples: application/json: {"check_date": "2022-06-01", "payment_period_start_date": "2022-05-15", "payment_period_end_date": "2022-05-30"} responses: "200": - application/json: {"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "company_uuid": "bcb305b0-2855-4025-8d22-e484a9e6b7c9", "check_date": "2022-06-03T00:00:00Z", "payment_period_start_date": "2022-05-15T00:00:00Z", "payment_period_end_date": "2022-05-30T00:00:00Z", "status": "unprocessed", "external_payroll_items": [{"employee_uuid": "44f7cba9-7a3d-4f08-b7bd-6fcf5211f8ca", "earnings": [{"amount": "10000.0", "hours": "0.0", "earning_type": "CompanyPayType", "earning_id": 1}, {"amount": "500.0", "hours": "0.0", "earning_type": "CompanyEarningType", "earning_id": 4}], "benefits": [{"benefit_id": 22, "company_contribution_amount": "100.0", "employee_deduction_amount": "50.0"}, {"benefit_id": 25, "company_contribution_amount": "0.0", "employee_deduction_amount": "300.0"}], "taxes": [{"tax_id": 1, "amount": "400.0"}, {"tax_id": 2, "amount": "60.0"}]}], "applicable_earnings": [{"earning_type": "CompanyPayType", "earning_id": 1, "name": "Regular Wages", "input_type": "amount", "category": "default"}, {"earning_type": "CompanyEarningType", "earning_id": 4, "name": "Cash Tips", "input_type": "amount", "category": "default"}], "applicable_benefits": [{"id": 22, "description": "Kaiser", "active": true}, {"id": 25, "description": "HSA", "active": true}], "applicable_taxes": [{"id": 1, "name": "Federal Income Tax", "employer_tax": false, "resident_tax": false}, {"id": 2, "name": "Social Security", "employer_tax": false, "resident_tax": false}], "metadata": {"deletable": true}} + application/json: {"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "company_uuid": "bcb305b0-2855-4025-8d22-e484a9e6b7c9", "check_date": "2022-06-03", "payment_period_start_date": "2022-05-15", "payment_period_end_date": "2022-05-30", "status": "unprocessed", "external_payroll_items": [{"employee_uuid": "44f7cba9-7a3d-4f08-b7bd-6fcf5211f8ca", "earnings": [{"amount": "10000.0", "hours": "0.0", "earning_type": "CompanyPayType", "earning_id": 1}, {"amount": "500.0", "hours": "0.0", "earning_type": "CompanyEarningType", "earning_id": 4}], "benefits": [{"benefit_id": 22, "company_contribution_amount": "100.0", "employee_deduction_amount": "50.0"}, {"benefit_id": 25, "company_contribution_amount": "0.0", "employee_deduction_amount": "300.0"}], "taxes": [{"tax_id": 1, "amount": "400.0"}, {"tax_id": 2, "amount": "60.0"}]}], "applicable_earnings": [{"earning_type": "CompanyPayType", "earning_id": 1, "name": "Regular Wages", "input_type": "amount", "category": "default"}, {"earning_type": "CompanyEarningType", "earning_id": 4, "name": "Cash Tips", "input_type": "amount", "category": "default"}], "applicable_benefits": [{"id": 22, "description": "Kaiser", "active": true}, {"id": 25, "description": "HSA", "active": true}], "applicable_taxes": [{"id": 1, "name": "Federal Income Tax", "employer_tax": false, "resident_tax": false}, {"id": 2, "name": "Social Security", "employer_tax": false, "resident_tax": false}], "metadata": {"deletable": true}} Basic: parameters: path: @@ -2668,7 +2793,7 @@ examples: application/json: {"check_date": "", "payment_period_start_date": "", "payment_period_end_date": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-company-external-payrolls: Example: parameters: @@ -2678,7 +2803,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "company_uuid": "bcb305b0-2855-4025-8d22-e484a9e6b7c9", "check_date": "2022-06-03T00:00:00Z", "payment_period_start_date": "2022-05-15T00:00:00Z", "payment_period_end_date": "2022-05-30T00:00:00Z", "status": "unprocessed"}] + application/json: [{"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "company_uuid": "bcb305b0-2855-4025-8d22-e484a9e6b7c9", "check_date": "2022-06-03", "payment_period_start_date": "2022-05-15", "payment_period_end_date": "2022-05-30", "status": "unprocessed"}] get-v1-external-payroll: Example: parameters: @@ -2689,7 +2814,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "company_uuid": "bcb305b0-2855-4025-8d22-e484a9e6b7c9", "check_date": "2022-06-03T00:00:00Z", "payment_period_start_date": "2022-05-15T00:00:00Z", "payment_period_end_date": "2022-05-30T00:00:00Z", "status": "unprocessed", "external_payroll_items": [{"employee_uuid": "44f7cba9-7a3d-4f08-b7bd-6fcf5211f8ca", "earnings": [{"amount": "10000.0", "hours": "0.0", "earning_type": "CompanyPayType", "earning_id": 1}, {"amount": "500.0", "hours": "0.0", "earning_type": "CompanyEarningType", "earning_id": 4}], "benefits": [{"benefit_id": 22, "company_contribution_amount": "100.0", "employee_deduction_amount": "50.0"}, {"benefit_id": 25, "company_contribution_amount": "0.0", "employee_deduction_amount": "300.0"}], "taxes": [{"tax_id": 1, "amount": "400.0"}, {"tax_id": 2, "amount": "60.0"}]}], "applicable_earnings": [{"earning_type": "CompanyPayType", "earning_id": 1, "name": "Regular Wages", "input_type": "amount", "category": "default"}, {"earning_type": "CompanyEarningType", "earning_id": 4, "name": "Cash Tips", "input_type": "amount", "category": "default"}], "applicable_benefits": [{"id": 22, "description": "Kaiser", "active": true}, {"id": 25, "description": "HSA", "active": true}], "applicable_taxes": [{"id": 1, "name": "Federal Income Tax", "employer_tax": false, "resident_tax": false}, {"id": 2, "name": "Social Security", "employer_tax": false, "resident_tax": false}], "metadata": {"deletable": true}} + application/json: {"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "company_uuid": "bcb305b0-2855-4025-8d22-e484a9e6b7c9", "check_date": "2022-06-03", "payment_period_start_date": "2022-05-15", "payment_period_end_date": "2022-05-30", "status": "unprocessed", "external_payroll_items": [{"employee_uuid": "44f7cba9-7a3d-4f08-b7bd-6fcf5211f8ca", "earnings": [{"amount": "10000.0", "hours": "0.0", "earning_type": "CompanyPayType", "earning_id": 1}, {"amount": "500.0", "hours": "0.0", "earning_type": "CompanyEarningType", "earning_id": 4}], "benefits": [{"benefit_id": 22, "company_contribution_amount": "100.0", "employee_deduction_amount": "50.0"}, {"benefit_id": 25, "company_contribution_amount": "0.0", "employee_deduction_amount": "300.0"}], "taxes": [{"tax_id": 1, "amount": "400.0"}, {"tax_id": 2, "amount": "60.0"}]}], "applicable_earnings": [{"earning_type": "CompanyPayType", "earning_id": 1, "name": "Regular Wages", "input_type": "amount", "category": "default"}, {"earning_type": "CompanyEarningType", "earning_id": 4, "name": "Cash Tips", "input_type": "amount", "category": "default"}], "applicable_benefits": [{"id": 22, "description": "Kaiser", "active": true}, {"id": 25, "description": "HSA", "active": true}], "applicable_taxes": [{"id": 1, "name": "Federal Income Tax", "employer_tax": false, "resident_tax": false}, {"id": 2, "name": "Social Security", "employer_tax": false, "resident_tax": false}], "metadata": {"deletable": true}} delete-v1-external-payroll: speakeasy-default-delete-v1-external-payroll: parameters: @@ -2710,7 +2835,7 @@ examples: application/json: {"replace_fields": true, "external_payroll_items": [{"employee_uuid": "403c6ee3-5f58-40ef-a117-ff7175cd9ee3", "earnings": [{"hours": "0.0", "amount": "200.00", "earning_id": 1, "earning_type": "CompanyPayType"}, {"hours": "0.0", "amount": "5000.00", "earning_id": 2, "earning_type": "CompanyEarningType"}], "benefits": [{"company_contribution_amount": "300.0", "employee_deduction_amount": "300.0", "benefit_id": 10}, {"company_contribution_amount": "50.0", "employee_deduction_amount": "100.0", "benefit_id": 21}], "taxes": [{"amount": "20.0", "tax_id": 1}, {"amount": "100.0", "tax_id": 2}]}]} responses: "200": - application/json: {"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "company_uuid": "bcb305b0-2855-4025-8d22-e484a9e6b7c9", "check_date": "2022-06-03T00:00:00Z", "payment_period_start_date": "2022-05-15T00:00:00Z", "payment_period_end_date": "2022-05-30T00:00:00Z", "status": "unprocessed", "external_payroll_items": [{"employee_uuid": "44f7cba9-7a3d-4f08-b7bd-6fcf5211f8ca", "earnings": [{"amount": "10000.0", "hours": "0.0", "earning_type": "CompanyPayType", "earning_id": 1}, {"amount": "500.0", "hours": "0.0", "earning_type": "CompanyEarningType", "earning_id": 4}], "benefits": [{"benefit_id": 22, "company_contribution_amount": "100.0", "employee_deduction_amount": "50.0"}, {"benefit_id": 25, "company_contribution_amount": "0.0", "employee_deduction_amount": "300.0"}], "taxes": [{"tax_id": 1, "amount": "400.0"}, {"tax_id": 2, "amount": "60.0"}]}], "applicable_earnings": [{"earning_type": "CompanyPayType", "earning_id": 1, "name": "Regular Wages", "input_type": "amount", "category": "default"}, {"earning_type": "CompanyEarningType", "earning_id": 4, "name": "Cash Tips", "input_type": "amount", "category": "default"}], "applicable_benefits": [{"id": 22, "description": "Kaiser", "active": true}, {"id": 25, "description": "HSA", "active": true}], "applicable_taxes": [{"id": 1, "name": "Federal Income Tax", "employer_tax": false, "resident_tax": false}, {"id": 2, "name": "Social Security", "employer_tax": false, "resident_tax": false}], "metadata": {"deletable": true}} + application/json: {"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "company_uuid": "bcb305b0-2855-4025-8d22-e484a9e6b7c9", "check_date": "2022-06-03", "payment_period_start_date": "2022-05-15", "payment_period_end_date": "2022-05-30", "status": "unprocessed", "external_payroll_items": [{"employee_uuid": "44f7cba9-7a3d-4f08-b7bd-6fcf5211f8ca", "earnings": [{"amount": "10000.0", "hours": "0.0", "earning_type": "CompanyPayType", "earning_id": 1}, {"amount": "500.0", "hours": "0.0", "earning_type": "CompanyEarningType", "earning_id": 4}], "benefits": [{"benefit_id": 22, "company_contribution_amount": "100.0", "employee_deduction_amount": "50.0"}, {"benefit_id": 25, "company_contribution_amount": "0.0", "employee_deduction_amount": "300.0"}], "taxes": [{"tax_id": 1, "amount": "400.0"}, {"tax_id": 2, "amount": "60.0"}]}], "applicable_earnings": [{"earning_type": "CompanyPayType", "earning_id": 1, "name": "Regular Wages", "input_type": "amount", "category": "default"}, {"earning_type": "CompanyEarningType", "earning_id": 4, "name": "Cash Tips", "input_type": "amount", "category": "default"}], "applicable_benefits": [{"id": 22, "description": "Kaiser", "active": true}, {"id": 25, "description": "HSA", "active": true}], "applicable_taxes": [{"id": 1, "name": "Federal Income Tax", "employer_tax": false, "resident_tax": false}, {"id": 2, "name": "Social Security", "employer_tax": false, "resident_tax": false}], "metadata": {"deletable": true}} Basic: parameters: path: @@ -2746,7 +2871,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-external-payroll-calculate-taxes: Example: parameters: @@ -2767,7 +2892,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [[{"tax_id": 1, "tax_name": "Federal Income Tax", "last_unpaid_external_payroll_uuid": null, "possible_liabilities": [{"liability_amount": "0.0", "payroll_check_date": null, "external_payroll_uuid": null}, {"liability_amount": "3000.0", "payroll_check_date": "2022-06-01T00:00:00Z", "external_payroll_uuid": "1bf1efe1-72d4-4e6e-a181-611f3ea66435"}]}], [{"tax_id": 2, "tax_name": "Social Security", "last_unpaid_external_payroll_uuid": null, "possible_liabilities": [{"liability_amount": "0.0", "payroll_check_date": null, "external_payroll_uuid": null}, {"liability_amount": "50.0", "payroll_check_date": "2022-06-01T00:00:00Z", "external_payroll_uuid": "1bf1efe1-72d4-4e6e-a181-611f3ea66435"}]}]] + application/json: [[{"tax_id": 1, "tax_name": "Federal Income Tax", "last_unpaid_external_payroll_uuid": null, "possible_liabilities": [{"liability_amount": "0.0", "payroll_check_date": null, "external_payroll_uuid": null}, {"liability_amount": "3000.0", "payroll_check_date": "2022-06-01", "external_payroll_uuid": "1bf1efe1-72d4-4e6e-a181-611f3ea66435"}]}], [{"tax_id": 2, "tax_name": "Social Security", "last_unpaid_external_payroll_uuid": null, "possible_liabilities": [{"liability_amount": "0.0", "payroll_check_date": null, "external_payroll_uuid": null}, {"liability_amount": "50.0", "payroll_check_date": "2022-06-01", "external_payroll_uuid": "1bf1efe1-72d4-4e6e-a181-611f3ea66435"}]}]] put-v1-tax-liabilities: Example: parameters: @@ -2779,7 +2904,7 @@ examples: application/json: {"liability_selections": [{"tax_id": 1, "last_unpaid_external_payroll_uuid": "7985032c-ee3a-4e98-af27-d56551eb5f1c", "unpaid_liability_amount": 50}, {"tax_id": 2, "last_unpaid_external_payroll_uuid": "5ed14dbb-958f-47c8-b16e-c4fed82dc486", "unpaid_liability_amount": 400}, {"tax_id": 8, "last_unpaid_external_payroll_uuid": null, "unpaid_liability_amount": 0}]} responses: "200": - application/json: [[{"tax_id": 1, "tax_name": "Federal Income Tax", "last_unpaid_external_payroll_uuid": null, "possible_liabilities": [{"liability_amount": "0.0", "payroll_check_date": null, "external_payroll_uuid": null}, {"liability_amount": "3000.0", "payroll_check_date": "2022-06-01T00:00:00Z", "external_payroll_uuid": "1bf1efe1-72d4-4e6e-a181-611f3ea66435"}]}], [{"tax_id": 2, "tax_name": "Social Security", "last_unpaid_external_payroll_uuid": null, "possible_liabilities": [{"liability_amount": "0.0", "payroll_check_date": null, "external_payroll_uuid": null}, {"liability_amount": "50.0", "payroll_check_date": "2022-06-01T00:00:00Z", "external_payroll_uuid": "1bf1efe1-72d4-4e6e-a181-611f3ea66435"}]}]] + application/json: [[{"tax_id": 1, "tax_name": "Federal Income Tax", "last_unpaid_external_payroll_uuid": null, "possible_liabilities": [{"liability_amount": "0.0", "payroll_check_date": null, "external_payroll_uuid": null}, {"liability_amount": "3000.0", "payroll_check_date": "2022-06-01", "external_payroll_uuid": "1bf1efe1-72d4-4e6e-a181-611f3ea66435"}]}], [{"tax_id": 2, "tax_name": "Social Security", "last_unpaid_external_payroll_uuid": null, "possible_liabilities": [{"liability_amount": "0.0", "payroll_check_date": null, "external_payroll_uuid": null}, {"liability_amount": "50.0", "payroll_check_date": "2022-06-01", "external_payroll_uuid": "1bf1efe1-72d4-4e6e-a181-611f3ea66435"}]}]] Basic: parameters: path: @@ -2812,7 +2937,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-v1-tax-liabilities-finish: Basic: parameters: @@ -2840,7 +2965,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-company-payment-configs: Example: parameters: @@ -2850,7 +2975,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"company_uuid": "423dd616-6dbc-4724-938a-403f6217a933", "partner_uuid": "556f05d0-48e0-4c47-bce5-db9aea923043", "fast_payment_limit": "5000", "payment_speed": "2-day"} + application/json: {"company_uuid": "423dd616-6dbc-4724-938a-403f6217a933", "partner_uuid": "556f05d0-48e0-4c47-bce5-db9aea923043", "fast_payment_limit": "5000", "payment_speed": "2-day", "earned_fast_ach_blockers": [{"blocker_type": "minimum_days", "threshold": 15}, {"blocker_type": "minimum_funded_payments", "threshold": 1}]} put-v1-company-payment-configs: Example: parameters: @@ -2862,7 +2987,7 @@ examples: application/json: {"fast_payment_limit": "5000", "payment_speed": "2-day"} responses: "200": - application/json: {"company_uuid": "423dd616-6dbc-4724-938a-403f6217a933", "partner_uuid": "556f05d0-48e0-4c47-bce5-db9aea923043", "fast_payment_limit": "5000", "payment_speed": "2-day"} + application/json: {"company_uuid": "423dd616-6dbc-4724-938a-403f6217a933", "partner_uuid": "556f05d0-48e0-4c47-bce5-db9aea923043", "fast_payment_limit": "5000", "payment_speed": "2-day", "earned_fast_ach_blockers": [{"blocker_type": "minimum_days", "threshold": 15}, {"blocker_type": "minimum_funded_payments", "threshold": 1}]} Basic: parameters: path: @@ -2870,7 +2995,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"payment_speed": "2-day"} + application/json: {"fast_payment_limit": ""} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -2892,10 +3017,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"payment_speed": "2-day"} + application/json: {"payment_speed": "4-day"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-companies-company_id-pay_schedules: Example: parameters: @@ -2915,7 +3040,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"frequency": "Every other week", "anchor_pay_date": "2020-05-15", "anchor_end_of_pay_period": "2020-05-08"} + application/json: {"frequency": "Every week", "anchor_pay_date": "2020-05-15", "anchor_end_of_pay_period": "2020-05-08"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -2926,7 +3051,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"frequency": "Twice per month", "anchor_pay_date": "2020-05-15", "anchor_end_of_pay_period": "2020-05-08"} + application/json: {"frequency": "Every week", "anchor_pay_date": "2020-05-15", "anchor_end_of_pay_period": "2020-05-08"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -2937,35 +3062,34 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"frequency": "Every other week", "anchor_pay_date": "2020-05-15", "anchor_end_of_pay_period": "2020-05-08"} + application/json: {"frequency": "Every week", "anchor_pay_date": "2020-05-15", "anchor_end_of_pay_period": "2020-05-08"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-pay_schedules: Example: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": application/json: [{"uuid": "2097fe08-407a-46d7-b35c-a32402a2355e", "frequency": "Twice per month", "anchor_pay_date": "2020-05-15", "anchor_end_of_pay_period": "2020-05-08", "day_1": 15, "day_2": 31, "name": "Engineering", "custom_name": "Engineering department pay schedule", "auto_pilot": false, "active": true, "version": "68934a3e9455fa72420237eb05902327"}, {"uuid": "8fc9f556-74fa-4271-97f6-4bfbfc5a5352", "frequency": "Monthly", "anchor_pay_date": "2020-05-31", "day_1": 31, "day_2": null, "name": "Sales", "custom_name": "Sales department monthly schedule", "auto_pilot": false, "active": false, "version": "68934a3e9455fa72420237eb05902320"}, {"uuid": "0e07d35a-af11-4123-bfcb-4dd5f2f12ee1", "frequency": "Monthly", "anchor_pay_date": "2020-05-31", "day_1": 31, "day_2": null, "name": "Staff", "custom_name": "Staff department pay schedule", "auto_pilot": true, "active": false, "version": "68934a3e9455fa72420237eb05902323"}] get-v1-companies-company_id-pay_schedules-preview: - Example: + speakeasy-default-get-v1-companies-company-id-pay-schedules-preview: parameters: path: company_id: "" query: - frequency: "Every other week" + frequency: "Monthly" anchor_pay_date: "2020-05-15" anchor_end_of_pay_period: "2020-05-08" header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"pay_periods": [{"check_date": "2023-12-15T00:00:00Z", "run_payroll_by": "2023-12-13T00:00:00Z", "start_date": "2023-10-01T00:00:00Z", "end_date": "2023-12-31T00:00:00Z"}, {"check_date": "2024-03-15T00:00:00Z", "run_payroll_by": "2024-03-13T00:00:00Z", "start_date": "2024-01-01T00:00:00Z", "end_date": "2024-03-31T00:00:00Z"}, {"check_date": "2024-06-14T00:00:00Z", "run_payroll_by": "2024-06-12T00:00:00Z", "start_date": "2024-04-01T00:00:00Z", "end_date": "2024-06-30T00:00:00Z"}, {"check_date": "2024-09-13T00:00:00Z", "run_payroll_by": "2024-09-11T00:00:00Z", "start_date": "2024-07-01T00:00:00Z", "end_date": "2024-09-30T00:00:00Z"}], "holidays": ["2023-10-09T00:00:00Z", "2023-11-11T00:00:00Z", "2023-11-23T00:00:00Z", "2023-12-25T00:00:00Z", "2024-01-01T00:00:00Z", "2024-01-15T00:00:00Z", "2024-02-19T00:00:00Z", "2024-05-27T00:00:00Z", "2024-06-19T00:00:00Z", "2024-07-04T00:00:00Z", "2024-09-02T00:00:00Z"]} + application/json: {} get-v1-companies-company_id-pay_schedules-pay_schedule_id: Example: parameters: @@ -3025,7 +3149,7 @@ examples: application/json: {"version": "", "anchor_pay_date": "2020-05-15", "anchor_end_of_pay_period": "2020-05-08"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-pay_periods: Example: parameters: @@ -3070,7 +3194,7 @@ examples: application/json: {"type": "by_employee", "employees": [{"employee_uuid": "f0238368-f2cf-43e2-9a07-b0265f2cec69", "pay_schedule_uuid": "c277ac52-9871-4a96-a1e6-0c449684602a"}]} responses: "200": - application/json: {"type": "hourly_salaried", "employee_changes": [{"employee_uuid": "43b39ada-dc49-4879-9594-fe95f67ae434", "first_name": "Penny", "last_name": "Parker", "pay_frequency": "Twice per month — Salaried pay schedule", "first_pay_period": {"pay_schedule_uuid": "3f029a58-155d-4c30-8361-cc266b2c1f11", "start_date": "2023-07-01T00:00:00Z", "end_date": "2023-08-01T00:00:00Z", "check_date": "2023-08-02T00:00:00Z"}, "transition_pay_period": {"start_date": "2023-06-20T00:00:00Z", "end_date": "2023-06-30T00:00:00Z"}}]} + application/json: {"type": "hourly_salaried", "employee_changes": [{"employee_uuid": "43b39ada-dc49-4879-9594-fe95f67ae434", "first_name": "Penny", "last_name": "Parker", "pay_frequency": "Twice per month — Salaried pay schedule", "first_pay_period": {"pay_schedule_uuid": "3f029a58-155d-4c30-8361-cc266b2c1f11", "start_date": "2023-07-01", "end_date": "2023-08-01", "check_date": "2023-08-02"}, "transition_pay_period": {"start_date": "2023-06-20", "end_date": "2023-06-30"}}]} Basic: parameters: path: @@ -3078,7 +3202,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "hourly_salaried"} + application/json: {"type": "by_employee"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -3089,7 +3213,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "hourly_salaried"} + application/json: {"type": "by_employee"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -3100,10 +3224,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "single"} + application/json: {"type": "by_employee"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-companies-company_id-pay_schedules-assign: Example: parameters: @@ -3115,7 +3239,7 @@ examples: application/json: {"type": "by_employee", "employees": [{"employee_uuid": "f0238368-f2cf-43e2-9a07-b0265f2cec69", "pay_schedule_uuid": "c277ac52-9871-4a96-a1e6-0c449684602a"}]} responses: "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": [{"error_key": "", "category": ""}]} Basic: parameters: path: @@ -3123,7 +3247,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "single"} + application/json: {"type": "hourly_salaried"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -3145,48 +3269,44 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "by_department"} + application/json: {"type": "hourly_salaried"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-employees: - test_example: + speakeasy-default-get-v1-companies-company-id-employees: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "d6d55ac1-802f-403a-bb0a-0543bb5670c3", "first_name": "Boaty", "middle_initial": null, "last_name": "Jenkins", "email": "freda_gaylord@nikolausgottlieb.com", "company_uuid": "278819f0-5bb9-4af8-8981-5ef539471969", "manager_uuid": null, "version": "b252e3ee842587da40dd4c9206dcb650", "department": null, "terminated": false, "two_percent_shareholder": false, "onboarded": true, "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "6e481688-c92b-41ab-ba11-90cd77060846", "version": "7b3c1d34eedab81d57ee2dfe89cec6e1", "employee_uuid": "d6d55ac1-802f-403a-bb0a-0543bb5670c3", "hire_date": "2024-05-15", "title": "", "primary": true, "rate": "80000.00", "payment_unit": "Year", "current_compensation_uuid": "a26f36aa-8255-499e-aabd-7404c40db3c2", "two_percent_shareholder": false, "state_wc_covered": null, "state_wc_class_code": null, "compensations": [{"uuid": "a26f36aa-8255-499e-aabd-7404c40db3c2", "version": "1c5b6d134862dee3598c87e6c6300f51", "job_uuid": "6e481688-c92b-41ab-ba11-90cd77060846", "employee_uuid": "d6d55ac1-802f-403a-bb0a-0543bb5670c3", "rate": "80000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2025-05-15", "adjust_for_minimum_wage": false, "minimum_wages": []}]}], "eligible_paid_time_off": [], "terminations": [], "garnishments": [], "date_of_birth": "2005-05-15", "has_ssn": true, "ssn": "", "phone": null, "preferred_first_name": null, "payment_method": "Direct Deposit", "work_email": null, "current_employment_status": "full_time"}, {"uuid": "40bb57f6-3a64-4ab9-9338-1d1a711db7ed", "first_name": "Cathrine", "middle_initial": null, "last_name": "Jacobson", "email": "hai@morissette.ca", "company_uuid": "278819f0-5bb9-4af8-8981-5ef539471969", "manager_uuid": null, "version": "838143794e09a50eab0207f2e7238520", "department": null, "terminated": false, "two_percent_shareholder": false, "onboarded": true, "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "db9cd327-96e0-4b53-a94d-1546378c647e", "version": "7b3c1d34eedab81d57ee2dfe89cec6e1", "employee_uuid": "40bb57f6-3a64-4ab9-9338-1d1a711db7ed", "hire_date": "2024-05-15", "title": "", "primary": true, "rate": "80000.00", "payment_unit": "Year", "current_compensation_uuid": "8b7dd287-46f1-4bdf-b245-ec4a8ceaef34", "two_percent_shareholder": false, "state_wc_covered": null, "state_wc_class_code": null, "compensations": [{"uuid": "8b7dd287-46f1-4bdf-b245-ec4a8ceaef34", "version": "1c5b6d134862dee3598c87e6c6300f51", "job_uuid": "db9cd327-96e0-4b53-a94d-1546378c647e", "employee_uuid": "40bb57f6-3a64-4ab9-9338-1d1a711db7ed", "rate": "80000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2025-05-15", "adjust_for_minimum_wage": false, "minimum_wages": []}]}], "eligible_paid_time_off": [], "terminations": [], "garnishments": [], "date_of_birth": "2005-05-15", "has_ssn": true, "ssn": "", "phone": null, "preferred_first_name": null, "payment_method": "Direct Deposit", "work_email": null, "current_employment_status": "full_time"}] + application/json: [{"uuid": "4307c952-e601-46fc-91a2-043e6046adf0", "first_name": "Iva", "last_name": "DuBuque-Rice", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check", "current_home_address": {"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true}, "all_home_addresses": [{"street_1": "412 Kiera Stravenue", "street_2": "Suite 391", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "USA", "active": true}]}] "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + application/json: {"errors": [{"error_key": "", "category": ""}]} post-v1-employees: - request_example_1: + speakeasy-default-post-v1-employees: parameters: path: company_id: "" header: X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"first_name": "Karl", "last_name": "The Fog"} responses: "201": - application/json: {"uuid": "7a621cf0-21cd-49cf-8540-3315211a509a", "first_name": "Adrienne", "last_name": "Barrows", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}, {"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} + application/json: {"uuid": "9f634ba6-53c8-4290-8751-3ec38c369860", "first_name": "Lela", "last_name": "Graham", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} "404": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - test_example: + application/json: {"errors": [{"error_key": "", "category": ""}]} + get-v1-companies-company_id-employees-payment_details: + speakeasy-default-get-v1-companies-company-id-employees-payment-details: parameters: path: company_id: "" header: X-Gusto-API-Version: "2024-04-01" responses: - "201": - application/json: {"uuid": "83f84a60-a44c-49dc-8b61-db364d7cfbf4", "first_name": "Karl", "middle_initial": null, "last_name": "The Fog", "email": null, "company_uuid": "085cb0bf-c271-4f33-9d25-4b7ed5534358", "manager_uuid": null, "version": "5211ee9bb08e51634431a18eff0afc64", "department": null, "terminated": false, "two_percent_shareholder": null, "onboarded": false, "onboarding_status": "admin_onboarding_incomplete", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [], "eligible_paid_time_off": [], "terminations": [], "garnishments": [], "date_of_birth": null, "has_ssn": false, "ssn": "", "phone": null, "preferred_first_name": null, "payment_method": "Check", "work_email": null, "current_employment_status": null} - "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + "200": + application/json: [{}] post-v1-historical_employees: Example: parameters: @@ -3198,7 +3318,7 @@ examples: application/json: {"first_name": "Soren", "middle_initial": "A", "last_name": "Kierkegaard", "preferred_first_name": "Angel", "date_of_birth": "1995-05-05T00:00:00Z", "ssn": "123456294", "work_address": {"location_uuid": "1da85d35-1910-4d5e-8e94-39e8cdfe8c9a"}, "home_address": {"street_1": "300 3rd Street", "street_2": null, "city": "San Francisco", "state": "CA", "zip": "94107"}, "termination": {"effective_date": "2022-09-15T00:00:00Z"}, "job": {"hire_date": "2018-05-09T00:00:00Z"}, "employee_state_taxes": {"wc_covered": true, "wc_class_code": "20992"}} responses: "201": - application/json: {"uuid": "343d0c6d-59cf-406a-b907-c450bb8474b6", "first_name": "Kamille", "last_name": "Gorczany-Konopelski", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}, {"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}, {"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} + application/json: {"uuid": "45116f7a-de06-4b2f-909d-e165750c815e", "first_name": "Darrion", "last_name": "Von", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} "422": application/json: {"errors": []} Create Historical Employee Example: @@ -3208,10 +3328,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"first_name": "Jermaine", "last_name": "Altenwerth", "date_of_birth": "1985-11-28", "ssn": "", "work_address": {}, "home_address": {"street_1": "", "city": "Heaneyfield", "state": "Louisiana", "zip": "98459"}, "termination": {}, "job": {}} + application/json: {"first_name": "Maida", "last_name": "Schroeder", "date_of_birth": "1959-03-15", "ssn": "", "work_address": {}, "home_address": {"street_1": "", "city": "Beerstead", "state": "Arizona", "zip": "05000-6136"}, "termination": {}, "job": {}} responses: "201": - application/json: {"uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "first_name": "Karl", "middle_initial": null, "last_name": "Jaskolski", "email": null, "company_uuid": "3c69d228-a250-49b4-9946-24e4e4294da4", "manager_uuid": null, "version": "dedac972dd28945fcd6cd941723cc71a", "department": null, "terminated": true, "two_percent_shareholder": false, "onboarded": true, "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "f0be5480-7a15-4583-b0d0-789c02a1afe4", "version": "1c0722f3e090713b6a0db7c39904693e", "employee_uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "hire_date": "2023-11-01", "title": "Client Support Director", "primary": true, "rate": "70000.00", "payment_unit": "Year", "current_compensation_uuid": "1a1faa42-274b-4440-b200-a5d81df14af2", "compensations": [{"uuid": "145660ed-6fcc-4211-8915-18e2786290a2", "version": "2cd4b18662395eb53bcf80d5b5447f36", "job_uuid": "857feae3-414e-445d-b28b-2eb3ef50155e", "rate": "70000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2023-11-01", "adjust_for_minimum_wage": false, "minimum_wages": []}]}], "eligible_paid_time_off": [], "terminations": [{"uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "version": "e6c865df784842196d411c1466b01686", "employee_uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "active": false, "cancelable": true, "effective_date": "2023-12-31T00:00:00Z", "run_termination_payroll": false}], "garnishments": [], "date_of_birth": "1986-06-25", "has_ssn": false, "ssn": "", "phone": null, "preferred_first_name": null, "payment_method": "Check", "work_email": null} + application/json: {"uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "first_name": "Karl", "middle_initial": null, "last_name": "Jaskolski", "email": null, "company_uuid": "3c69d228-a250-49b4-9946-24e4e4294da4", "manager_uuid": null, "version": "dedac972dd28945fcd6cd941723cc71a", "department": null, "terminated": true, "two_percent_shareholder": false, "work_email": null, "onboarded": true, "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "f0be5480-7a15-4583-b0d0-789c02a1afe4", "version": "1c0722f3e090713b6a0db7c39904693e", "employee_uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "hire_date": "2023-11-01", "title": "Client Support Director", "primary": true, "rate": "70000.00", "payment_unit": "Year", "current_compensation_uuid": "1a1faa42-274b-4440-b200-a5d81df14af2", "compensations": [{"uuid": "145660ed-6fcc-4211-8915-18e2786290a2", "version": "2cd4b18662395eb53bcf80d5b5447f36", "job_uuid": "857feae3-414e-445d-b28b-2eb3ef50155e", "rate": "70000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2023-11-01", "adjust_for_minimum_wage": false, "minimum_wages": []}]}], "eligible_paid_time_off": [], "terminations": [{"uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "version": "e6c865df784842196d411c1466b01686", "employee_uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "active": false, "cancelable": true, "effective_date": "2023-12-31", "run_termination_payroll": false}], "garnishments": [], "date_of_birth": "1986-06-25", "has_ssn": false, "ssn": "", "phone": null, "preferred_first_name": null, "payment_method": "Check", "historical": true, "employee_code": "eh3st1", "department_uuid": null} Basic: parameters: path: @@ -3219,7 +3339,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"first_name": "Rae", "last_name": "Corkery", "date_of_birth": "1948-03-07", "ssn": "", "work_address": {}, "home_address": {"street_1": "", "city": "Gerholdshire", "state": "Nebraska", "zip": "28098-5552"}, "termination": {}, "job": {}} + application/json: {"first_name": "Maida", "last_name": "Schroeder", "date_of_birth": "1959-03-15", "ssn": "", "work_address": {}, "home_address": {"street_1": "", "city": "Beerstead", "state": "Arizona", "zip": "05000-6136"}, "termination": {}, "job": {}} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -3230,7 +3350,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"first_name": "Bailey", "last_name": "Quitzon", "date_of_birth": "1946-05-26", "ssn": "", "work_address": {}, "home_address": {"street_1": "", "city": "Dachtown", "state": "North Carolina", "zip": "68648-0485"}, "termination": {}, "job": {}} + application/json: {"first_name": "Maida", "last_name": "Schroeder", "date_of_birth": "1959-03-15", "ssn": "", "work_address": {}, "home_address": {"street_1": "", "city": "Beerstead", "state": "Arizona", "zip": "05000-6136"}, "termination": {}, "job": {}} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -3241,46 +3361,36 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"first_name": "Saul", "last_name": "Wintheiser-Wuckert", "date_of_birth": "1947-06-26", "ssn": "", "work_address": {}, "home_address": {"street_1": "", "city": "Bergnaumland", "state": "New Jersey", "zip": "87338"}, "termination": {}, "job": {}} + application/json: {"first_name": "Maida", "last_name": "Schroeder", "date_of_birth": "1959-03-15", "ssn": "", "work_address": {}, "home_address": {"street_1": "", "city": "Beerstead", "state": "Arizona", "zip": "05000-6136"}, "termination": {}, "job": {}} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees: - test_example: + speakeasy-default-get-v1-employees: parameters: path: employee_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "ac151743-4bea-41a3-ac1e-1707d6dcf9b0", "first_name": "Bertram", "middle_initial": null, "last_name": "Fritsch", "email": "talia@stehr.com", "company_uuid": "2f224f94-521b-4ab0-959a-192bb0c00c4d", "version": "56251d892c85d34d80c85b931760161b", "department": "Trivia 1", "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "f2c956af-bc5f-4348-b4aa-7d3ecc2db71b", "employee_uuid": "ac151743-4bea-41a3-ac1e-1707d6dcf9b0", "hire_date": "2024-05-15", "title": "Engineer", "primary": true, "two_percent_shareholder": false}], "date_of_birth": "2005-05-15", "has_ssn": true, "preferred_first_name": null, "payment_method": "Check"} - put-v1-employees: - request_example_1: - parameters: - path: - employee_id: "" - header: {} - requestBody: - application/json: {"version": "f0c06d303aab1fd909b40d4a1ad409ac", "first_name": "Weezy", "middle_initial": "F", "last_name": "Baby", "email": "tunechi@cashmoneyrecords.com", "date_of_birth": "1991-01-31", "ssn": "824920233"} - responses: - "200": - application/json: {"uuid": "d95fa7f0-e743-42ce-b47c-b60cc78135dd", "first_name": "Merlin", "last_name": "Harber", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}, {"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} + application/json: {"uuid": "c069967c-b407-431f-b3ee-0c687b3a2622", "first_name": "Dario", "last_name": "Zulauf", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} "404": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - test_example: + application/json: {"errors": [{"error_key": "", "category": ""}]} + put-v1-employees: + speakeasy-default-put-v1-employees: parameters: path: employee_id: "" - header: {} + header: + X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "first_name": "Weezy", "middle_initial": "F", "last_name": "Baby", "email": "tunechi@cashmoneyrecords.com", "work_email": "new.partner.work@example.com", "date_of_birth": "1991-01-31", "ssn": "824920233"} responses: "200": - application/json: {"uuid": "ce755bcc-c8d7-4dcc-aa1a-365fd9cb18c5", "first_name": "Weezy", "middle_initial": "F", "last_name": "Baby", "email": "tunechi@cashmoneyrecords.com", "company_uuid": "3753e3e8-d20b-4a9e-b83e-4a06f2976666", "version": "4eff5441d8f8ecc08f53a88ded36f13e", "department": null, "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "ad02c425-fa91-436b-b55a-9bd653306dd2", "employee_uuid": "ce755bcc-c8d7-4dcc-aa1a-365fd9cb18c5", "hire_date": "2024-05-15", "title": "", "primary": true, "two_percent_shareholder": false}], "date_of_birth": "1991-01-31", "has_ssn": true, "preferred_first_name": null, "payment_method": "Check"} + application/json: {"uuid": "2953c680-3178-4466-8441-8947dce42145", "first_name": "Pearl", "last_name": "Volkman", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} "404": - application/json: {"errors": [{"error_key": "base", "category": "invalid_resource_version", "message": "You are attempting to update a resource using an out-of-date version."}]} + application/json: {"errors": []} delete-v1-employee: speakeasy-default-delete-v1-employee: parameters: @@ -3289,16 +3399,15 @@ examples: header: X-Gusto-API-Version: "2024-04-01" get-v1-employees-employee_id-custom_fields: - Example: + speakeasy-default-get-v1-employees-employee-id-custom-fields: parameters: path: employee_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"custom_fields": [{"id": "ee515986-f3ca-49da-b576-2691b95262f9", "company_custom_field_id": "ea7e5d57-6abb-47d7-b654-347c142886c0", "name": "employee_level", "type": "text", "description": "Employee Level", "value": "2", "selection_options": null}, {"id": "3796e08d-c2e3-434c-b4de-4ce1893e7b59", "company_custom_field_id": "299650e4-e970-4acf-9bf0-6f05585d20ba", "name": "t-shirt size", "type": "text", "description": "What is your t-shirt size?", "value": "md", "selection_options": null}, {"id": "3796e08d-c2e3-434c-b4de-4ce1893e7b59", "company_custom_field_id": "024ec137-6c92-43a3-b061-14a9720531d6", "name": "favorite fruit", "type": "radio", "description": "Which is your favorite fruit?", "value": "apple", "selection_options": ["apple", "banana", "orange"]}]} + application/json: {} put-v1-employees-employee_id-onboarding_documents_config: Example: parameters: @@ -3312,30 +3421,19 @@ examples: "200": application/json: {"i9_document": "true"} get-v1-employees-employee_id-onboarding_status: - test_example: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "200": - application/json: {"uuid": "fc886793-beb9-464b-aecb-0f0bfbaab009", "onboarding_status": "onboarding_completed", "onboarding_steps": [{"title": "Personal details", "id": "personal_details", "required": true, "completed": true, "requirements": []}, {"title": "Enter compensation details", "id": "compensation_details", "required": true, "completed": true, "requirements": []}, {"title": "Add work address", "id": "add_work_address", "required": true, "completed": true, "requirements": []}, {"title": "Add home address", "id": "add_home_address", "required": true, "completed": true, "requirements": []}, {"title": "Enter federal tax withholdings", "id": "federal_tax_setup", "required": true, "completed": true, "requirements": []}, {"title": "Enter state tax information", "id": "state_tax_setup", "required": true, "completed": false, "requirements": ["add_work_address", "add_home_address"]}, {"title": "Direct deposit setup", "id": "direct_deposit_setup", "required": false, "completed": true, "requirements": []}, {"title": "Employee form signing", "id": "employee_form_signing", "required": true, "completed": false, "requirements": ["federal_tax_setup", "state_tax_setup"]}, {"title": "File new hire report", "id": "file_new_hire_report", "required": true, "completed": false, "requirements": ["add_work_address"]}]} - put-v1-employees-employee_id-onboarding_status: - request_example_1: + speakeasy-default-get-v1-employees-employee-id-onboarding-status: parameters: path: employee_id: "" header: X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"onboarding_status": "admin_onboarding_incomplete"} responses: "200": - application/json: {"uuid": "75e8eff6-5962-4484-81aa-a27f8239a25f"} + application/json: {"uuid": "27985bea-af9a-4b43-bbbe-37e7b0e0ba90"} "404": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - test_example: + application/json: {"errors": [{"error_key": "", "category": ""}]} + put-v1-employees-employee_id-onboarding_status: + speakeasy-default-put-v1-employees-employee-id-onboarding-status: parameters: path: employee_id: "" @@ -3345,9 +3443,9 @@ examples: application/json: {"onboarding_status": "admin_onboarding_incomplete"} responses: "200": - application/json: {"uuid": "6b811a65-1944-45e6-99ce-b5c245cecd17", "onboarding_status": "admin_onboarding_incomplete", "onboarding_steps": [{"title": "Personal details", "id": "personal_details", "required": true, "completed": false, "requirements": []}, {"title": "Enter compensation details", "id": "compensation_details", "required": true, "completed": true, "requirements": []}, {"title": "Add work address", "id": "add_work_address", "required": true, "completed": false, "requirements": []}, {"title": "Add home address", "id": "add_home_address", "required": true, "completed": false, "requirements": []}, {"title": "Enter federal tax withholdings", "id": "federal_tax_setup", "required": true, "completed": false, "requirements": []}, {"title": "Enter state tax information", "id": "state_tax_setup", "required": true, "completed": false, "requirements": ["add_work_address", "add_home_address"]}, {"title": "Direct deposit setup", "id": "direct_deposit_setup", "required": false, "completed": false, "requirements": []}, {"title": "Employee form signing", "id": "employee_form_signing", "required": true, "completed": false, "requirements": ["federal_tax_setup", "state_tax_setup"]}, {"title": "File new hire report", "id": "file_new_hire_report", "required": true, "completed": false, "requirements": ["add_work_address"]}]} + application/json: {"uuid": "66aca799-a6b4-44d8-9d21-a3c9f6ca4c66"} "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + application/json: {"errors": []} get-version-employees-time_off_activities: example: parameters: @@ -3357,6 +3455,9 @@ examples: time_off_type: "" header: X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: {} put-v1-historical_employees: Example: parameters: @@ -3369,7 +3470,7 @@ examples: application/json: {"version": "db0edd04aaac4506f7edab03ac855d56", "first_name": "Soren", "middle_initial": "A", "last_name": "Kierkegaard", "date_of_birth": "1995-05-05T00:00:00Z", "ssn": "123456294", "work_address": {"location_uuid": "1da85d35-1910-4d5e-8e94-39e8cdfe8c9a"}, "home_address": {"street_1": "300 3rd Street", "street_2": null, "city": "San Francisco", "state": "CA", "zip": "94107"}, "termination": {"effective_date": "2022-09-15T00:00:00Z"}, "job": {"hire_date": "2018-05-09T00:00:00Z"}, "employee_state_taxes": {"wc_covered": true, "wc_class_code": "20992"}} responses: "200": - application/json: {"uuid": "d95fa7f0-e743-42ce-b47c-b60cc78135dd", "first_name": "Merlin", "last_name": "Harber", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}, {"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} + application/json: {"uuid": "bbb71476-e905-4ca0-98b7-eae0f22f0ab2", "first_name": "Austyn", "last_name": "Mayer", "eligible_paid_time_off": [{"accrual_unit": "Hour", "accrual_method": "unlimited", "accrual_period": "Year"}], "payment_method": "Check"} Create Historical Employee Example: parameters: path: @@ -3378,10 +3479,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "first_name": "Kory", "last_name": "Schmidt", "date_of_birth": "1948-12-03", "ssn": "", "work_address": {}, "home_address": {"street_1": "", "city": "West Madisynland", "state": "New Mexico", "zip": "41733"}, "termination": {}, "job": {}} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "first_name": "Damion", "last_name": "Vandervort", "date_of_birth": "1998-11-29", "ssn": "", "work_address": {}, "home_address": {"street_1": "", "city": "Diannafort", "state": "Oregon", "zip": "08576"}, "termination": {}, "job": {}} responses: "200": - application/json: {"uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "first_name": "Karl", "middle_initial": null, "last_name": "Jaskolski", "email": null, "company_uuid": "3c69d228-a250-49b4-9946-24e4e4294da4", "manager_uuid": null, "version": "dedac972dd28945fcd6cd941723cc71a", "department": null, "terminated": true, "two_percent_shareholder": false, "onboarded": true, "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "f0be5480-7a15-4583-b0d0-789c02a1afe4", "version": "1c0722f3e090713b6a0db7c39904693e", "employee_uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "hire_date": "2023-11-01", "title": "Client Support Director", "primary": true, "rate": "70000.00", "payment_unit": "Year", "current_compensation_uuid": "1a1faa42-274b-4440-b200-a5d81df14af2", "compensations": [{"uuid": "145660ed-6fcc-4211-8915-18e2786290a2", "version": "2cd4b18662395eb53bcf80d5b5447f36", "job_uuid": "857feae3-414e-445d-b28b-2eb3ef50155e", "rate": "70000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2023-11-01", "adjust_for_minimum_wage": false, "minimum_wages": []}]}], "eligible_paid_time_off": [], "terminations": [{"uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "version": "e6c865df784842196d411c1466b01686", "employee_uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "active": false, "cancelable": true, "effective_date": "2023-12-31T00:00:00Z", "run_termination_payroll": false}], "garnishments": [], "date_of_birth": "1986-06-25", "has_ssn": false, "ssn": "", "phone": null, "preferred_first_name": null, "payment_method": "Check", "work_email": null} + application/json: {"uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "first_name": "Karl", "middle_initial": null, "last_name": "Jaskolski", "email": null, "company_uuid": "3c69d228-a250-49b4-9946-24e4e4294da4", "manager_uuid": null, "version": "dedac972dd28945fcd6cd941723cc71a", "department": null, "terminated": true, "two_percent_shareholder": false, "work_email": null, "onboarded": true, "onboarding_status": "onboarding_completed", "onboarding_documents_config": {"uuid": null, "i9_document": false}, "jobs": [{"uuid": "f0be5480-7a15-4583-b0d0-789c02a1afe4", "version": "1c0722f3e090713b6a0db7c39904693e", "employee_uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "hire_date": "2023-11-01", "title": "Client Support Director", "primary": true, "rate": "70000.00", "payment_unit": "Year", "current_compensation_uuid": "1a1faa42-274b-4440-b200-a5d81df14af2", "compensations": [{"uuid": "145660ed-6fcc-4211-8915-18e2786290a2", "version": "2cd4b18662395eb53bcf80d5b5447f36", "job_uuid": "857feae3-414e-445d-b28b-2eb3ef50155e", "rate": "70000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2023-11-01", "adjust_for_minimum_wage": false, "minimum_wages": []}]}], "eligible_paid_time_off": [], "terminations": [{"uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "version": "e6c865df784842196d411c1466b01686", "employee_uuid": "ad85459f-8bf5-4a8f-9079-3b3fa790799e", "active": false, "cancelable": true, "effective_date": "2023-12-31", "run_termination_payroll": false}], "garnishments": [], "date_of_birth": "1986-06-25", "has_ssn": false, "ssn": "", "phone": null, "preferred_first_name": null, "payment_method": "Check", "historical": true, "employee_code": "eh3st1", "department_uuid": null} post-departments: Example: parameters: @@ -3426,7 +3527,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-companies-departments: Example: parameters: @@ -3491,7 +3592,7 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-department: Basic: parameters: @@ -3519,7 +3620,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-add-people-to-department: Example: parameters: @@ -3588,7 +3689,7 @@ examples: application/json: {"effective_date": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-terminations: Example: parameters: @@ -3628,7 +3729,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": ""} responses: "404": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -3639,7 +3740,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": ""} responses: "404": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -3650,10 +3751,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": ""} responses: "404": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-employees-employee_id-rehire: Example: parameters: @@ -3673,7 +3774,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} + application/json: {"effective_date": "", "file_new_hire_report": false, "work_location_uuid": ""} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -3695,10 +3796,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} + application/json: {"effective_date": "", "file_new_hire_report": false, "work_location_uuid": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-v1-employees-employee_id-rehire: Example: parameters: @@ -3718,7 +3819,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": "", "file_new_hire_report": false, "work_location_uuid": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} responses: "404": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -3729,7 +3830,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} responses: "404": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -3740,10 +3841,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "effective_date": "", "file_new_hire_report": false, "work_location_uuid": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "effective_date": "", "file_new_hire_report": true, "work_location_uuid": ""} responses: "404": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-rehire: Example: parameters: @@ -3767,7 +3868,7 @@ examples: "404": application/json: {"errors": [{"error_key": "employment", "category": "incorrect_state", "message": "The employee's employment is not in the right state."}]} get-v1-employees-employee_id-employment_history: - test_example: + speakeasy-default-get-v1-employees-employee-id-employment-history: parameters: path: employee_id: "" @@ -3775,11 +3876,11 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"hire_date": "2015-05-15", "termination_date": "2025-04-15", "file_new_hire_report": false, "two_percent_shareholder": false, "employment_status": "full_time"}] + application/json: [{}] "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-employees-employee_id-home_addresses: - Example: + speakeasy-default-get-v1-employees-employee-id-home-addresses: parameters: path: employee_id: "" @@ -3787,192 +3888,84 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": false, "uuid": "56260b3d-c375-415c-b77a-75d99f717193", "employee_uuid": "7087a288-8349-4632-b92e-bc94fb79f29e", "effective_date": "2021-01-01", "courtesy_withholding": true}, {"street_1": "100 5th Ave", "street_2": "Suite 555", "city": "New York", "state": "NY", "zip": "10001", "country": "USA", "active": true, "uuid": "d9f74049-8769-4fba-8e0f-eceef2da4e6b", "employee_uuid": "7087a288-8349-4632-b92e-bc94fb79f29e", "effective_date": "2022-03-03", "courtesy_withholding": true}] + application/json: [{"uuid": "7f46c443-0786-4970-81c1-0aa536dc7584", "country": "USA", "version": ""}] + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} post-v1-employees-employee_id-home_addresses: - Example: + speakeasy-default-post-v1-employees-employee-id-home-addresses: parameters: path: employee_id: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"street_1": "300 3rd Street", "street_2": null, "city": "San Francisco", "state": "CA", "zip": "94107", "effective_date": "2021-01-01", "courtesy_withholding": true} + application/json: {"street_1": "300 3rd Street", "city": "San Francisco", "state": "CA", "zip": "94107", "effective_date": "2022-01-31"} responses: "201": - application/json: {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": false, "uuid": "56260b3d-c375-415c-b77a-75d99f717193", "effective_date": "2021-01-01", "courtesy_withholding": true} - Basic: + application/json: {"uuid": "b552472e-2d5c-4e19-bf31-49aeeb888b6e", "country": "USA", "version": ""} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} + get-v1-home_addresses-home_address_uuid: + speakeasy-default-get-v1-home-addresses-home-address-uuid: parameters: path: - employee_id: "" + home_address_uuid: "" header: X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: + "200": + application/json: {"uuid": "a4f1a0cf-7dc0-4905-a1cf-685935582da3", "country": "USA", "version": ""} + "404": + application/json: {"errors": []} + put-v1-home_addresses-home_address_uuid: + speakeasy-default-put-v1-home-addresses-home-address-uuid: parameters: path: - employee_id: "" + home_address_uuid: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4"} responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: + "200": + application/json: {"uuid": "d9fd058f-e693-4c4a-905f-3b5654a55589", "country": "USA", "version": ""} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} + delete-v1-home_addresses-home_address_uuid: + speakeasy-default-delete-v1-home-addresses-home-address-uuid: parameters: path: - employee_id: "" + home_address_uuid: "" header: X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} - get-v1-home_addresses-home_address_uuid: - Example: + get-v1-employees-employee_id-work_addresses: + speakeasy-default-get-v1-employees-employee-id-work-addresses: parameters: path: - home_address_uuid: "" + employee_id: "" header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": false, "uuid": "56260b3d-c375-415c-b77a-75d99f717193", "effective_date": "2021-01-01", "courtesy_withholding": true} - put-v1-home_addresses-home_address_uuid: - Example: + application/json: [{"uuid": "d75effb0-13b9-46bb-96ed-33dad876923d", "version": "", "country": "USA"}] + "404": + application/json: {"errors": []} + post-v1-employees-employee_id-work_addresses: + speakeasy-default-post-v1-employees-employee-id-work-addresses: parameters: path: - home_address_uuid: "" + employee_id: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "fe75bd065ff48b91c35fe8ff842f986c", "street_1": "300 3rd Street", "street_2": null, "city": "San Francisco", "state": "CA", "zip": "94107", "effective_date": "2021-01-01", "courtesy_withholding": true} - responses: - "200": - application/json: {"street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA", "active": false, "uuid": "56260b3d-c375-415c-b77a-75d99f717193", "effective_date": "2021-01-01", "courtesy_withholding": true} - Basic: - parameters: - path: - home_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - home_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - home_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} - delete-v1-home_addresses-home_address_uuid: - Basic: - parameters: - path: - home_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - home_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - home_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} - get-v1-employees-employee_id-work_addresses: - Example: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "200": - application/json: [{"uuid": "fc5b87dc-8d88-400d-b2da-c3587a7e5b15", "effective_date": "2022-01-01", "active": false, "location_uuid": "d9456c94-f561-40d2-afec-919da5f59196", "employee_uuid": "7597f3e3-31d4-4953-83a5-f95be78d2fe2", "version": "139f9769a2e543e6a1259173e1ee3b8d", "street_1": "800 Adolfo Gardens", "street_2": "Suite 419", "city": "Bremen", "state": "AL", "zip": "35033", "country": "USA"}, {"uuid": "be1c2e24-af86-4c36-b34e-3a55dbcdbdab", "effective_date": "2023-01-01", "active": true, "location_uuid": "6a119be7-b4b0-4e27-aaa0-89d5f2524635", "employee_uuid": "7597f3e3-31d4-4953-83a5-f95be78d2fe2", "version": "bbe8d4c741339c6b9e0e2e1c1b120816", "street_1": "2216 Icie Villages", "street_2": "Apt. 798", "city": "Big Delta", "state": "AK", "zip": "99737", "country": "USA"}] - post-v1-employees-employee_id-work_addresses: - Example: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"location_uuid": "6a119be7-b4b0-4e27-aaa0-89d5f2524635", "effective_date": "2023-05-15"} + application/json: {"location_uuid": "6a119be7-b4b0-4e27-aaa0-89d5f2524635", "effective_date": "2023-05-15"} responses: "201": - application/json: {"uuid": "56260b3d-c375-415c-b77a-75d99f717193", "effective_date": "2021-01-01", "active": false, "location_uuid": "6a27753a-3093-41c1-9f25-ea64f15e8266", "employee_uuid": "7087a288-8349-4632-b92e-bc94fb79f29e", "version": "", "street_1": "644 Fay Vista", "street_2": "Suite 842", "city": "Richmond", "state": "VA", "zip": "23218", "country": "USA"} - Basic: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - employee_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"uuid": "e02ec014-1e6b-41a8-ba57-7e102baa2d06", "version": "", "country": "USA"} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-work_addresses-work_address_uuid: - Example: + speakeasy-default-get-v1-work-addresses-work-address-uuid: parameters: path: work_address_uuid: "" @@ -3980,80 +3973,33 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "34925ef7-6234-440d-83b8-788a24d0d69a", "effective_date": "2023-05-15", "active": true, "location_uuid": "aba6d0fd-7294-4997-b1a4-bc9268c45932", "employee_uuid": "2363b9c0-6625-4425-9261-47627fd68783", "version": "6a22da647ed391f184a212e6e83a541d", "street_1": "977 Marks Viaduct", "street_2": null, "city": "Pink Hill", "state": "NC", "zip": "28572", "country": "USA"} + application/json: {"uuid": "8fd06c85-65da-4828-8c26-a27c15ea00ea", "version": "", "country": "USA"} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} put-v1-work_addresses-work_address_uuid: - Example: + speakeasy-default-put-v1-work-addresses-work-address-uuid: parameters: path: work_address_uuid: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"location_uuid": "6a119be7-b4b0-4e27-aaa0-89d5f2524635", "effective_date": "2023-05-15", "version": "e6db1baa29d3df1eb307ff6a12c778da"} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "location_uuid": "6a119be7-b4b0-4e27-aaa0-89d5f2524635", "effective_date": "2023-05-15"} responses: "200": - application/json: {"uuid": "34925ef7-6234-440d-83b8-788a24d0d69a", "effective_date": "2023-05-15", "active": true, "location_uuid": "aba6d0fd-7294-4997-b1a4-bc9268c45932", "employee_uuid": "2363b9c0-6625-4425-9261-47627fd68783", "version": "6a22da647ed391f184a212e6e83a541d", "street_1": "977 Marks Viaduct", "street_2": null, "city": "Pink Hill", "state": "NC", "zip": "28572", "country": "USA"} - Basic: - parameters: - path: - work_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - work_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - work_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"version": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"uuid": "27c58f85-7f90-4597-bc74-193b0a8d024d", "version": "", "country": "USA"} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} delete-v1-work_addresses-work_address_uuid: - Basic: - parameters: - path: - work_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - work_address_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: + speakeasy-default-delete-v1-work-addresses-work-address-uuid: parameters: path: work_address_uuid: "" header: X-Gusto-API-Version: "2024-04-01" responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + "404": + application/json: {"errors": []} get-v1-employees-employee_id-federal_taxes: Example: parameters: @@ -4108,9 +4054,9 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-state_taxes: - Employee-State-Taxes-List-Example: + speakeasy-default-get-v1-employees-employee-id-state-taxes: parameters: path: employee_uuid: "" @@ -4118,22 +4064,11 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"employee_uuid": "92fa4d30-e284-43d0-a26e-605619c04beb", "state": "CA", "file_new_hire_report": false, "is_work_state": true, "questions": [{"label": "Filing Status", "description": "The Head of Household status applies to unmarried individuals who have a relative living with them in their home. If unsure, read the CA Filing Status explanation.\n", "key": "filing_status", "input_question_format": {"type": "Select", "options": [{"value": "S", "label": "Single"}, {"value": "M", "label": "Married one income"}, {"value": "MD", "label": "Married dual income"}, {"value": "H", "label": "Head of household"}, {"value": "E", "label": "Do Not Withhold"}]}, "answers": [{"value": "S", "valid_from": "2010-01-01", "valid_up_to": null}]}, {"label": "Withholding Allowance", "description": "This value is needed to calculate the employee's CA income tax withholding. If unsure, use the CA DE-4 form to calculate the value manually.\n", "key": "withholding_allowance", "input_question_format": {"type": "Number"}, "answers": [{"value": 1, "valid_from": "2010-01-01", "valid_up_to": null}]}, {"label": "Additional Withholding", "description": "You can withhold an additional amount of California income taxes here.", "key": "additional_withholding", "input_question_format": {"type": "Currency"}, "answers": [{"value": "0.0", "valid_from": "2010-01-01", "valid_up_to": null}]}, {"label": "File a New Hire Report?", "description": "State law requires you to file a new hire report within 20 days of hiring or re-hiring an employee.", "key": "file_new_hire_report", "input_question_format": {"type": "Select"}, "answers": [{"value": true, "valid_from": "2010-01-01", "valid_up_to": null}]}]}] + application/json: [{}] + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} put-v1-employees-employee_id-state_taxes: - Employee-State-Taxes-Update-Example: - parameters: - path: - employee_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"states": [{"state": "CA", "questions": [{"key": "filing_status", "answers": [{"value": "M", "valid_from": "2010-01-01", "valid_up_to": null}]}, {"key": "withholding_allowance", "answers": [{"value": 2, "valid_from": "2010-01-01", "valid_up_to": null}]}, {"key": "additional_withholding", "answers": [{"value": "25.0", "valid_from": "2010-01-01", "valid_up_to": null}]}, {"key": "file_new_hire_report", "answers": [{"value": true, "valid_from": "2010-01-01", "valid_up_to": null}]}]}]} - responses: - "200": - application/json: [{"employee_uuid": "", "state": "Minnesota", "questions": [{"label": "", "description": "airbrush convalesce behind within frequent acidly sans accredit", "key": "", "input_question_format": {"type": ""}, "answers": []}, {"label": "", "description": "fuel confusion amused ugh", "key": "", "input_question_format": {"type": ""}, "answers": []}]}, {"employee_uuid": "", "state": "Oregon", "questions": [{"label": "", "description": "ugh after regularly toe", "key": "", "input_question_format": {"type": ""}, "answers": [{}, {}, {}]}]}] - "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - Employee-State-Taxes-List-Example: + speakeasy-default-put-v1-employees-employee-id-state-taxes: parameters: path: employee_uuid: "" @@ -4143,18 +4078,9 @@ examples: application/json: {"states": []} responses: "200": - application/json: [{"employee_uuid": "92fa4d30-e284-43d0-a26e-605619c04beb", "state": "CA", "file_new_hire_report": false, "is_work_state": true, "questions": [{"label": "Filing Status", "description": "The Head of Household status applies to unmarried individuals who have a relative living with them in their home. If unsure, read the CA Filing Status explanation.\n", "key": "filing_status", "input_question_format": {"type": "Select", "options": [{"value": "S", "label": "Single"}, {"value": "M", "label": "Married one income"}, {"value": "MD", "label": "Married dual income"}, {"value": "H", "label": "Head of household"}, {"value": "E", "label": "Do Not Withhold"}]}, "answers": [{"value": "S", "valid_from": "2010-01-01", "valid_up_to": null}]}, {"label": "Withholding Allowance", "description": "This value is needed to calculate the employee's CA income tax withholding. If unsure, use the CA DE-4 form to calculate the value manually.\n", "key": "withholding_allowance", "input_question_format": {"type": "Number"}, "answers": [{"value": 1, "valid_from": "2010-01-01", "valid_up_to": null}]}, {"label": "Additional Withholding", "description": "You can withhold an additional amount of California income taxes here.", "key": "additional_withholding", "input_question_format": {"type": "Currency"}, "answers": [{"value": "0.0", "valid_from": "2010-01-01", "valid_up_to": null}]}, {"label": "File a New Hire Report?", "description": "State law requires you to file a new hire report within 20 days of hiring or re-hiring an employee.", "key": "file_new_hire_report", "input_question_format": {"type": "Select"}, "answers": [{"value": true, "valid_from": "2010-01-01", "valid_up_to": null}]}]}] - Employee-State-Taxes-Error-Response: - parameters: - path: - employee_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"states": [{"state": "Alaska"}]} - responses: - "422": - application/json: {"errors": [{"error_key": "states", "category": "nested_errors"}]} + application/json: [{}] + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} post-v1-employees-employee_id-bank_accounts: Example: parameters: @@ -4185,7 +4111,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Savings"} + application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Checking"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -4199,7 +4125,7 @@ examples: application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Checking"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-employees-employee_id-bank_accounts-bank_account_id: speakeasy-default-delete-v1-employees-employee-id-bank-accounts-bank-account-id: parameters: @@ -4229,7 +4155,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Checking"} + application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Savings"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -4241,7 +4167,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Checking"} + application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Savings"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -4253,10 +4179,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Checking"} + application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Savings"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-payment_method: Example: parameters: @@ -4277,8 +4203,10 @@ examples: requestBody: application/json: {"version": "63859768485e218ccf8a449bb60f14ed", "type": "Direct Deposit", "split_by": "Amount", "splits": [{"uuid": "e88f9436-b74e-49a8-87e9-777b9bfe715e", "name": "BoA Checking Account", "priority": 1, "split_amount": 500}, {"uuid": "0d2b7f73-05d6-4184-911d-269edeecc30a", "name": "Chase Checking Account", "priority": 2, "split_amount": 1000}, {"uuid": "1531e824-8d9e-4bd8-9f90-0d04608125d7", "name": "US Bank Checking Account", "priority": 3, "split_amount": null}]} responses: + "200": + application/json: {} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": []} example-2: parameters: path: @@ -4288,8 +4216,10 @@ examples: requestBody: application/json: {"version": "63859768485e218ccf8a449bb60f14ed", "type": "Direct Deposit", "split_by": "Percentage", "splits": [{"uuid": "e88f9436-b74e-49a8-87e9-777b9bfe715e", "name": "BoA Checking Account", "priority": 1, "split_amount": 60}, {"uuid": "0d2b7f73-05d6-4184-911d-269edeecc30a", "name": "Chase Checking Account", "priority": 2, "split_amount": 40}]} responses: + "200": + application/json: {} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": []} example-3: parameters: path: @@ -4299,8 +4229,10 @@ examples: requestBody: application/json: {"version": "63859768485e218ccf8a449bb60f14ed", "type": "Check"} responses: + "200": + application/json: {} "422": - application/json: {"errors": [{"error_key": "", "category": ""}]} + application/json: {"errors": []} Example: parameters: path: @@ -4308,7 +4240,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Check"} + application/json: {"version": "", "type": "Direct Deposit"} responses: "200": application/json: {"version": "63859768485e218ccf8a449bb60f14ed", "type": "Direct Deposit", "split_by": "Amount", "splits": [{"uuid": "e88f9436-b74e-49a8-87e9-777b9bfe715e", "name": "BoA Checking Account", "priority": 1, "split_amount": 500}, {"uuid": "0d2b7f73-05d6-4184-911d-269edeecc30a", "name": "Chase Checking Account", "priority": 2, "split_amount": 1000}, {"uuid": "1531e824-8d9e-4bd8-9f90-0d04608125d7", "name": "US Bank Checking Account", "priority": 3, "split_amount": null}]} @@ -4319,7 +4251,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Check"} + application/json: {"version": "", "type": "Direct Deposit"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -4341,16 +4273,15 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Check"} + application/json: {"version": "", "type": "Direct Deposit"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-bank_accounts: Example: parameters: path: employee_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -4367,7 +4298,7 @@ examples: application/json: {"title": "Regional Manager", "hire_date": "2020-12-21"} responses: "201": - application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": "null,", "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} + application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": true, "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} Basic: parameters: path: @@ -4400,29 +4331,27 @@ examples: application/json: {"title": "", "hire_date": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-jobs: Example: parameters: path: employee_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "6c0ed1521e8b86eb36bd4455a63a2dac", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Client Support Director", "primary": true, "rate": "70000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": "null,", "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "2cd4b18662395eb53bcf80d5b5447f36", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "70000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]}] + application/json: [{"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "6c0ed1521e8b86eb36bd4455a63a2dac", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Client Support Director", "primary": true, "rate": "70000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": false, "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "2cd4b18662395eb53bcf80d5b5447f36", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "70000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]}] get-v1-jobs-job_id: Example: parameters: path: job_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": "null,", "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} + application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": false, "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} put-v1-jobs-job_id: Example: parameters: @@ -4434,7 +4363,7 @@ examples: application/json: {"version": "gr78930htutrz444kuytr3s5hgxykuveb523fwl8sir", "title": "Regional Manager", "hire_date": "2020-12-21"} responses: "200": - application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": "null,", "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} + application/json: {"uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "version": "d0e719137f89ca3dd334dd4cc248ffbb", "employee_uuid": "948daac8-4355-4ece-9e2a-229898accb22", "hire_date": "2020-01-20", "title": "Account Director", "primary": true, "rate": "78000.00", "payment_unit": "Year", "current_compensation_uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "state_wc_covered": false, "state_wc_class_code": "null,", "compensations": [{"uuid": "ea8b0b90-1112-4f9d-bb93-bf029bc8537a", "version": "994b75511d1debac5d7e2ddeae13679f", "job_uuid": "d6d1035e-8a21-4e1d-89d5-fa894f9aff97", "rate": "78000.00", "payment_unit": "Year", "flsa_status": "Exempt", "effective_date": "2021-01-20", "adjust_for_minimum_wage": false, "minimum_wages": []}]} Basic: parameters: path: @@ -4467,7 +4396,7 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-jobs-job_id: speakeasy-default-delete-v1-jobs-job-id: parameters: @@ -4480,7 +4409,6 @@ examples: parameters: path: job_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -4516,7 +4444,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"payment_unit": "Paycheck", "flsa_status": "Commission Only Nonexempt"} + application/json: {"payment_unit": "Week", "flsa_status": "Salaried Nonexempt"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -4527,7 +4455,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"payment_unit": "Hour", "flsa_status": "Commission Only Exempt"} + application/json: {"payment_unit": "Week", "flsa_status": "Salaried Nonexempt"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -4538,10 +4466,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"payment_unit": "Month", "flsa_status": "Commission Only Exempt"} + application/json: {"payment_unit": "Week", "flsa_status": "Salaried Nonexempt"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-compensations-compensation_id: Exempt: parameters: @@ -4616,7 +4544,7 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-compensations-compensation_id: speakeasy-default-delete-v1-compensations-compensation-id: parameters: @@ -4668,7 +4596,7 @@ examples: application/json: {"name": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-earning_types: Example: parameters: @@ -4727,7 +4655,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-companies-company_id-earning_types-earning_type_uuid: speakeasy-default-delete-v1-companies-company-id-earning-types-earning-type-uuid: parameters: @@ -4744,12 +4672,12 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-04-01", "self_onboarding": true, "email": "johnson@johnson.com", "first_name": "Johnson", "last_name": "Johnson", "file_new_hire_report": "true,", "work_state": "CA"} + application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-04-01", "self_onboarding": true, "email": "johnson@johnson.com", "first_name": "Johnson", "last_name": "Johnson", "file_new_hire_report": false, "work_state": "CA"} responses: "201": - application/json: {"uuid": "7a621cf0-21cd-49cf-8540-3315211a509a", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "dab2ac34-b5e4-4577-aaf6-ee525de18376", "is_active": true, "hourly_rate": "50.0"} "422": - application/json: {"errors": []} + application/json: {"errors": [{"error_key": "", "category": ""}]} Create a Business contractor: parameters: path: @@ -4760,9 +4688,9 @@ examples: application/json: {"type": "Business", "wage_type": "Fixed", "start_date": "2020-04-01", "self_onboarding": false, "file_new_hire_report": false, "business_name": "Johnson-Johnson Contractors"} responses: "201": - application/json: {"uuid": "80a8e774-c2be-4cc3-8769-1775e0249856", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "dab2ac34-b5e4-4577-aaf6-ee525de18376", "is_active": true, "hourly_rate": "50.0"} "422": - application/json: {"errors": []} + application/json: {"errors": [{"error_key": "", "category": ""}]} Individual Contractor: parameters: path: @@ -4770,7 +4698,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "Individual", "wage_type": "Hourly", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "201": application/json: {"uuid": "c9fc1ad3-c107-4e7b-aa21-2dd4b00a7a07", "company_uuid": "b7457fec-3b76-43bb-9c6e-69cca4688942", "wage_type": "Hourly", "is_active": false, "version": "63859768485e218ccf8a449bb60f14ed", "type": "Individual", "first_name": "Kory", "last_name": "Gottlieb", "middle_initial": "P", "business_name": null, "ein": null, "has_ein": false, "email": "keira.west@mckenzie.org", "start_date": "2022-01-01", "address": null, "hourly_rate": "60.00", "file_new_hire_report": true, "work_state": "FL", "onboarded": true, "onboarding_status": "onboarding_completed", "payment_method": null, "has_ssn": true, "department_uuid": null} @@ -4781,7 +4709,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "Individual", "wage_type": "Hourly", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "201": application/json: {"uuid": "c7c0659c-21a6-4b4e-b74c-9252576fc68c", "company_uuid": "0ec4ae6e-e436-460d-b63c-94a14503d16f", "wage_type": "Fixed", "is_active": true, "version": "8aab307f1e8ed788697f8986346af559", "type": "Business", "first_name": null, "last_name": null, "middle_initial": null, "business_name": "Labadie-Stroman", "ein": "XX-XXX0001", "has_ein": true, "email": "jonatan@kerluke.info", "start_date": "2022-01-01", "address": null, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": false, "onboarding_status": "admin_onboarding_incomplete", "payment_method": null, "has_ssn": false} @@ -4803,7 +4731,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "Individual", "wage_type": "Hourly", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -4814,21 +4742,20 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"type": "Individual", "wage_type": "Hourly", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"type": "Individual", "wage_type": "Fixed", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_uuid-contractors: Example: parameters: path: company_uuid: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "c9fc1ad3-c107-4e7b-aa21-2dd4b00a7a07", "company_uuid": "b7457fec-3b76-43bb-9c6e-69cca4688942", "wage_type": "Fixed", "is_active": false, "version": "63859768485e218ccf8a449bb60f14ed", "type": "Individual", "first_name": "Kory", "last_name": "Gottlieb", "middle_initial": "P", "business_name": null, "ein": null, "has_ein": false, "email": "keira.west@mckenzie.org", "start_date": "2022-01-01", "address": {"street_1": "621 Jast Row", "street_2": "Apt. 281", "city": "Coral Springs", "state": "FL", "zip": "33065", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": true, "department_uuid": "1802465d-4f68-4865-920c-1307ab095f12"}, {"uuid": "183a86f4-a803-4b38-9357-cd9b78e2560c", "company_uuid": "afdd5d98-581b-4fc0-b988-706b7d23b2a5", "wage_type": "Fixed", "is_active": true, "version": "8aab307f1e8ed788697f8986346af559", "type": "Business", "first_name": null, "last_name": null, "middle_initial": null, "business_name": "Labadie-Stroman", "ein": "XX-XXX0001", "has_ein": true, "email": "jonatan@kerluke.info", "start_date": "2022-01-01", "address": {"street_1": "1625 Bednar Center", "street_2": "Apt. 480", "city": "Port Charlotte", "state": "FL", "zip": "33954", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": false}, {"uuid": "ea1c2d65-b622-4899-bcb7-5cd0fe0232aa", "company_uuid": "281c763d-a2ba-4f51-b9e8-b1ed61576d62", "wage_type": "Fixed", "is_active": true, "version": "b48c46abfed1487b873b442334b3c4ff", "type": "Individual", "first_name": "Chanel", "last_name": "Boyle", "middle_initial": "X", "business_name": null, "ein": null, "has_ein": false, "email": "loyal@hettinger.biz", "address": {"street_1": "35913 Darrick Run", "street_2": "Apt. 913", "city": "Cypress", "state": "TX", "zip": "77433", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": true, "work_state": "TX", "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": true}] + application/json: [{"uuid": "c9fc1ad3-c107-4e7b-aa21-2dd4b00a7a07", "company_uuid": "b7457fec-3b76-43bb-9c6e-69cca4688942", "wage_type": "Fixed", "is_active": false, "version": "63859768485e218ccf8a449bb60f14ed", "type": "Individual", "first_name": "Kory", "last_name": "Gottlieb", "middle_initial": "P", "business_name": null, "ein": null, "has_ein": false, "email": "keira.west@mckenzie.org", "start_date": "2022-01-01", "address": {"street_1": "621 Jast Row", "street_2": "Apt. 281", "city": "Coral Springs", "state": "FL", "zip": "33065", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": true, "department": "Backup Dancer", "department_uuid": "1802465d-4f68-4865-920c-1307ab095f12"}, {"uuid": "183a86f4-a803-4b38-9357-cd9b78e2560c", "company_uuid": "afdd5d98-581b-4fc0-b988-706b7d23b2a5", "wage_type": "Fixed", "is_active": true, "version": "8aab307f1e8ed788697f8986346af559", "type": "Business", "first_name": null, "last_name": null, "middle_initial": null, "business_name": "Labadie-Stroman", "ein": "XX-XXX0001", "has_ein": true, "email": "jonatan@kerluke.info", "start_date": "2022-01-01", "address": {"street_1": "1625 Bednar Center", "street_2": "Apt. 480", "city": "Port Charlotte", "state": "FL", "zip": "33954", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": false}, {"uuid": "ea1c2d65-b622-4899-bcb7-5cd0fe0232aa", "company_uuid": "281c763d-a2ba-4f51-b9e8-b1ed61576d62", "wage_type": "Fixed", "is_active": true, "version": "b48c46abfed1487b873b442334b3c4ff", "type": "Individual", "first_name": "Chanel", "last_name": "Boyle", "middle_initial": "X", "business_name": null, "ein": null, "has_ein": false, "email": "loyal@hettinger.biz", "address": {"street_1": "35913 Darrick Run", "street_2": "Apt. 913", "city": "Cypress", "state": "TX", "zip": "77433", "country": "USA"}, "hourly_rate": "0.00", "file_new_hire_report": true, "work_state": "TX", "onboarded": true, "onboarding_status": "onboarding_completed", "has_ssn": true}] get-v1-contractors-contractor_uuid: Individual Contractor: parameters: @@ -4859,9 +4786,9 @@ examples: application/json: {"version": "b48c46abfed1487b873b442334b3c4ff", "type": "Individual", "wage_type": "Hourly", "start_date": "2021-01-01", "hourly_rate": "20.00", "self_onboarding": false, "first_name": "Chanel", "last_name": "Boyle", "middle_initial": "X", "file_new_hire_report": false, "is_active": true} responses: "200": - application/json: {"uuid": "d95fa7f0-e743-42ce-b47c-b60cc78135dd", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "1c0f975f-b446-4219-b9c7-27da3fb56262", "is_active": true, "hourly_rate": "50.0"} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": []} Update a Business Contractor: parameters: path: @@ -4872,9 +4799,9 @@ examples: application/json: {"version": "b48c46abfed1487b873b442334b3c4ff", "type": "Individual", "wage_type": "Fixed", "start_date": "2020-01-11", "self_onboarding": false, "file_new_hire_report": false, "business_name": "Contracting Solutions", "ein": "991113334", "is_active": false} responses: "200": - application/json: {"uuid": "85898c12-5a19-4071-8c55-62af6646dadb", "is_active": true, "hourly_rate": "50.0", "file_new_hire_report": false} + application/json: {"uuid": "1c0f975f-b446-4219-b9c7-27da3fb56262", "is_active": true, "hourly_rate": "50.0"} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": []} Individual Contractor: parameters: path: @@ -4882,7 +4809,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "200": application/json: {"uuid": "c9fc1ad3-c107-4e7b-aa21-2dd4b00a7a07", "company_uuid": "b7457fec-3b76-43bb-9c6e-69cca4688942", "wage_type": "Hourly", "is_active": false, "version": "63859768485e218ccf8a449bb60f14ed", "type": "Individual", "first_name": "Kory", "last_name": "Gottlieb", "middle_initial": "P", "business_name": null, "ein": null, "has_ein": false, "email": "keira.west@mckenzie.org", "start_date": "2022-01-01", "address": {"street_1": "621 Jast Row", "street_2": "Apt. 281", "city": "Coral Springs", "state": "FL", "zip": "33065", "country": "USA"}, "hourly_rate": "60.00", "file_new_hire_report": true, "work_state": "FL", "onboarded": true, "onboarding_status": "onboarding_completed", "payment_method": "Direct Deposit", "has_ssn": true, "department_uuid": "56260b3d-c375-415c-b77a-75d99f717193"} @@ -4893,7 +4820,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "200": application/json: {"uuid": "c7c0659c-21a6-4b4e-b74c-9252576fc68c", "company_uuid": "0ec4ae6e-e436-460d-b63c-94a14503d16f", "wage_type": "Fixed", "is_active": true, "version": "8aab307f1e8ed788697f8986346af559", "type": "Business", "first_name": null, "last_name": null, "middle_initial": null, "business_name": "Labadie-Stroman", "ein": "XX-XXX0001", "has_ein": true, "email": "jonatan@kerluke.info", "start_date": "2022-01-01", "address": null, "hourly_rate": "0.00", "file_new_hire_report": false, "work_state": null, "onboarded": false, "onboarding_status": "admin_onboarding_incomplete", "payment_method": "Direct Deposit", "has_ssn": false} @@ -4904,7 +4831,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -4915,7 +4842,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -4926,10 +4853,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Individual", "start_date": "2020-01-11", "hourly_rate": "40.0", "self_onboarding": false, "file_new_hire_report": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-contractors-contractor_uuid: speakeasy-default-delete-v1-contractors-contractor-uuid: parameters: @@ -4991,7 +4918,7 @@ examples: application/json: {"onboarding_status": "onboarding_completed"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-contractors-contractor_uuid-address: Example: parameters: @@ -5021,7 +4948,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -5032,7 +4959,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -5043,10 +4970,22 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": ""} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + get-v1-companies-company_id-contractors-payment_details: + speakeasy-default-get-v1-companies-company-id-contractors-payment-details: + parameters: + path: + company_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{}] + "404": + application/json: {"errors": []} post-v1-contractors-contractor_uuid-bank_accounts: Example: parameters: @@ -5066,7 +5005,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Checking"} + application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Savings"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -5091,7 +5030,7 @@ examples: application/json: {"name": "", "routing_number": "", "account_number": "", "account_type": "Savings"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-contractors-contractor_uuid-bank_accounts: Example: parameters: @@ -5122,8 +5061,10 @@ examples: requestBody: application/json: {"version": "63859768485e218ccf8a449bb60f14ed", "type": "Direct Deposit"} responses: + "200": + application/json: {} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": []} example-3: parameters: path: @@ -5133,8 +5074,10 @@ examples: requestBody: application/json: {"version": "63859768485e218ccf8a449bb60f14ed", "type": "Check"} responses: + "200": + application/json: {} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": []} Example: parameters: path: @@ -5142,7 +5085,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Direct Deposit"} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Direct Deposit"} responses: "200": application/json: {"version": "63859768485e218ccf8a449bb60f14ed", "type": "Direct Deposit", "split_by": "Percentage", "splits": [{"uuid": "e88f9436-b74e-49a8-87e9-777b9bfe715e", "name": "BoA Checking Account", "hidden_account_number": "XXXX0992", "priority": 1, "split_amount": 100}]} @@ -5153,7 +5096,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Check"} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Direct Deposit"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -5164,7 +5107,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Check"} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Direct Deposit"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -5175,10 +5118,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"version": "", "type": "Direct Deposit"} + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4", "type": "Direct Deposit"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-webhook-subscription: Example: parameters: @@ -5194,7 +5137,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"url": "https://dense-bidet.name/", "subscription_types": ["EmployeeJobCompensation"]} + application/json: {"url": "https://slow-median.com", "subscription_types": ["Location"]} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -5203,7 +5146,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"url": "https://quarterly-omelet.biz", "subscription_types": ["EmployeeJobCompensation", "Notification"]} + application/json: {"url": "https://slow-median.com", "subscription_types": ["Location"]} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -5212,10 +5155,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"url": "https://stunning-hope.com", "subscription_types": ["Payroll"]} + application/json: {"url": "https://slow-median.com", "subscription_types": ["Location"]} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-webhook-subscriptions: Example: parameters: @@ -5243,7 +5186,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"subscription_types": ["Company", "ExternalPayroll", "Payroll"]} + application/json: {"subscription_types": ["Payroll"]} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -5254,7 +5197,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"subscription_types": []} + application/json: {"subscription_types": ["Payroll"]} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -5265,10 +5208,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"subscription_types": ["EmployeeJobCompensation", "Signatory"]} + application/json: {"subscription_types": ["Payroll"]} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-webhook-subscription-uuid: Example: parameters: @@ -5330,7 +5273,7 @@ examples: application/json: {"verification_token": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-webhook-subscription-verification-token-uuid: speakeasy-default-get-v1-webhook-subscription-verification-token-uuid: parameters: @@ -5338,8 +5281,16 @@ examples: webhook_subscription_uuid: "" header: X-Gusto-API-Version: "2024-04-01" + get-v1-webhooks-health_check: + speakeasy-default-get-v1-webhooks-health-check: + parameters: + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: {} get-v1-contractor-forms: - Example: + speakeasy-default-get-v1-contractor-forms: parameters: path: contractor_uuid: "" @@ -5347,9 +5298,9 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "48cdd5ec-a4dd-4840-a424-ad79f38d8408", "name": "US_1099", "title": "Form 1099: 2020", "description": "Form 1099 records your annual income as a contractor.", "draft": false, "year": 2020, "quarter": null, "requires_signing": false, "document_content_type": "application/pdf", "contractor_uuid": "123dd616-6dbc-4724-938a-403f6217a933"}] + application/json: [{"uuid": "9e9c1923-e4dd-46f6-ad40-78ab6265e362"}] get-v1-contractor-form: - Example: + speakeasy-default-get-v1-contractor-form: parameters: path: contractor_uuid: "" @@ -5358,7 +5309,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "48cdd5ec-a4dd-4840-a424-ad79f38d8408", "name": "US_1099", "title": "Form 1099: 2020", "description": "Form 1099 records your annual income as a contractor.", "draft": false, "year": 2020, "quarter": null, "requires_signing": false, "document_content_type": "application/pdf", "contractor_uuid": "123dd616-6dbc-4724-938a-403f6217a933"} + application/json: {"uuid": "97afabdf-393b-40a3-a21e-0a8294b6e129"} get-v1-contractor-form-pdf: Example: parameters: @@ -5371,16 +5322,7 @@ examples: "200": application/json: {"uuid": "48cdd5ec-a4dd-4840-a424-ad79f38d8408", "document_url": "https://app.gusto-demo.com/assets/forms/7757842065202782/original/company_direct_deposit20211007-48226-gsqo8k.pdf?1633667020", "document_content_type": "application/pdf"} post-v1-sandbox-generate_1099: - Example: - parameters: - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"contractor_id": ""} - responses: - "200": - application/json: {"uuid": "29afb141-2256-431d-90e0-1c7344222342", "name": "US_1099", "title": "Form 1099: 2022", "description": "Form 1099 records your annual income as a contractor.", "draft": false, "year": 2022, "quarter": null, "requires_signing": false, "contractor_uuid": "b68484a9-4487-4ee5-bafc-4245133a426c"} - Basic: + Basic: parameters: header: X-Gusto-API-Version: "2024-04-01" @@ -5406,9 +5348,9 @@ examples: application/json: {"contractor_id": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-contractor-documents: - Example: + speakeasy-default-get-v1-contractor-documents: parameters: path: contractor_uuid: "" @@ -5416,9 +5358,9 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "e83b3c20-dc4f-4382-bee3-b478fc42c68b", "title": "Taxpayer Identification (Form W-9)", "name": "taxpayer_identification_form_w_9", "recipient_type": "Contractor", "recipient_uuid": "f079c253-29e2-45e2-b384-2cc615c9c568", "pages": [{"image_url": "http://app.gusto-dev.com:3000/assets/document_templates/20/unmapped_template/images/0.jpg", "page_number": 0}, {"image_url": "http://app.gusto-dev.com:3000/assets/document_templates/20/unmapped_template/images/1.jpg", "page_number": 1}], "fields": [{"key": "text1596141656513", "value": null, "x": 69, "y": 94, "width": 261, "height": 13, "page_number": 0, "data_type": "text", "required": true}, {"key": "optional_text1596141704672", "value": null, "x": 69, "y": 118, "width": 262, "height": 13, "page_number": 0, "data_type": "text", "required": false}], "signed_at": null, "description": "Form W-9, Request for Taxpayer Identification Number and Certification", "requires_signing": true, "draft": false, "year": null, "quarter": null}] + application/json: [{}] get-v1-contractor-document: - Example: + speakeasy-default-get-v1-contractor-document: parameters: path: document_uuid: "" @@ -5426,9 +5368,9 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "e83b3c20-dc4f-4382-bee3-b478fc42c68b", "title": "Taxpayer Identification (Form W-9)", "name": "taxpayer_identification_form_w_9", "recipient_type": "Contractor", "recipient_uuid": "f079c253-29e2-45e2-b384-2cc615c9c568", "pages": [{"image_url": "http://app.gusto-dev.com:3000/assets/document_templates/20/unmapped_template/images/0.jpg", "page_number": 0}, {"image_url": "http://app.gusto-dev.com:3000/assets/document_templates/20/unmapped_template/images/1.jpg", "page_number": 1}], "fields": [{"key": "text1596141656513", "value": null, "x": 69, "y": 94, "width": 261, "height": 13, "page_number": 0, "data_type": "text", "required": true}, {"key": "optional_text1596141704672", "value": null, "x": 69, "y": 118, "width": 262, "height": 13, "page_number": 0, "data_type": "text", "required": false}], "signed_at": null, "description": "Form W-9, Request for Taxpayer Identification Number and Certification", "requires_signing": true, "draft": false, "year": null, "quarter": null} + application/json: {} get-v1-contractor-document-pdf: - Example: + speakeasy-default-get-v1-contractor-document-pdf: parameters: path: document_uuid: "" @@ -5436,19 +5378,8 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "e83b3c20-dc4f-4382-bee3-b478fc42c68b", "document_url": "https://app.gusto-demo.com/assets/personal_documents/23/original.pdf?1724367941"} + application/json: {} put-v1-contractor-document-sign: - Example: - parameters: - path: - document_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"fields": [{}, {}, {}], "agree": true} - responses: - "200": - application/json: {"uuid": "e83b3c20-dc4f-4382-bee3-b478fc42c68b", "title": "Taxpayer Identification (Form W-9)", "name": "taxpayer_identification_form_w_9", "recipient_type": "Contractor", "recipient_uuid": "f079c253-29e2-45e2-b384-2cc615c9c568", "signed_at": "2024-09-03T16:39:22.000-07:00", "description": "Form W-9, Request for Taxpayer Identification Number and Certification", "requires_signing": false, "draft": false, "year": null, "quarter": null} Basic: parameters: path: @@ -5456,7 +5387,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"fields": [], "agree": true} + application/json: {"fields": [], "agree": false} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -5467,7 +5398,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"fields": [{}, {}, {}], "agree": true} + application/json: {"fields": [], "agree": false} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -5478,20 +5409,11 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"fields": [{}, {}], "agree": true} + application/json: {"fields": [], "agree": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-sandbox-generate_w2: - Example: - parameters: - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"employee_id": ""} - responses: - "200": - application/json: {"employee_uuid": "19394e76-a866-4570-b237-9a26b0163907", "uuid": "bf5b2496-26df-436e-b465-eae4ed5c8021", "name": "US_W-2", "title": "Draft Form W-2: 2021", "description": "Form W-2 records your annual wages and taxes.", "draft": false, "requires_signing": false} Basic: parameters: header: @@ -5518,7 +5440,7 @@ examples: application/json: {"employee_id": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employee-forms: Example: parameters: @@ -5572,7 +5494,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"signature_text": "", "agree": false} + application/json: {"signature_text": "", "agree": true} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -5599,124 +5521,60 @@ examples: application/json: {"signature_text": "", "agree": true} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} - post-v1-companies-company_id-payrolls: - Example: + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + get-v1-companies-company_id-payrolls: + speakeasy-default-get-v1-companies-company-id-payrolls: parameters: path: company_id: "" + query: + start_date: "2020-01-31" + end_date: "2020-01-31" + sort_order: "asc" header: X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"off_cycle": true, "off_cycle_reason": "Dismissed employee", "start_date": "", "end_date": ""} responses: "200": - application/json: {"payroll_deadline": "2022-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": false, "processed_date": "", "calculated_at": "", "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": true, "off_cycle_reason": "Bonus", "auto_pilot": false, "external": false, "final_termination_payroll": false, "withholding_pay_period": "Every other week", "skip_regular_deductions": true, "fixed_withholding_rate": true, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2022-02-22", "initial_check_date": "2022-02-22", "expected_debit_time": "2022-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2022-02-18T22:00:00Z"}, "employee_compensations": [{"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7067", "excluded": false, "payment_method": "Direct Deposit", "memo": null, "fixed_compensations": [], "hourly_compensations": [{"name": "Regular Hours", "hours": "0.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "0.000", "job_uuid": "9d3760f0-d1f9-4700-8817-0fe2dce5cf23", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "b5eef9a9-4a87-4649-a80d-14878c05f44e", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}, {"name": "Regular Hours", "hours": "0.000", "job_uuid": "332bd171-9efc-432b-abbb-a75c9dba706a", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "0.000", "job_uuid": "ca9b3dc1-57ac-4736-901a-9b1c9634b9d5", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "1bad01e2-140c-49ed-9542-2388ce4a19b3", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}], "paid_time_off": []}], "created_at": "2022-02-01T22:00:00Z", "processing_request": null} - Basic: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"off_cycle": true, "off_cycle_reason": "Transition from old pay schedule", "start_date": "", "end_date": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"off_cycle": false, "off_cycle_reason": "Bonus", "start_date": "", "end_date": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"off_cycle": true, "off_cycle_reason": "Dismissed employee", "start_date": "", "end_date": ""} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} - get-v1-companies-company_id-payrolls: - Example: + application/json: [{}] + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} + post-v1-companies-company_id-payrolls: + speakeasy-default-post-v1-companies-company-id-payrolls: parameters: path: company_id: "" - query: - sort_order: "asc" header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": true, "processed_date": "2021-02-18", "calculated_at": "2021-02-18T12:00:00Z", "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "totals": {"company_debit": "121747.71", "net_pay_debit": "79283.80", "tax_debit": "42463.91", "reimbursement_debit": "0.00", "child_support_debit": "0.00", "reimbursements": "0.00", "net_pay": "81752.94", "gross_pay": "130635.89", "employee_bonuses": "0.00", "employee_commissions": "18536.37", "employee_cash_tips": "0.00", "employee_paycheck_tips": "0.00", "additional_earnings": "0.00", "owners_draw": "0.00", "check_amount": "2469.14", "employer_taxes": "6917.19", "employee_taxes": "35546.72", "benefits": "0.00", "employee_benefits_deductions": "13336.23", "imputed_pay": "0.00", "deferred_payroll_taxes": "0.00", "other_deductions": "240.00"}, "created_at": "2021-02-01T22:00:00Z", "reversal_payroll_uuids": []}, {"payroll_deadline": "2021-02-28", "check_date": "2021-03-01", "processed": false, "processed_date": "nil", "calculated_at": "nil", "uuid": "c8a232aa-0b11-4b8a-b005-71e9e705d0e6", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "external": false, "pay_period": {"start_date": "2021-02-16", "end_date": "2021-03-01", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "created_at": "2022-02-01T22:00:00Z"}] + application/json: {} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-companies-company_id-payroll_reversals: Example: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": application/json: {"reversed_payroll_uuid": "09505984-8d8c-41a3-adbe-5740322ae8e9", "reversal_payroll_uuid": "0424688e-0a2e-4cd0-ac86-42283e788fb3", "reason": "Customer Request", "approved_at": null, "category": "convert_check_ee_requested", "reversed_employee_uuids": ["5f036964-185e-4c85-bbf2-3873e1203b30"]} get-v1-companies-company_id-payrolls-payroll_id: - Unprocessed: - parameters: - path: - company_id: "" - payroll_id: "" - query: {} - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "200": - application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": false, "processed_date": "", "calculated_at": "", "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "created_at": "2022-02-01T22:00:00Z", "submission_blockers": [{"blocker_type": "fast_ach_threshold_exceeded", "blocker_name": "Fast ACH Threshold Exceeded", "unblock_options": [{"unblock_type": "wire_in", "check_date": "2024-06-10T00:00:00Z"}, {"unblock_type": "move_to_four_day", "check_date": "2024-06-12T00:00:00Z", "metadata": {}}], "selected_option": null, "status": "unresolved"}], "processing_request": null} - Processed: + speakeasy-default-get-v1-companies-company-id-payrolls-payroll-id: parameters: path: company_id: "" payroll_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": true, "processed_date": "2021-02-18", "calculated_at": "2021-02-18T12:00:00Z", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": true, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "totals": {"company_debit": "121747.71", "net_pay_debit": "79283.80", "tax_debit": "42463.91", "reimbursement_debit": "0.00", "child_support_debit": "0.00", "reimbursements": "0.00", "net_pay": "81752.94", "gross_pay": "130635.89", "employee_bonuses": "0.00", "employee_commissions": "18536.37", "employee_cash_tips": "0.00", "employee_paycheck_tips": "0.00", "additional_earnings": "0.00", "owners_draw": "0.00", "check_amount": "2469.14", "employer_taxes": "6917.19", "employee_taxes": "35546.72", "benefits": "0.00", "employee_benefits_deductions": "13336.23", "imputed_pay": "0.00", "deferred_payroll_taxes": "0.00", "other_deductions": "240.00"}, "employee_compensations": [{"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7067", "excluded": false, "gross_pay": "2791.25", "net_pay": "1953.31", "check_amount": "1953.31", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242ba5"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909ba"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "15.000", "job_uuid": "9d3760f0-d1f9-4700-8817-0fe2dce5cf23", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "b5eef9a9-4a87-4649-a80d-14878c05f44e", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}, {"name": "Regular Hours", "hours": "40.000", "job_uuid": "332bd171-9efc-432b-abbb-a75c9dba706a", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "5.000", "job_uuid": "ca9b3dc1-57ac-4736-901a-9b1c9634b9d5", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "1bad01e2-140c-49ed-9542-2388ce4a19b3", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": true}, {"name": "401K", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": false}], "deductions": [{"name": "Child Support", "amount": "80.00"}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": "646.69"}, {"name": "Social Security", "employer": true, "amount": "191.25"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7012", "excluded": false, "gross_pay": "2791.25", "net_pay": "1953.31", "check_amount": "1953.31", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242b34"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e90955"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Commission Only Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": true}, {"name": "401K", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": false}], "deductions": [{"name": "Child Support", "amount": "80.00"}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": "646.69"}, {"name": "Social Security", "employer": true, "amount": "191.25"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7781", "excluded": false, "gross_pay": "2791.25", "net_pay": "1953.31", "check_amount": "1953.31", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242bab"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909cd"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": true}, {"name": "401K", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": false}], "deductions": [{"name": "Child Support", "amount": "80.00"}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": "646.69"}, {"name": "Social Security", "employer": true, "amount": "191.25"}]}], "company_taxes": [{"name": "MO Compensation Deduction", "employer": true, "amount": "-0.92"}, {"name": "NY MCTMT", "employer": true, "amount": "5.00"}], "created_at": "2022-02-01T22:00:00Z", "credit_blockers": [{"blocker_type": "waiting_for_wire_in", "blocker_name": "Waiting for Wire In", "unblock_options": [{"unblock_type": "submit_wire", "check_date": "2024-06-10T00:00:00Z"}], "selected_option": "submit_wire", "status": "unresolved"}], "processing_request": {"status": "submit_success", "errors": []}} + application/json: {} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} put-v1-companies-company_id-payrolls: - Example: - parameters: - path: - company_id: "" - payroll_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"employee_compensations": [{}, {}, {}]} - responses: - "200": - application/json: {"payroll_deadline": "2022-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": false, "processed_date": "", "calculated_at": "", "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "off_cycle_reason": null, "auto_pilot": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2022-02-22", "initial_check_date": "2022-02-22", "expected_debit_time": "2022-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2022-02-18T22:00:00Z"}, "employee_compensations": [{"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7067", "excluded": false, "version": "4ba36d23a78c7393b4900ef38019d8ff", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242ba5"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909ba"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "15.000", "job_uuid": "9d3760f0-d1f9-4700-8817-0fe2dce5cf23", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "b5eef9a9-4a87-4649-a80d-14878c05f44e", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}, {"name": "Regular Hours", "hours": "40.000", "job_uuid": "332bd171-9efc-432b-abbb-a75c9dba706a", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "5.000", "job_uuid": "ca9b3dc1-57ac-4736-901a-9b1c9634b9d5", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "1bad01e2-140c-49ed-9542-2388ce4a19b3", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7012", "excluded": false, "version": "ff083257a5583291fb86656ad0df1b42", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242b34"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e90955"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Commission Only Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7781", "excluded": false, "version": "259816479e3729bf855318af9b9adddf", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242bab"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909cd"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}], "created_at": "2022-02-01T22:00:00Z", "fixed_compensation_types": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Anniversary Bonus"}, {"name": "Internet Stipend"}, {"name": "Reimbursement"}], "processing_request": null} - Basic: - parameters: - path: - company_id: "" - payroll_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"employee_compensations": [{}, {}]} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: + speakeasy-default-put-v1-companies-company-id-payrolls: parameters: path: company_id: "" @@ -5726,29 +5584,21 @@ examples: requestBody: application/json: {"employee_compensations": [{}]} responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - company_id: "" - payroll_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"employee_compensations": [{}, {}, {}]} - responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + "200": + application/json: {} + "404": + application/json: {"errors": []} delete-v1-companies-company_id-payrolls: speakeasy-default-delete-v1-companies-company-id-payrolls: parameters: path: company_id: "" payroll_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" + responses: + "404": + application/json: {"errors": []} put-v1-companies-company_id-payrolls-payroll_id-prepare: Example: parameters: @@ -5759,9 +5609,9 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"payroll_deadline": "2022-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": false, "processed_date": "", "calculated_at": "", "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "off_cycle_reason": null, "auto_pilot": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2022-02-22", "initial_check_date": "2022-02-22", "expected_debit_time": "2022-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2022-02-18T22:00:00Z"}, "employee_compensations": [{"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7067", "excluded": false, "version": "4ba36d23a78c7393b4900ef38019d8ff", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242ba5"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909ba"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "15.000", "job_uuid": "9d3760f0-d1f9-4700-8817-0fe2dce5cf23", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "b5eef9a9-4a87-4649-a80d-14878c05f44e", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}, {"name": "Regular Hours", "hours": "40.000", "job_uuid": "332bd171-9efc-432b-abbb-a75c9dba706a", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "5.000", "job_uuid": "ca9b3dc1-57ac-4736-901a-9b1c9634b9d5", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "1bad01e2-140c-49ed-9542-2388ce4a19b3", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7012", "excluded": false, "version": "ff083257a5583291fb86656ad0df1b42", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242b34"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e90955"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Commission Only Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7781", "excluded": false, "version": "259816479e3729bf855318af9b9adddf", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242bab"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909cd"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}], "created_at": "2022-02-01T22:00:00Z", "fixed_compensation_types": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Anniversary Bonus"}, {"name": "Internet Stipend"}, {"name": "Reimbursement"}], "processing_request": null} + application/json: {"payroll_deadline": "2022-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": false, "processed_date": null, "calculated_at": null, "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "off_cycle_reason": null, "auto_pilot": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2022-02-22", "initial_check_date": "2022-02-22", "expected_debit_time": "2022-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2022-02-18T22:00:00Z"}, "employee_compensations": [{"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7067", "excluded": false, "version": "4ba36d23a78c7393b4900ef38019d8ff", "first_name": "Patricia", "preferred_first_name": "Patricia", "last_name": "Hamil", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242ba5"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909ba"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "15.000", "job_uuid": "9d3760f0-d1f9-4700-8817-0fe2dce5cf23", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "b5eef9a9-4a87-4649-a80d-14878c05f44e", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}, {"name": "Regular Hours", "hours": "40.000", "job_uuid": "332bd171-9efc-432b-abbb-a75c9dba706a", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "5.000", "job_uuid": "ca9b3dc1-57ac-4736-901a-9b1c9634b9d5", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "1bad01e2-140c-49ed-9542-2388ce4a19b3", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7012", "excluded": false, "version": "ff083257a5583291fb86656ad0df1b42", "first_name": "Soren", "preferred_first_name": "Soren", "last_name": "Keck", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242b34"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e90955"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Commission Only Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7781", "excluded": false, "version": "259816479e3729bf855318af9b9adddf", "first_name": "Patty", "preferred_first_name": "Patty", "last_name": "Tam", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242bab"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909cd"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}]}], "created_at": "2022-02-01T22:00:00Z", "fixed_compensation_types": [{"name": "Bonus"}, {"name": "Commission"}, {"name": "Paycheck Tips"}, {"name": "Cash Tips"}, {"name": "Correction Payment"}, {"name": "Anniversary Bonus"}, {"name": "Internet Stipend"}, {"name": "Reimbursement"}], "processing_request": null} get-v1-payment-receipts-payrolls-payroll_uuid: - Example: + speakeasy-default-get-v1-payment-receipts-payrolls-payroll-uuid: parameters: path: payroll_uuid: "" @@ -5769,7 +5619,9 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"payroll_uuid": "afccb970-357e-4013-81f5-85dafc74f9b6", "company_uuid": "c827aa0d-3928-4d5a-ab1f-400641a7d2b8", "name_of_sender": "Torp and Sons and Sons", "name_of_recipient": "Payroll Recipients", "recipient_notice": "Payroll recipients include the employees listed below plus the tax agencies for the taxes listed below.", "debit_date": "2022-06-02", "license": "ZenPayroll, Inc., dba Gusto is a licensed money transmitter. For more about Gusto’s licenses and your state-specific rights to request information, submit complaints, dispute errors, or cancel transactions, visit our license page.", "license_uri": "https://gusto.com/about/licenses", "right_to_refund": "https://gusto.com/about/licenses", "liability_of_licensee": "https://gusto.com/about/licenses", "totals": {"company_debit": "1080.47", "net_pay_debit": "748.34", "child_support_debit": "100.0", "reimbursement_debit": "50.0", "tax_debit": "182.13"}, "taxes": [{"name": "Federal Income Tax", "amount": "30.36"}, {"name": "Social Security", "amount": "104.54"}, {"name": "Medicare", "amount": "24.46"}, {"name": "Additional Medicare", "amount": "0.0"}, {"name": "TX SUTA", "amount": "22.77"}, {"name": "FUTA", "amount": "0.0"}], "employee_compensations": [{"employee_uuid": "f83d0bd8-7e20-43b9-834c-6d514ef6cb47", "employee_first_name": "Patricia", "employee_last_name": "Hamill", "payment_method": "Direct Deposit", "net_pay": "748.34", "total_tax": "182.13", "total_garnishments": "0.0", "child_support_garnishment": "100.0", "total_reimbursement": "50.0"}], "licensee": {"name": "Gusto, Zenpayroll Inc.", "address": "525 20th St", "city": "San Francisco", "state": "CA", "postal_code": "94107", "phone_number": "4157778888"}} + application/json: {} + "404": + application/json: {"errors": []} get-v1-companies-payroll-blockers-company_uuid: Payroll Blockers: parameters: @@ -5779,7 +5631,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"key": "wc_pending_approval", "message": "Worker's compensation policy needs to be accepted."}, {"key": "eftps_in_error", "message": "We could not make payments to the Electronic Federal Tax Payment System."}, {"key": "geocode_error", "message": "Company or employee address could not be verified. Please ensure all addresses are valid."}, {"key": "geocode_needed", "message": "Company or employee address verification is missing. Please ensure all addresses are entered correctly."}, {"key": "pay_schedule_setup_not_complete", "message": "Some employees don’t have a pay schedule set up yet. Please complete this step to run payroll."}, {"key": "invalid_signatory", "message": "A signatory who is authorized to sign documents on behalf of your company is required. Please ensure their identity verification is successful."}, {"key": "suspended", "message": "Company is suspended and cannot run payroll."}, {"key": "soft_suspended", "message": "Company is placed in a 'soft' suspension state and requires missing/incorrect information to be corrected."}, {"key": "pending_payroll_review", "message": "Payroll is blocked. We are reviewing payroll information in your account. Please contact support if you believe this is an error."}, {"key": "pending_recovery_case", "message": "Payroll is blocked due to an open recovery case. Please contact support if you believe this is an error."}, {"key": "pending_information_request", "message": "Payroll is blocked due to an open information request. Please contact support if you believe this is an error."}, {"key": "needs_approval", "message": "Company needs to be approved to run payroll."}, {"key": "missing_addresses", "message": "Company must add addresses in order to run payroll."}, {"key": "missing_federal_tax_setup", "message": "Company must complete federal tax setup in order to run payroll."}, {"key": "missing_industry_selection", "message": "Company must complete industry selection in order to run payroll."}, {"key": "missing_bank_info", "message": "Company must have a bank account in order to run payroll."}, {"key": "missing_employee_setup", "message": "Company must add employees in order to run payroll."}, {"key": "missing_state_tax_setup", "message": "Company must complete state tax setup in order to run payroll."}, {"key": "missing_pay_schedule", "message": "Company must have a pay schedule in order to run payroll."}, {"key": "missing_forms", "message": "Company forms must be signed in order to run payroll."}, {"key": "missing_bank_verification", "message": "Company bank account must be verified in order to run payroll."}, {"key": "missing_signatory", "message": "Company must have a verified signatory in order to run payroll."}] + application/json: [{"key": "eftps_in_error", "message": "We could not make payments to the Electronic Federal Tax Payment System."}, {"key": "geocode_error", "message": "Company or employee address could not be verified. Please ensure all addresses are valid."}, {"key": "geocode_needed", "message": "Company or employee address verification is missing. Please ensure all addresses are entered correctly."}, {"key": "pay_schedule_setup_not_complete", "message": "Some employees don’t have a pay schedule set up yet. Please complete this step to run payroll."}, {"key": "invalid_signatory", "message": "A signatory who is authorized to sign documents on behalf of your company is required. Please ensure their identity verification is successful."}, {"key": "suspended", "message": "Company is suspended and cannot run payroll."}, {"key": "soft_suspended", "message": "Company is placed in a 'soft' suspension state and requires missing/incorrect information to be corrected."}, {"key": "pending_payroll_review", "message": "Payroll is blocked. We are reviewing payroll information in your account. Please contact support if you believe this is an error."}, {"key": "pending_recovery_case", "message": "Payroll is blocked due to an open recovery case. Please contact support if you believe this is an error."}, {"key": "pending_information_request", "message": "Payroll is blocked due to an open information request. Please contact support if you believe this is an error."}, {"key": "needs_approval", "message": "Company needs to be approved to run payroll."}, {"key": "missing_addresses", "message": "Company must add addresses in order to run payroll."}, {"key": "missing_federal_tax_setup", "message": "Company must complete federal tax setup in order to run payroll."}, {"key": "missing_industry_selection", "message": "Company must complete industry selection in order to run payroll."}, {"key": "missing_bank_info", "message": "Company must have a bank account in order to run payroll."}, {"key": "missing_employee_setup", "message": "Company must add employees in order to run payroll."}, {"key": "missing_state_tax_setup", "message": "Company must complete state tax setup in order to run payroll."}, {"key": "missing_pay_schedule", "message": "Company must have a pay schedule in order to run payroll."}, {"key": "missing_forms", "message": "Company forms must be signed in order to run payroll."}, {"key": "missing_bank_verification", "message": "Company bank account must be verified in order to run payroll."}, {"key": "missing_signatory", "message": "Company must have a verified signatory in order to run payroll."}] post-companies-payroll-skip-company_uuid: Example: parameters: @@ -5791,7 +5643,7 @@ examples: application/json: {"payroll_type": "Regular", "start_date": "2023-05-26T00:00:00Z", "end_date": "2023-06-25T00:00:00Z", "pay_schedule_uuid": "85100524-4b42-4d2d-bd62-9d864f9aea64"} responses: "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {} post-payrolls-gross-up-payroll_uuid: Example: parameters: @@ -5802,10 +5654,10 @@ examples: requestBody: application/json: {"employee_uuid": "be48c41e-142d-4116-9430-5aba2313fac7", "net_pay": "1000.00"} responses: - "422": - application/json: {"errors": []} + "200": + application/json: {} put-v1-companies-company_id-payrolls-payroll_id-calculate: - Example: + speakeasy-default-put-v1-companies-company-id-payrolls-payroll-id-calculate: parameters: path: company_id: "" @@ -5814,9 +5666,9 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {} + application/json: {"errors": []} put-v1-companies-company_id-payrolls-payroll_id-submit: - Example: + speakeasy-default-put-v1-companies-company-id-payrolls-payroll-id-submit: parameters: path: company_id: "" @@ -5827,7 +5679,7 @@ examples: application/json: {} responses: "422": - application/json: {} + application/json: {"errors": [{"error_key": "", "category": ""}]} put-api-v1-companies-company_id-payrolls-payroll_id-cancel: Unprocessed: parameters: @@ -5838,7 +5690,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": false, "processed_date": "", "calculated_at": "", "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "created_at": "2022-02-01T22:00:00Z", "submission_blockers": [{"blocker_type": "fast_ach_threshold_exceeded", "blocker_name": "Fast ACH Threshold Exceeded", "unblock_options": [{"unblock_type": "wire_in", "check_date": "2024-06-10T00:00:00Z"}, {"unblock_type": "move_to_four_day", "check_date": "2024-06-12T00:00:00Z", "metadata": {}}], "selected_option": null, "status": "unresolved"}], "processing_request": null} + application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": false, "processed_date": null, "calculated_at": null, "uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": false, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "created_at": "2022-02-01T22:00:00Z", "submission_blockers": [{"blocker_type": "fast_ach_threshold_exceeded", "blocker_name": "Fast ACH Threshold Exceeded", "unblock_options": [{"unblock_type": "wire_in", "check_date": "2024-06-10", "metadata": {}}, {"unblock_type": "move_to_four_day", "check_date": "2024-06-12", "metadata": {}}], "selected_option": null, "status": "unresolved"}], "processing_request": null} Processed: parameters: path: @@ -5848,7 +5700,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": true, "processed_date": "2021-02-18", "calculated_at": "2021-02-18T12:00:00Z", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": true, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "totals": {"company_debit": "121747.71", "net_pay_debit": "79283.80", "tax_debit": "42463.91", "reimbursement_debit": "0.00", "child_support_debit": "0.00", "reimbursements": "0.00", "net_pay": "81752.94", "gross_pay": "130635.89", "employee_bonuses": "0.00", "employee_commissions": "18536.37", "employee_cash_tips": "0.00", "employee_paycheck_tips": "0.00", "additional_earnings": "0.00", "owners_draw": "0.00", "check_amount": "2469.14", "employer_taxes": "6917.19", "employee_taxes": "35546.72", "benefits": "0.00", "employee_benefits_deductions": "13336.23", "imputed_pay": "0.00", "deferred_payroll_taxes": "0.00", "other_deductions": "240.00"}, "employee_compensations": [{"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7067", "excluded": false, "gross_pay": "2791.25", "net_pay": "1953.31", "check_amount": "1953.31", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242ba5"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909ba"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "15.000", "job_uuid": "9d3760f0-d1f9-4700-8817-0fe2dce5cf23", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "b5eef9a9-4a87-4649-a80d-14878c05f44e", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}, {"name": "Regular Hours", "hours": "40.000", "job_uuid": "332bd171-9efc-432b-abbb-a75c9dba706a", "compensation_multiplier": 1, "flsa_status": "Nonexempt"}, {"name": "Overtime", "hours": "5.000", "job_uuid": "ca9b3dc1-57ac-4736-901a-9b1c9634b9d5", "compensation_multiplier": 1.5, "flsa_status": "Nonexempt"}, {"name": "Double overtime", "hours": "0.000", "job_uuid": "1bad01e2-140c-49ed-9542-2388ce4a19b3", "compensation_multiplier": 2, "flsa_status": "Nonexempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": true}, {"name": "401K", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": false}], "deductions": [{"name": "Child Support", "amount": "80.00"}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": "646.69"}, {"name": "Social Security", "employer": true, "amount": "191.25"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7012", "excluded": false, "gross_pay": "2791.25", "net_pay": "1953.31", "check_amount": "1953.31", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242b34"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e90955"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Commission Only Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": true}, {"name": "401K", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": false}], "deductions": [{"name": "Child Support", "amount": "80.00"}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": "646.69"}, {"name": "Social Security", "employer": true, "amount": "191.25"}]}, {"employee_uuid": "187412e1-3dbe-491a-bb2f-2f40323a7781", "excluded": false, "gross_pay": "2791.25", "net_pay": "1953.31", "check_amount": "1953.31", "payment_method": "Direct Deposit", "fixed_compensations": [{"name": "Bonus", "amount": "100.00", "job_uuid": "94e0d15e-9ed2-4077-98f6-64554f242bab"}, {"name": "Reimbursement", "amount": "100.00", "job_uuid": "91bc3b43-ded0-4ee7-98fe-215499e909cd"}], "hourly_compensations": [{"name": "Regular Hours", "hours": "40.000", "job_uuid": "bd378298-3e0c-4145-904a-baadf8a91fa3", "compensation_multiplier": 1, "flsa_status": "Exempt"}], "paid_time_off": [{"name": "Vacation Hours", "hours": "20.000"}, {"name": "Sick Hours", "hours": "0.000"}, {"name": "Holiday Hours", "hours": "0.000"}], "benefits": [{"name": "Group Term Life", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": true}, {"name": "401K", "employee_deduction": "100.00", "company_contribution": "50.00", "imputed": false}], "deductions": [{"name": "Child Support", "amount": "80.00"}], "taxes": [{"name": "Federal Income Tax", "employer": false, "amount": "646.69"}, {"name": "Social Security", "employer": true, "amount": "191.25"}]}], "company_taxes": [{"name": "MO Compensation Deduction", "employer": true, "amount": "-0.92"}, {"name": "NY MCTMT", "employer": true, "amount": "5.00"}], "created_at": "2022-02-01T22:00:00Z", "credit_blockers": [{"blocker_type": "waiting_for_wire_in", "blocker_name": "Waiting for Wire In", "unblock_options": [{"unblock_type": "submit_wire", "check_date": "2024-06-10T00:00:00Z"}], "selected_option": "submit_wire", "status": "unresolved"}], "processing_request": {"status": "submit_success", "errors": []}} + application/json: {"payroll_deadline": "2021-02-18T22:00:00Z", "check_date": "2021-02-22", "processed": true, "processed_date": "2021-02-18", "calculated_at": "2021-02-18T12:00:00Z", "payroll_uuid": "b50e611d-8f3d-4f24-b001-46675f7b5777", "company_uuid": "6bf7807c-a5a0-4f4d-b2e7-3fbb4b2299fb", "off_cycle": false, "auto_pilot": true, "external": false, "pay_period": {"start_date": "2021-02-01", "end_date": "2021-02-15", "pay_schedule_uuid": "00ebc4a4-ec88-4435-8f45-c505bb63e501"}, "payroll_status_meta": {"cancellable": false, "expected_check_date": "2021-02-22", "initial_check_date": "2021-02-22", "expected_debit_time": "2021-02-18T22:00:00Z", "payroll_late": false, "initial_debit_cutoff_time": "2021-02-18T22:00:00Z"}, "totals": {"company_debit": "121747.71", "net_pay_debit": "79283.80", "tax_debit": "42463.91", "reimbursement_debit": "0.00", "child_support_debit": "0.00", "reimbursements": "0.00", "net_pay": "81752.94", "gross_pay": "130635.89", "employee_bonuses": "0.00", "employee_commissions": "18536.37", "employee_cash_tips": "0.00", "employee_paycheck_tips": "0.00", "additional_earnings": "0.00", "owners_draw": "0.00", "check_amount": "2469.14", "employer_taxes": "6917.19", "employee_taxes": "35546.72", "benefits": "0.00", "employee_benefits_deductions": "13336.23", "imputed_pay": "0.00", "deferred_payroll_taxes": "0.00", "other_deductions": "240.00"}, "company_taxes": [{"name": "MO Compensation Deduction", "employer": true, "amount": "-0.92"}, {"name": "NY MCTMT", "employer": true, "amount": "5.00"}], "payroll_taxes": [{"name": "Federal Income Tax", "employer": false, "amount": 3546.72}, {"name": "Social Security", "employer": true, "amount": 786}, {"name": "Social Security", "employer": false, "amount": 786}, {"name": "CA State Income Tax", "employer": false, "amount": 132.51}], "created_at": "2022-02-01T22:00:00Z", "credit_blockers": [{"blocker_type": "waiting_for_wire_in", "blocker_name": "Waiting for Wire In", "unblock_options": [{"unblock_type": "submit_wire", "check_date": "2024-06-10", "metadata": {}}], "selected_option": "submit_wire", "status": "unresolved"}], "processing_request": {"status": "submit_success", "errors": []}} Basic: parameters: path: @@ -5878,7 +5730,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-payrolls-payroll_uuid-employees-employee_uuid-pay_stub: speakeasy-default-get-v1-payrolls-payroll-uuid-employees-employee-uuid-pay-stub: parameters: @@ -5887,8 +5739,13 @@ examples: employee_id: "" header: X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/pdf: "x-file: example.file" + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-employees-employee_uuid-pay_stubs: - test_example: + speakeasy-default-get-v1-employees-employee-uuid-pay-stubs: parameters: path: employee_id: "" @@ -5896,9 +5753,9 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [] + application/json: [{"uuid": "c059aec3-c102-4432-aff7-00f2afedcd8f"}] "404": - application/json: {"errors": [{"error_key": "request", "category": "not_found", "message": "The requested resource was not found."}]} + application/json: {"errors": []} post-v1-payrolls-payroll_uuid-generated_documents-printable_payroll_checks: Example: parameters: @@ -5907,7 +5764,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"printing_format": "bottom"} + application/json: {"printing_format": "top"} responses: "200": application/json: {"payroll_uuid": "a83d0bd8-7d20-43b9-834c-6d514ef6cb20", "printing_format": "top", "starting_check_number": "10", "request_uuid": "p83d0ca8-7d41-42a9-834y-7d218ef6cb20", "status": "pending", "employee_check_number_mapping": [{"employee_uuid": "9fcf1b1d-8886-4691-9283-383d3bdd4fd9", "check_number": 10}]} @@ -5929,7 +5786,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"printing_format": "bottom"} + application/json: {"printing_format": "top"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -5940,10 +5797,38 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"printing_format": "bottom"} + application/json: {"printing_format": "top"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + get-v1-companies-company_id-payrolls-id-partner_disbursements: + speakeasy-default-get-v1-companies-company-id-payrolls-id-partner-disbursements: + parameters: + path: + company_id: "" + id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: {} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} + patch-v1-companies-company_id-payrolls-id-partner_disbursements: + speakeasy-default-patch-v1-companies-company-id-payrolls-id-partner-disbursements: + parameters: + path: + company_id: "" + id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"disbursements": [{"employee_uuid": "1a2b3c4d-5e6f-7890-abcd-ef1234567890"}]} + responses: + "200": + application/json: {} + "404": + application/json: {"errors": []} post-v1-payrolls-payroll_id-calculate_accruing_time_off_hours: Example: parameters: @@ -5992,7 +5877,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-time_off_policies-time_off_policy_uuid: Unlimited Policy: parameters: @@ -6002,7 +5887,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "Test Vacation Unlimited Policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": "", "accrual_rate_unit": "", "paid_out_on_termination": false, "accrual_waiting_period_days": 700347, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "05ed3150-591e-4f8b-bfd5-55d478edd2d8"}, {"uuid": "3633ce57-abb7-422f-8c5a-455566618e6a"}, {"uuid": "9b37429c-e540-40fb-86b3-738ca9af65c7"}]} + application/json: {"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "Test Vacation Unlimited Policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": null, "accrual_rate_unit": null, "paid_out_on_termination": false, "accrual_waiting_period_days": null, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "05ed3150-591e-4f8b-bfd5-55d478edd2d8"}, {"uuid": "3633ce57-abb7-422f-8c5a-455566618e6a"}, {"uuid": "9b37429c-e540-40fb-86b3-738ca9af65c7"}]} Fixed Policy: parameters: path: @@ -6011,7 +5896,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "2439c13f-f6d7-4a93-af8c-175fd4cc7ce8", "company_uuid": "f5f7b10d-2ddb-42f6-a955-d55320ce5316", "name": "Test Vacation Fixed Policy", "policy_type": "vacation", "accrual_method": "per_anniversary_year", "accrual_rate": "120.0", "accrual_rate_unit": "", "paid_out_on_termination": true, "accrual_waiting_period_days": 0, "carryover_limit_hours": "240.0", "max_accrual_hours_per_year": "120.0", "max_hours": "300.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "de7a5fb3-2e0f-460a-abbf-467fe310bf5c"}, {"uuid": "92af03c7-a833-43ae-bae8-f67007a59b37"}]} + application/json: {"uuid": "2439c13f-f6d7-4a93-af8c-175fd4cc7ce8", "company_uuid": "f5f7b10d-2ddb-42f6-a955-d55320ce5316", "name": "Test Vacation Fixed Policy", "policy_type": "vacation", "accrual_method": "per_anniversary_year", "accrual_rate": "120.0", "accrual_rate_unit": null, "paid_out_on_termination": true, "accrual_waiting_period_days": 0, "carryover_limit_hours": "240.0", "max_accrual_hours_per_year": "120.0", "max_hours": "300.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "de7a5fb3-2e0f-460a-abbf-467fe310bf5c", "balance": "80.0"}, {"uuid": "92af03c7-a833-43ae-bae8-f67007a59b37", "balance": "60.0"}]} Hourly Policy: parameters: path: @@ -6020,7 +5905,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "bd5f354f-12e0-4a5e-ad1f-953bb2685ad4", "company_uuid": "6767445f-5075-4ea4-a7f5-d5b5b93d4d60", "name": "Test Vacation Hourly Policy", "policy_type": "vacation", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "1ea2764d-0f1a-4f09-b1d9-3006aecf63c4"}, {"uuid": "a0db19a2-7c8f-42b4-9d4c-2e6246c3d6e8"}]} + application/json: {"uuid": "bd5f354f-12e0-4a5e-ad1f-953bb2685ad4", "company_uuid": "6767445f-5075-4ea4-a7f5-d5b5b93d4d60", "name": "Test Vacation Hourly Policy", "policy_type": "vacation", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "1ea2764d-0f1a-4f09-b1d9-3006aecf63c4", "balance": "56.0"}, {"uuid": "a0db19a2-7c8f-42b4-9d4c-2e6246c3d6e8", "balance": "84.0"}]} put-time_off_policies-time_off_policy_uuid: example: parameters: @@ -6029,34 +5914,12 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"name": "Hourly Vacation Policy", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0"} + application/json: {"name": "Hourly Vacation Policy", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0", "version": ""} responses: "200": - application/json: {"uuid": "d95fa7f0-e743-42ce-b47c-b60cc78135dd", "company_uuid": "", "name": "", "policy_type": "sick", "accrual_method": "", "is_active": false, "employees": [{}]} + application/json: {"uuid": "7ab84b34-487a-4d6d-a723-9d7b93561a65", "company_uuid": "", "name": "", "policy_type": "sick", "accrual_method": "", "is_active": true, "employees": []} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - Unlimited Vacation Policy: - parameters: - path: - time_off_policy_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "200": - application/json: {"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "Unlimited Vacation Policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": "", "accrual_rate_unit": "", "paid_out_on_termination": false, "accrual_waiting_period_days": 579805, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "is_active": true, "employees": []} - Hourly Vacation Policy: - parameters: - path: - time_off_policy_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "200": - application/json: {"uuid": "d86223a1-ec67-4204-8d6a-0f36499c02d0", "company_uuid": "f43bcd64-7f57-4d4e-9c1a-7c90bab8a358", "name": "Test Vacation Hourly Policy", "policy_type": "vacation", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0", "complete": true, "is_active": true, "employees": []} + application/json: {"errors": [{"error_key": "", "category": ""}]} Basic: parameters: path: @@ -6064,7 +5927,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {} + application/json: {"version": ""} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -6075,7 +5938,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {} + application/json: {"version": ""} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -6086,10 +5949,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {} + application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-companies-company_uuid-time_off_policies: example: parameters: @@ -6099,7 +5962,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "Test Vacation Unlimited Policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": "", "accrual_rate_unit": "", "paid_out_on_termination": false, "accrual_waiting_period_days": 461008, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "05ed3150-591e-4f8b-bfd5-55d478edd2d8"}, {"uuid": "3633ce57-abb7-422f-8c5a-455566618e6a"}, {"uuid": "9b37429c-e540-40fb-86b3-738ca9af65c7"}]}, {"uuid": "2439c13f-f6d7-4a93-af8c-175fd4cc7ce8", "company_uuid": "f5f7b10d-2ddb-42f6-a955-d55320ce5316", "name": "Test Vacation Fixed Policy", "policy_type": "vacation", "accrual_method": "per_anniversary_year", "accrual_rate": "120.0", "accrual_rate_unit": "", "paid_out_on_termination": true, "accrual_waiting_period_days": 0, "carryover_limit_hours": "240.0", "max_accrual_hours_per_year": "120.0", "max_hours": "300.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "de7a5fb3-2e0f-460a-abbf-467fe310bf5c"}, {"uuid": "92af03c7-a833-43ae-bae8-f67007a59b37"}]}, {"uuid": "bd5f354f-12e0-4a5e-ad1f-953bb2685ad4", "company_uuid": "6767445f-5075-4ea4-a7f5-d5b5b93d4d60", "name": "Test Vacation Hourly Policy", "policy_type": "vacation", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "1ea2764d-0f1a-4f09-b1d9-3006aecf63c4"}, {"uuid": "a0db19a2-7c8f-42b4-9d4c-2e6246c3d6e8"}]}] + application/json: [{"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "Test Vacation Unlimited Policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": null, "accrual_rate_unit": null, "paid_out_on_termination": false, "accrual_waiting_period_days": null, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "05ed3150-591e-4f8b-bfd5-55d478edd2d8"}, {"uuid": "3633ce57-abb7-422f-8c5a-455566618e6a"}, {"uuid": "9b37429c-e540-40fb-86b3-738ca9af65c7"}]}, {"uuid": "2439c13f-f6d7-4a93-af8c-175fd4cc7ce8", "company_uuid": "f5f7b10d-2ddb-42f6-a955-d55320ce5316", "name": "Test Vacation Fixed Policy", "policy_type": "vacation", "accrual_method": "per_anniversary_year", "accrual_rate": "120.0", "accrual_rate_unit": null, "paid_out_on_termination": true, "accrual_waiting_period_days": 0, "carryover_limit_hours": "240.0", "max_accrual_hours_per_year": "120.0", "max_hours": "300.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "de7a5fb3-2e0f-460a-abbf-467fe310bf5c", "balance": "80.0"}, {"uuid": "92af03c7-a833-43ae-bae8-f67007a59b37", "balance": "60.0"}]}, {"uuid": "bd5f354f-12e0-4a5e-ad1f-953bb2685ad4", "company_uuid": "6767445f-5075-4ea4-a7f5-d5b5b93d4d60", "name": "Test Vacation Hourly Policy", "policy_type": "vacation", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0", "complete": true, "version": "f5556bce3d75ec2b62bd11990aa7993a", "is_active": true, "employees": [{"uuid": "1ea2764d-0f1a-4f09-b1d9-3006aecf63c4", "balance": "56.0"}, {"uuid": "a0db19a2-7c8f-42b4-9d4c-2e6246c3d6e8", "balance": "84.0"}]}] post-companies-company_uuid-time_off_policies: Unlimited Policy: parameters: @@ -6111,9 +5974,9 @@ examples: application/json: {"name": "Unlimited Vacation Policy", "policy_type": "vacation", "accrual_method": "unlimited"} responses: "201": - application/json: {"uuid": "7a621cf0-21cd-49cf-8540-3315211a509a", "company_uuid": "", "name": "", "policy_type": "vacation", "accrual_method": "", "is_active": false, "employees": []} + application/json: {"uuid": "f0f0c0e9-237c-4591-9f3a-f5dc0b607098", "company_uuid": "", "name": "", "policy_type": "vacation", "accrual_method": "", "is_active": true, "employees": [{}]} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": [{"error_key": "", "category": ""}]} Hourly Policy: parameters: path: @@ -6124,31 +5987,9 @@ examples: application/json: {"name": "Test Vacation Hourly Policy", "policy_type": "vacation", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0"} responses: "201": - application/json: {"uuid": "8e774c2b-ecc3-4769-b177-5e024985613d", "company_uuid": "", "name": "", "policy_type": "vacation", "accrual_method": "", "is_active": false, "employees": [{}, {}, {}]} + application/json: {"uuid": "f0f0c0e9-237c-4591-9f3a-f5dc0b607098", "company_uuid": "", "name": "", "policy_type": "vacation", "accrual_method": "", "is_active": true, "employees": [{}]} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} - Unlimited Vacation Policy: - parameters: - path: - company_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"name": "", "policy_type": "", "accrual_method": "unlimited"} - responses: - "201": - application/json: {"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "Unlimited Vacation Policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": "", "accrual_rate_unit": "", "paid_out_on_termination": false, "accrual_waiting_period_days": 198175, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "is_active": true, "employees": []} - Hourly Vacation Policy: - parameters: - path: - company_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"name": "", "policy_type": "", "accrual_method": "per_hour_paid"} - responses: - "201": - application/json: {"uuid": "d86223a1-ec67-4204-8d6a-0f36499c02d0", "company_uuid": "f43bcd64-7f57-4d4e-9c1a-7c90bab8a358", "name": "Test Vacation Hourly Policy", "policy_type": "vacation", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0", "complete": true, "is_active": true, "employees": []} + application/json: {"errors": [{"error_key": "", "category": ""}]} Basic: parameters: path: @@ -6156,7 +5997,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"name": "", "policy_type": "", "accrual_method": "per_calendar_year"} + application/json: {"name": "", "policy_type": "", "accrual_method": "per_anniversary_year"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -6178,10 +6019,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"name": "", "policy_type": "", "accrual_method": "per_hour_worked_no_overtime"} + application/json: {"name": "", "policy_type": "", "accrual_method": "per_anniversary_year"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-version-time_off_policies-time_off_policy_uuid-add_employees: Unlimited Policy: parameters: @@ -6193,7 +6034,9 @@ examples: application/json: {} responses: "200": - application/json: {"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "test policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": "", "accrual_rate_unit": "", "paid_out_on_termination": false, "accrual_waiting_period_days": 556955, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "is_active": true, "employees": [{"uuid": "05ed3150-591e-4f8b-bfd5-55d478edd2d8"}]} + application/json: {"uuid": "df58e44e-4177-475b-a9e8-5abc789b6537", "company_uuid": "", "name": "", "policy_type": "sick", "accrual_method": "", "is_active": true, "employees": []} + "422": + application/json: {"errors": []} Fixed/Hourly Policy: parameters: path: @@ -6204,20 +6047,9 @@ examples: application/json: {} responses: "200": - application/json: {"uuid": "2612c945-2062-42f1-89d8-e290bf96bb7f", "company_uuid": "", "name": "", "policy_type": "vacation", "accrual_method": "", "is_active": false, "employees": []} + application/json: {"uuid": "df58e44e-4177-475b-a9e8-5abc789b6537", "company_uuid": "", "name": "", "policy_type": "sick", "accrual_method": "", "is_active": true, "employees": []} "422": - application/json: {"errors": [{"error_key": "", "category": ""}]} - Hourly Policy: - parameters: - path: - time_off_policy_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {} - responses: - "200": - application/json: {"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "test policy", "policy_type": "vacation", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0", "complete": true, "is_active": true, "employees": [{"uuid": "56c672b4-3918-45cd-a3bb-a62ae0ff1307"}, {"uuid": "28e7a45d-32dd-4925-a82a-9a3ccc6d302c"}, {"uuid": "f60650da-ba18-417a-b2ab-3c9b6f0fe4f2"}]} + application/json: {"errors": []} Basic: parameters: path: @@ -6250,7 +6082,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-v1-time_off_policies-time_off_policy_uuid-remove_employees: example: parameters: @@ -6262,7 +6094,9 @@ examples: application/json: {} responses: "200": - application/json: {"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "test policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": "", "accrual_rate_unit": "", "paid_out_on_termination": false, "accrual_waiting_period_days": 75298, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "is_active": true, "employees": [{"uuid": "05ed3150-591e-4f8b-bfd5-55d478edd2d8"}]} + application/json: {"uuid": "76d3bc66-430a-4419-a8da-5195d780d44f", "company_uuid": "", "name": "", "policy_type": "vacation", "accrual_method": "", "is_active": false, "employees": [{}]} + "422": + application/json: {"errors": [{"error_key": "", "category": ""}]} Basic: parameters: path: @@ -6295,7 +6129,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-version-time_off_policies-time_off_policy_uuid-balance: example: parameters: @@ -6307,7 +6141,9 @@ examples: application/json: {} responses: "200": - application/json: {"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "test policy", "policy_type": "vacation", "accrual_method": "per_hour_paid", "accrual_rate": "4.0", "accrual_rate_unit": "80.0", "paid_out_on_termination": true, "accrual_waiting_period_days": 30, "carryover_limit_hours": "200.0", "max_accrual_hours_per_year": "120.0", "max_hours": "240.0", "complete": true, "is_active": true, "employees": [{"uuid": "56c672b4-3918-45cd-a3bb-a62ae0ff1307"}, {"uuid": "28e7a45d-32dd-4925-a82a-9a3ccc6d302c"}, {"uuid": "f60650da-ba18-417a-b2ab-3c9b6f0fe4f2"}]} + application/json: {"uuid": "7504b7f0-292c-4a3d-8feb-150418f2397f", "company_uuid": "", "name": "", "policy_type": "vacation", "accrual_method": "", "is_active": true, "employees": []} + "422": + application/json: {"errors": [{"error_key": "", "category": ""}]} Basic: parameters: path: @@ -6340,17 +6176,8 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-v1-time_off_policies-time_off_policy_uuid-deactivate: - example: - parameters: - path: - time_off_policy_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "200": - application/json: {"uuid": "3f746cd0-dd08-408f-b712-8180c7c621e9", "company_uuid": "de83cff2-8e7a-448e-a28c-14258a9971c3", "name": "test policy", "policy_type": "vacation", "accrual_method": "unlimited", "accrual_rate": "", "accrual_rate_unit": "", "paid_out_on_termination": false, "accrual_waiting_period_days": 340065, "carryover_limit_hours": "", "max_accrual_hours_per_year": "", "max_hours": "", "complete": true, "is_active": false, "employees": [{"uuid": "05ed3150-591e-4f8b-bfd5-55d478edd2d8"}]} Basic: parameters: path: @@ -6377,7 +6204,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-contractor_payments-contractor_payment_uuid-receipt: Example: parameters: @@ -6424,7 +6251,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-companies-company_id-contractor_payments: Example: parameters: @@ -6469,9 +6296,9 @@ examples: application/json: {"contractor_uuid": "", "date": "2020-01-01", "payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-contractor_payments: - Example: + speakeasy-default-get-v1-companies-company-id-contractor-payments: parameters: path: company_id: "" @@ -6524,20 +6351,9 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-companies-company_uuid-contractor_payments-preview: - Example: - parameters: - path: - company_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"contractor_payments": [{}]} - responses: - "200": - application/json: {"expected_debit_date": "2022-08-16"} - example-1: + speakeasy-default-get-companies-company-uuid-contractor-payments-preview: parameters: path: company_uuid: "" @@ -6545,56 +6361,13 @@ examples: X-Gusto-API-Version: "2024-04-01" requestBody: application/json: {"contractor_payments": []} - responses: - "422": - application/json: {"errors": {"check_date": [{"type": "Invalid Attribute", "message": "You cannot issue historical payments for the future, please choose a date in the past.", "full_message": "You cannot issue historical payments for the future, please choose a date in the past."}]}} - post-v1-companies-company_id-contractor_payment_groups: - Example: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": [{"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}]} responses: "200": - application/json: {"uuid": "f693e034-d833-46e3-88d4-2c820c383c57", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-05-07T00:00:00Z", "debit_date": "2024-05-01T00:00:00Z", "status": "Unfunded", "creation_token": "45ef81bb-ae24-4ad1-b2c6-6e563a4c30ed", "totals": {"amount": "2295.0", "debit_amount": "2295.0", "wage_amount": "2220.0", "reimbursement_amount": "75.0"}, "contractor_payments": [{"uuid": "630dc982-f498-4ebc-a6dc-4d76711027ce", "contractor_uuid": "2e6d0970-31bf-47ce-bdb4-713e4207ecf4", "bonus": "0.0", "hours": "40.0", "payment_method": "Direct Deposit", "reimbursement": "75.0", "status": "Unfunded", "hourly_rate": "18.0", "may_cancel": false, "wage": "0.0", "wage_type": "Hourly", "wage_total": "720.0"}, {"uuid": "12f51eba-d653-4357-8c05-1f1f8d0fd5e3", "contractor_uuid": "a975fda0-fcf5-469a-a5fd-06e43d1cd99d", "bonus": "0.0", "hours": "0.0", "payment_method": "Check", "reimbursement": "0.0", "status": "Unfunded", "hourly_rate": "0.0", "may_cancel": false, "wage": "1500.0", "wage_type": "Fixed", "wage_total": "1500.0"}]} - Basic: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": [{"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}, {"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}]} - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": [{"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}]} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": []} - responses: + application/json: {} "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {} get-v1-companies-company_id-contractor_payment_groups: - Example: + speakeasy-default-get-v1-companies-company-id-contractor-payment-groups: parameters: path: company_id: "" @@ -6605,20 +6378,11 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "7f2337f9-9b78-44b9-aeed-be4777b833a8", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-03-15T00:00:00Z", "debit_date": "2024-03-11T00:00:00Z", "status": "Funded", "creation_token": "a51a3500-3200-43af-a738-169d4b66a9db", "totals": {"debit_amount": "740.00", "wage_amount": "720.00", "reimbursement_amount": "20.00"}}, {"uuid": "56260b3d-c375-415c-b77a-75d99f717193", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-05-02T00:00:00Z", "debit_date": "2024-04-26T00:00:00Z", "status": "Unfunded", "creation_token": "45ef81bb-ae24-4ad1-b2c6-6e563a4c30ed", "totals": {"debit_amount": "2365.00", "wage_amount": "2270.00", "reimbursement_amount": "95.00"}}] - post-v1-companies-company_id-contractor_payment_groups-preview: - Example: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": [{"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}]} - responses: - "200": - application/json: {"uuid": "nil", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-05-07T00:00:00Z", "debit_date": "2024-05-01T00:00:00Z", "status": "Unfunded", "creation_token": "nil", "totals": {"amount": "2295.0", "debit_amount": "2295.0", "wage_amount": "2220.0", "reimbursement_amount": "75.0"}, "contractor_payments": [{"uuid": "nil", "contractor_uuid": "2e6d0970-31bf-47ce-bdb4-713e4207ecf4", "bonus": "0.0", "hours": "40.0", "payment_method": "Direct Deposit", "reimbursement": "75.0", "status": "Unfunded", "hourly_rate": "18.0", "may_cancel": false, "wage": "0.0", "wage_type": "Hourly", "wage_total": "720.0"}, {"uuid": "nil", "contractor_uuid": "a975fda0-fcf5-469a-a5fd-06e43d1cd99d", "bonus": "0.0", "hours": "0.0", "payment_method": "Check", "reimbursement": "0.0", "status": "Unfunded", "hourly_rate": "0.0", "may_cancel": false, "wage": "1500.0", "wage_type": "Fixed", "wage_total": "1500.0"}]} - Basic: + application/json: [{}] + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} + post-v1-companies-company_id-contractor_payment_groups: + speakeasy-default-post-v1-companies-company-id-contractor-payment-groups: parameters: path: company_id: "" @@ -6627,32 +6391,28 @@ examples: requestBody: application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": []} responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - company_id: "" - header: - X-Gusto-API-Version: "2024-04-01" - requestBody: - application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": [{"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}, {"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}]} - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: + "201": + application/json: {} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} + post-v1-companies-company_id-contractor_payment_groups-preview: + speakeasy-default-post-v1-companies-company-id-contractor-payment-groups-preview: parameters: path: company_id: "" header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"check_date": "2020-01-01", "creation_token": "1d532d13-8f61-4a57-ad3c-b5fac1c6e05e", "contractor_payments": [{"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}, {"payment_method": "Direct Deposit", "wage": 5000, "hours": 40, "bonus": 500, "reimbursement": 20}]} + application/json: {"contractor_payments": []} responses: + "200": + application/json: {} + "404": + application/json: {"errors": []} "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": []} get-v1-contractor_payment_groups-contractor_payment_group_id: - Example: + speakeasy-default-get-v1-contractor-payment-groups-contractor-payment-group-id: parameters: path: contractor_payment_group_uuid: "" @@ -6660,37 +6420,21 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "f693e034-d833-46e3-88d4-2c820c383c57", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-05-07T00:00:00Z", "debit_date": "2024-05-01T00:00:00Z", "status": "Unfunded", "creation_token": "45ef81bb-ae24-4ad1-b2c6-6e563a4c30ed", "totals": {"amount": "2295.0", "debit_amount": "2295.0", "wage_amount": "2220.0", "reimbursement_amount": "75.0"}, "contractor_payments": [{"uuid": "630dc982-f498-4ebc-a6dc-4d76711027ce", "contractor_uuid": "2e6d0970-31bf-47ce-bdb4-713e4207ecf4", "bonus": "0.0", "hours": "40.0", "payment_method": "Direct Deposit", "reimbursement": "75.0", "status": "Unfunded", "hourly_rate": "18.0", "may_cancel": false, "wage": "0.0", "wage_type": "Hourly", "wage_total": "720.0"}, {"uuid": "12f51eba-d653-4357-8c05-1f1f8d0fd5e3", "contractor_uuid": "a975fda0-fcf5-469a-a5fd-06e43d1cd99d", "bonus": "0.0", "hours": "0.0", "payment_method": "Check", "reimbursement": "0.0", "status": "Unfunded", "hourly_rate": "0.0", "may_cancel": false, "wage": "1500.0", "wage_type": "Fixed", "wage_total": "1500.0"}]} + application/json: {} + "404": + application/json: {"errors": []} delete-v1-contractor_payment_groups-contractor_payment_group_id: - Basic: - parameters: - path: - contractor_payment_group_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: - parameters: - path: - contractor_payment_group_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: + speakeasy-default-delete-v1-contractor-payment-groups-contractor-payment-group-id: parameters: path: contractor_payment_group_uuid: "" header: X-Gusto-API-Version: "2024-04-01" responses: - "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + "404": + application/json: {"errors": []} put-v1-contractor_payment_groups-contractor_payment_group_id-fund: - Example: + speakeasy-default-put-v1-contractor-payment-groups-contractor-payment-group-id-fund: parameters: path: contractor_payment_group_uuid: "" @@ -6698,34 +6442,39 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "f693e034-d833-46e3-88d4-2c820c383c57", "company_uuid": "c54046f7-1be4-4c54-8194-f4842c30c86d", "check_date": "2024-05-07T00:00:00Z", "debit_date": "2024-05-01T00:00:00Z", "status": "Unfunded", "creation_token": "45ef81bb-ae24-4ad1-b2c6-6e563a4c30ed", "totals": {"amount": "2295.0", "debit_amount": "2295.0", "wage_amount": "2220.0", "reimbursement_amount": "75.0"}, "contractor_payments": [{"uuid": "630dc982-f498-4ebc-a6dc-4d76711027ce", "contractor_uuid": "2e6d0970-31bf-47ce-bdb4-713e4207ecf4", "bonus": "0.0", "hours": "40.0", "payment_method": "Direct Deposit", "reimbursement": "75.0", "status": "Unfunded", "hourly_rate": "18.0", "may_cancel": false, "wage": "0.0", "wage_type": "Hourly", "wage_total": "720.0"}, {"uuid": "12f51eba-d653-4357-8c05-1f1f8d0fd5e3", "contractor_uuid": "a975fda0-fcf5-469a-a5fd-06e43d1cd99d", "bonus": "0.0", "hours": "0.0", "payment_method": "Check", "reimbursement": "0.0", "status": "Unfunded", "hourly_rate": "0.0", "may_cancel": false, "wage": "1500.0", "wage_type": "Fixed", "wage_total": "1500.0"}]} - Basic: - parameters: - path: - contractor_payment_group_uuid: "" - header: - X-Gusto-API-Version: "2024-04-01" - responses: + application/json: {} + "404": + application/json: {"errors": []} "422": - application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} - Resource: + application/json: {"errors": []} + get-v1-contractor_payment_groups-id-partner_disbursements: + speakeasy-default-get-v1-contractor-payment-groups-id-partner-disbursements: parameters: path: - contractor_payment_group_uuid: "" + id: "" header: X-Gusto-API-Version: "2024-04-01" responses: - "422": - application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} - Nested: + "200": + application/json: {} + "404": + application/json: {"errors": []} + patch-v1-contractor_payment_groups-id-partner_disbursements: + speakeasy-default-patch-v1-contractor-payment-groups-id-partner-disbursements: parameters: path: - contractor_payment_group_uuid: "" + id: "" header: X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"disbursements": [{"contractor_payment_uuid": "9f8e7d6c-5b4a-3928-1c2d-3e4f5a6b7c8d"}]} responses: + "200": + application/json: {} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "", "category": ""}]} get-v1-company-forms: Example: parameters: @@ -6775,7 +6524,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"signature_text": "", "agree": false} + application/json: {"signature_text": "", "agree": true} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -6800,7 +6549,7 @@ examples: application/json: {"signature_text": "", "agree": true} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-generated_documents-document_type-request_uuid: Example: parameters: @@ -6820,7 +6569,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"columns": ["total_employer_benefit_contributions", "employee_medicare_additional_tax"], "groupings": ["work_address_state", "work_address"], "file_type": "csv", "with_totals": false, "start_date": "2024-01-01", "end_date": "2024-04-01", "dismissed_start_date": "2024-01-01", "dismissed_end_date": "2024-04-01"} + application/json: {"columns": ["total_time_off_earnings"], "groupings": [], "file_type": "json", "with_totals": false, "start_date": "2024-01-01", "end_date": "2024-04-01", "dismissed_start_date": "2024-01-01", "dismissed_end_date": "2024-04-01"} responses: "200": application/json: {"request_uuid": "p83d0ca8-7d41-42a9-834y-7d218ef6cb20", "company_uuid": "z83d0ca8-7d41-42a9-834y-7d218ef6cb20", "custom_name": "CustomReport", "file_type": "csv"} @@ -6831,7 +6580,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"columns": ["overtime_rate"], "groupings": ["employee", "work_address"], "file_type": "json", "with_totals": false, "start_date": "2024-01-01", "end_date": "2024-04-01", "dismissed_start_date": "2024-01-01", "dismissed_end_date": "2024-04-01"} + application/json: {"columns": ["total_time_off_earnings"], "groupings": [], "file_type": "json", "with_totals": false, "start_date": "2024-01-01", "end_date": "2024-04-01", "dismissed_start_date": "2024-01-01", "dismissed_end_date": "2024-04-01"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -6842,7 +6591,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"columns": [], "groupings": ["employee"], "file_type": "csv", "with_totals": false, "start_date": "2024-01-01", "end_date": "2024-04-01", "dismissed_start_date": "2024-01-01", "dismissed_end_date": "2024-04-01"} + application/json: {"columns": ["total_time_off_earnings"], "groupings": [], "file_type": "json", "with_totals": false, "start_date": "2024-01-01", "end_date": "2024-04-01", "dismissed_start_date": "2024-01-01", "dismissed_end_date": "2024-04-01"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -6853,15 +6602,60 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"columns": [], "groupings": ["work_address_state"], "file_type": "json", "with_totals": false, "start_date": "2024-01-01", "end_date": "2024-04-01", "dismissed_start_date": "2024-01-01", "dismissed_end_date": "2024-04-01"} + application/json: {"columns": ["total_time_off_earnings"], "groupings": [], "file_type": "json", "with_totals": false, "start_date": "2024-01-01", "end_date": "2024-04-01", "dismissed_start_date": "2024-01-01", "dismissed_end_date": "2024-04-01"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} - get-reports-report_uuid: + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + post-payrolls-payroll_uuid-reports-general_ledger: Example: parameters: path: - report_uuid: "" + payroll_uuid: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"aggregation": "default"} + responses: + "200": + application/json: {"payroll_uuid": "a83d0bd8-7d20-43b9-834c-6d514ef6cb20", "aggregation": "integration", "integration_type": "xero", "request_uuid": "p83d0ca8-7d41-42a9-834y-7d218ef6cb20"} + Basic: + parameters: + path: + payroll_uuid: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"aggregation": "default"} + responses: + "422": + application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} + Resource: + parameters: + path: + payroll_uuid: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"aggregation": "default"} + responses: + "422": + application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} + Nested: + parameters: + path: + payroll_uuid: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"aggregation": "default"} + responses: + "422": + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + get-reports-request_uuid: + Example: + parameters: + path: + request_uuid: "" header: X-Gusto-API-Version: "2024-04-01" responses: @@ -6886,7 +6680,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "description": "yuck vice between gee ugh ha"} + application/json: {"active": true, "description": "hm pfft surge beyond"} responses: "201": application/json: {"version": "98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", "company_uuid": "881ce3f2-e3e1-49c9-8ad4-0bcf515f5618", "uuid": "d2cec746-caee-464a-bcaf-00d93f7049c9", "benefit_type": 1, "active": true, "description": "Kaiser Permanente", "source": "external", "partner_name": "XYZ Corp", "deletable": true, "supports_percentage_amounts": true, "responsible_for_employer_taxes": false, "responsible_for_employee_w2": false} @@ -6897,7 +6691,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "description": "bulky electronics through for ick superb nudge embalm simple ouch"} + application/json: {"active": true, "description": "hm pfft surge beyond"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -6908,7 +6702,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "description": "yahoo until planula conceal pfft partially till distant zowie nasalise"} + application/json: {"active": true, "description": "hm pfft surge beyond"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -6919,16 +6713,15 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "description": "down ha who political inside bony procurement funny entwine institute"} + application/json: {"active": true, "description": "hm pfft surge beyond"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_id-company_benefits: Example: parameters: path: company_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -6939,12 +6732,11 @@ examples: parameters: path: company_benefit_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"version": "98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", "uuid": "d2cec746-caee-464a-bcaf-00d93f7049c9", "active": true, "description": "Kaiser Permanente", "source": "external", "partner_name": "XYZ Corp", "deletable": true, "supports_percentage_amounts": true, "responsible_for_employer_taxes": false, "responsible_for_employee_w2": false, "employee_benefits": [{"employee_uuid": "ae44a0b2-3c89-41e1-91c8-5f8224a779ca", "company_benefit_uuid": "d2cec746-caee-464a-bcaf-00d93f7049c9", "active": true, "deduct_as_percentage": false, "employee_deduction": "3", "company_contribution": "0", "uuid": "9988f241-9aee-4383-bfca-eac79cf58135", "contribution": {"type": "amount", "value": {}}}]} + application/json: {"version": "98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", "uuid": "d2cec746-caee-464a-bcaf-00d93f7049c9", "active": true, "description": "Kaiser Permanente", "source": "external", "partner_name": "XYZ Corp", "deletable": true, "supports_percentage_amounts": true, "responsible_for_employer_taxes": false, "responsible_for_employee_w2": false, "employee_benefits": [{"employee_uuid": "ae44a0b2-3c89-41e1-91c8-5f8224a779ca", "company_benefit_uuid": "d2cec746-caee-464a-bcaf-00d93f7049c9", "active": true, "deduct_as_percentage": false, "employee_deduction": "3", "company_contribution": "0", "uuid": "9988f241-9aee-4383-bfca-eac79cf58135", "contribution": {"type": "amount", "value": ""}}]} put-v1-company_benefits-company_benefit_id: Example: parameters: @@ -6989,9 +6781,9 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-company_benefits-company_benefit_id: - Example: + speakeasy-default-delete-v1-company-benefits-company-benefit-id: parameters: path: company_benefit_id: "" @@ -6999,7 +6791,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": {"base": [{"type": "error type", "message": "This is an error message", "full_message": "This is a more descriptive error message"}]}} + application/json: {} get-v1-benefits: Supported Benefits: parameters: @@ -7030,13 +6822,12 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"start_date": "2022-01-01", "end_date": "2022-12-31", "description": "Simple IRA", "company_benefit_deduction": "60.0", "company_benefit_contribution": "30.0"} + application/json: {"start_date": "2022-01-01", "end_date": "2022-12-31", "description": "Simple IRA", "company_benefit_deduction": "60.0", "company_benefit_contribution": "30.0", "employees": {}} get-v1-company_benefits-company_benefit_id-employee_benefits: Example: parameters: path: company_benefit_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -7061,7 +6852,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"employee_benefits": []} + application/json: {"employee_benefits": [{"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}]} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -7072,7 +6863,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"employee_benefits": [{"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}, {"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}, {"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}]} + application/json: {"employee_benefits": [{"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}]} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -7086,7 +6877,7 @@ examples: application/json: {"employee_benefits": [{"active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false, "employee_uuid": ""}]} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-benefits-benefits_id-requirements: Example: parameters: @@ -7096,7 +6887,62 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"employee_deduction": {"required": true, "editable": true, "choices": [""]}, "contribution": {"required": true, "editable": true, "default_value": {"value": "2", "type": "percentage"}, "choices": ["percentage"]}, "deduct_as_percentage": {"required": true, "editable": true, "choices": ["", "", ""]}, "catch_up": {"required": true, "editable": true, "choices": [""]}, "limit_option": {"required": false, "editable": false, "choices": [""]}, "company_contribution_annual_maximum": {"required": false, "editable": false, "choices": ["", ""]}, "coverage_salary_multiplier": {"required": false, "editable": false, "choices": ["", ""]}, "coverage_amount": {"required": false, "editable": false, "choices": ["", "", ""]}} + application/json: {"employee_deduction": {"required": true, "editable": true, "default_value": {}, "choices": ["", ""]}, "contribution": {"required": true, "editable": true, "default_value": {"value": "2", "type": "percentage"}, "choices": ["percentage"]}, "deduct_as_percentage": {"required": true, "editable": true, "default_value": {}, "choices": ["", ""]}, "catch_up": {"required": true, "editable": true, "default_value": {}, "choices": ["", ""]}, "limit_option": {"required": false, "editable": false, "default_value": {}, "choices": [""]}, "company_contribution_annual_maximum": {"required": false, "editable": false, "default_value": {}, "choices": [""]}, "coverage_salary_multiplier": {"required": false, "editable": false, "default_value": {}, "choices": ["", ""]}, "coverage_amount": {"required": false, "editable": false, "default_value": {}, "choices": ["", ""]}} + get-v1-company_benefits-company_benefit_id-contribution_exclusions: + Example: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{"contribution_uuid": "b82e35c5-d7c6-4705-9e16-9f87499ade18", "contribution_type": "Bonus", "excluded": false}, {"contribution_uuid": "f5618c94-ed7d-4366-b2c4-ff05e430064f", "contribution_type": "Cash Tips", "excluded": false}, {"contribution_uuid": "60191999-004a-49d9-b163-630574433653", "contribution_type": "Commission", "excluded": false}, {"contribution_uuid": "75a7a827-1f2d-4d6f-94f2-514c1fc32b13", "contribution_type": "Regular", "excluded": false}, {"contribution_uuid": "eead3c7c-7964-4e3c-b609-670456127b09", "contribution_type": "Life insurance imputed benefit", "excluded": true}] + put-v1-company_benefits-company_benefit_id-contribution_exclusions: + Example: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "082dfd3e-5b55-11f0-bb42-ab7136ba04e2", "contribution_type": "Bonus", "excluded": true}, {"contribution_uuid": "082e034c-5b55-11f0-bb42-ab7136ba04e2", "contribution_type": "Commission", "excluded": false}, {"contribution_uuid": "082e1f6c-5b55-11f0-bb42-ab7136ba04e2", "contribution_type": "Regular", "excluded": true}]} + responses: + "200": + application/json: [{"contribution_uuid": "b82e35c5-d7c6-4705-9e16-9f87499ade18", "contribution_type": "Bonus", "excluded": false}, {"contribution_uuid": "f5618c94-ed7d-4366-b2c4-ff05e430064f", "contribution_type": "Cash Tips", "excluded": false}, {"contribution_uuid": "60191999-004a-49d9-b163-630574433653", "contribution_type": "Commission", "excluded": false}, {"contribution_uuid": "75a7a827-1f2d-4d6f-94f2-514c1fc32b13", "contribution_type": "Regular", "excluded": false}, {"contribution_uuid": "eead3c7c-7964-4e3c-b609-670456127b09", "contribution_type": "Life insurance imputed benefit", "excluded": true}] + Basic: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "", "contribution_type": "", "excluded": true}]} + responses: + "422": + application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} + Resource: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "", "contribution_type": "", "excluded": true}]} + responses: + "422": + application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} + Nested: + parameters: + path: + company_benefit_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"contribution_exclusions": [{"contribution_uuid": "", "contribution_type": "", "excluded": true}]} + responses: + "422": + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-employees-employee_id-employee_benefits: Example: parameters: @@ -7152,13 +6998,12 @@ examples: application/json: {"company_benefit_uuid": "", "active": true, "employee_deduction": "0.00", "deduct_as_percentage": false, "elective": false, "catch_up": false, "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-employee_benefits: Example: parameters: path: employee_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -7238,7 +7083,7 @@ examples: application/json: {"version": "", "employee_deduction": "0.00", "elective": false, "catch_up": false, "deduction_reduces_taxable_income": "unset", "coverage_salary_multiplier": "0.00", "company_contribution": "0.00", "contribute_as_percentage": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-employee_benefits-employee_benefit_id: speakeasy-default-delete-v1-employee-benefits-employee-benefit-id: parameters: @@ -7266,7 +7111,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"tax_year": 5621.31, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} + application/json: {"tax_year": 1828.56, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -7277,7 +7122,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"tax_year": 2733.34, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} + application/json: {"tax_year": 1828.56, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -7288,10 +7133,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"tax_year": 9236.96, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} + application/json: {"tax_year": 1828.56, "ytd_employee_deduction_amount": "0.00", "ytd_company_contribution_amount": "0.00"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} post-v1-employees-employee_id-garnishments: Example: parameters: @@ -7322,7 +7167,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "amount": "", "court_ordered": true, "times": null, "recurring": false, "annual_maximum": null, "pay_period_maximum": null, "deduct_as_percentage": false} + application/json: {"active": true, "amount": "", "court_ordered": false, "times": null, "recurring": false, "annual_maximum": null, "pay_period_maximum": null, "deduct_as_percentage": false} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -7344,16 +7189,15 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"active": true, "amount": "", "court_ordered": true, "times": null, "recurring": false, "annual_maximum": null, "pay_period_maximum": null, "deduct_as_percentage": false} + application/json: {"active": true, "amount": "", "court_ordered": false, "times": null, "recurring": false, "annual_maximum": null, "pay_period_maximum": null, "deduct_as_percentage": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-garnishments: Example: parameters: path: employee_id: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: @@ -7433,7 +7277,7 @@ examples: application/json: {"active": true, "times": null, "recurring": false, "annual_maximum": null, "pay_period_maximum": null, "deduct_as_percentage": false, "version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-garnishments-child_support: Example: parameters: @@ -7451,7 +7295,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "7fe28e4d-1e30-4ebb-8d22-aae768170b82", "version": "", "authorization_status": "permanent_resident", "employer_signed": false, "employee_signed": false} + application/json: {"uuid": "1443fd10-c269-46cd-b709-96e42efc6ff3", "version": "", "authorization_status": "citizen", "employer_signed": true, "employee_signed": true} put-v1-employees-employee_id-i9_authorization: Example: parameters: @@ -7463,7 +7307,7 @@ examples: application/json: {"authorization_status": "citizen", "version": "52b7c567242cb7452e89ba2bc02cb476"} responses: "200": - application/json: {"uuid": "d95fa7f0-e743-42ce-b47c-b60cc78135dd", "version": "", "authorization_status": "permanent_resident", "employer_signed": false, "employee_signed": true} + application/json: {"uuid": "fe5416f1-106e-4c2f-887f-07105c5648b9", "version": "", "authorization_status": "citizen", "employer_signed": false, "employee_signed": true} Basic: parameters: path: @@ -7471,7 +7315,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"authorization_status": "permanent_resident"} + application/json: {"authorization_status": "citizen"} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -7482,7 +7326,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"authorization_status": "permanent_resident"} + application/json: {"authorization_status": "citizen"} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -7493,10 +7337,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"authorization_status": "permanent_resident"} + application/json: {"authorization_status": "citizen"} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-employees-employee_id-i9_authorization-document_options: Example: parameters: @@ -7536,7 +7380,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"documents": [{"document_type": "", "document_title": "", "issuing_authority": ""}]} + application/json: {"documents": []} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -7547,7 +7391,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"documents": [{"document_type": "", "document_title": "", "issuing_authority": ""}]} + application/json: {"documents": []} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -7558,10 +7402,10 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"documents": [{"document_type": "", "document_title": "", "issuing_authority": ""}, {"document_type": "", "document_title": "", "issuing_authority": ""}, {"document_type": "", "document_title": "", "issuing_authority": ""}]} + application/json: {"documents": []} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-v1-employees-employee_id-i9_authorization-documents-document_id: speakeasy-default-delete-v1-employees-employee-id-i9-authorization-documents-document-id: parameters: @@ -7581,7 +7425,7 @@ examples: application/json: {"signature_text": "", "signer_title": "", "agree": false} responses: "200": - application/json: {"uuid": "ab18cec1-6568-4d93-b2ad-8deafd3f650c", "version": "", "authorization_status": "alien", "employer_signed": true, "employee_signed": true} + application/json: {"uuid": "382a613a-1c15-4fd5-9d58-062cde8d7f02", "version": "", "authorization_status": "permanent_resident", "employer_signed": false, "employee_signed": true} Basic: parameters: path: @@ -7589,7 +7433,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"signature_text": "", "signer_title": "", "agree": true} + application/json: {"signature_text": "", "signer_title": "", "agree": false} responses: "422": application/json: {"errors": [{"error_key": "base", "category": "payroll_blocker", "message": "Company must complete all onboarding requirements in order to run payroll.", "metadata": {"key": "needs_onboarding"}}]} @@ -7600,7 +7444,7 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"signature_text": "", "signer_title": "", "agree": true} + application/json: {"signature_text": "", "signer_title": "", "agree": false} responses: "422": application/json: {"errors": [{"error_key": "first_name", "category": "invalid_attribute_value", "message": "First name is required"}, {"error_key": "date_of_birth", "category": "invalid_attribute_value", "message": "Date of birth is not a valid date"}]} @@ -7611,28 +7455,27 @@ examples: header: X-Gusto-API-Version: "2024-04-01" requestBody: - application/json: {"signature_text": "", "signer_title": "", "agree": true} + application/json: {"signature_text": "", "signer_title": "", "agree": false} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_uuid-tax_requirements-state: - Example Tax Requirements for GA: + speakeasy-default-get-v1-companies-company-uuid-tax-requirements-state: parameters: path: company_uuid: "" - state: "Oklahoma" - query: {} + state: "South Dakota" header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"company_uuid": "6c14eac3-0da2-474d-bda1-786b3602d381", "state": "GA", "requirement_sets": [{"state": "GA", "key": "registrations", "label": "Registrations", "effective_from": null, "requirements": [{"key": "71653ec0-00b5-4c66-a58b-22ecf21704c5", "applicable_if": [], "label": "Withholding Number", "description": "If you have run payroll in the past in GA, find your withholding number on notices received from the Georgia Department of Revenue, or call the agency at (877) 423-6711. If you don’t have a number yet, you should register the business online. The last two characters of your ID must be upper case letters.", "value": "1233214-AB", "metadata": {"type": "text"}}, {"key": "6c0911ab-5860-412e-bdef-6437cd881df5", "applicable_if": [], "label": "DOL Account Number", "description": "If you have run payroll in the past in GA, find your DOL account number on notices received from the Georgia Department of Labor, or call the agency at (404) 232-3300. If you don’t have an account number yet, please follow the instructions here to register your business with the Georgia Dept. of Labor.", "value": "474747-88", "metadata": {"type": "text"}}]}, {"state": "GA", "key": "taxrates", "label": "Tax Rates", "effective_from": "2022-01-01", "requirements": [{"key": "e0ac2284-8d30-4100-ae23-f85f9574868b", "applicable_if": [], "label": "Total Tax Rate", "description": "Haven't received your assigned rate yet? Find the new employer rate and enter it here.", "value": "0.05", "metadata": {"type": "tax_rate", "validation": {"type": "min_max", "min": "0.0004", "max": "0.081"}}}]}, {"state": "GA", "key": "depositschedules", "label": "Deposit Schedules", "effective_from": "2022-01-01", "requirements": [{"key": "6ddfcbeb-94d3-4003-bfc2-8c6e1ca9f70c", "applicable_if": [], "label": "Deposit Schedule", "description": "Georgia rejects payments made on the wrong schedule. GA employers receive their schedule on a registration verification letter after registering with the Georgia Dept. of Revenue. If you are unsure, call the agency at (877) 423-6711. If you did not register your business yet, please register the business with the Georgia Dept. of Revenue.", "value": "Semi-weekly", "metadata": {"type": "select", "options": [{"label": "Semiweekly", "value": "Semi-weekly"}, {"label": "Monthly", "value": "Monthly"}, {"label": "Quarterly", "value": "Quarterly"}]}}]}]} + application/json: {} put-v1-companies-company_uuid-tax_requirements-state: Example: parameters: path: company_uuid: "" - state: "Massachusetts" + state: "Tennessee" header: X-Gusto-API-Version: "2024-04-01" requestBody: @@ -7644,7 +7487,7 @@ examples: parameters: path: company_uuid: "" - state: "Kansas" + state: "West Virginia" header: X-Gusto-API-Version: "2024-04-01" requestBody: @@ -7656,7 +7499,7 @@ examples: parameters: path: company_uuid: "" - state: "Utah" + state: "Vermont" header: X-Gusto-API-Version: "2024-04-01" requestBody: @@ -7668,16 +7511,16 @@ examples: parameters: path: company_uuid: "" - state: "Texas" + state: "Maryland" header: X-Gusto-API-Version: "2024-04-01" requestBody: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-v1-companies-company_uuid-tax_requirements: - Company with requirements in CA and GA: + speakeasy-default-get-v1-companies-company-uuid-tax-requirements: parameters: path: company_uuid: "" @@ -7685,7 +7528,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"state": "CA", "setup_complete": true}, {"state": "GA", "setup_complete": false}] + application/json: [{"state": "Delaware", "setup_complete": true}] get-companies-company_uuid-holiday_pay_policy: Example: parameters: @@ -7740,7 +7583,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-companies-company_uuid-holiday_pay_policy: Example: parameters: @@ -7785,7 +7628,7 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} delete-companies-company_uuid-holiday_pay_policy: Basic: parameters: @@ -7813,7 +7656,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-companies-company_uuid-holiday_pay_policy-add: Example: parameters: @@ -7858,7 +7701,7 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} put-companies-company_uuid-holiday_pay_policy-remove: Example: parameters: @@ -7903,7 +7746,7 @@ examples: application/json: {"version": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-companies-company_uuid-paid_holidays: Example: parameters: @@ -7913,6 +7756,9 @@ examples: X-Gusto-API-Version: "2024-04-01" requestBody: application/json: {"year": "2023"} + responses: + "200": + application/json: {} Basic: parameters: path: @@ -7945,7 +7791,7 @@ examples: application/json: {} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-notifications-notification_uuid: Example: parameters: @@ -7955,7 +7801,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "7b1d0df1-6403-4a06-8768-c1dd7d24d27a", "company_uuid": "88f7cca1-dcad-4d20-84db-7fb80303d69f", "title": "Action required: Additional information needed to process payroll", "message": "If we do not receive this information as soon as possible, your payroll may not be processed on time.", "category": "information_request", "actionable": true, "can_block_payroll": true, "published_at": "2022-01-01T00:00:00.000Z", "due_at": "2022-02-01T00:00:00.000Z", "template_variables": {"blocked_task": "Payroll"}, "resources": [{"entity_type": "Employee", "entity_uuid": "21b6f9ce-0ac4-4745-8d8a-127f8c0f00f2"}]} + application/json: {"uuid": "7b1d0df1-6403-4a06-8768-c1dd7d24d27a", "company_uuid": "88f7cca1-dcad-4d20-84db-7fb80303d69f", "title": "Action required: Additional information needed to process payroll", "message": "If we do not receive this information as soon as possible, your payroll may not be processed on time.", "status": "open", "category": "information_request", "actionable": true, "can_block_payroll": true, "published_at": "2022-01-01T00:00:00.000Z", "due_at": "2022-02-01T00:00:00.000Z", "template_variables": {"blocked_task": "Payroll"}, "resources": [{"entity_type": "Employee", "entity_uuid": "21b6f9ce-0ac4-4745-8d8a-127f8c0f00f2"}]} Basic: parameters: path: @@ -7982,7 +7828,17 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} + get-company-notifications: + speakeasy-default-get-company-notifications: + parameters: + path: + company_uuid: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{"uuid": "8ad92898-591b-4d89-a22e-81f1cfdbf03e", "company_uuid": "", "title": "", "message": "", "status": "resolved", "category": "", "actionable": false, "can_block_payroll": false, "published_at": "", "due_at": null, "resources": []}] get-events: Example: parameters: @@ -8012,7 +7868,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "e83d273e-4ae9-4b61-9c71-4030c2f73093", "company_uuid": "c5e3e3e9-732f-4762-849e-20b5cec9036f", "status": "open", "latest_error_code": "R01", "original_debit_date": "2023-10-11T00:00:00Z", "check_date": "2023-10-13T00:00:00Z", "payroll_uuid": "210f2034-fb4a-4059-b109-6c3b5efe499d", "contractor_payment_uuids": ["", "", ""], "amount_outstanding": "10499.43", "event_total_amount": "5912.07"}] + application/json: [{"uuid": "e83d273e-4ae9-4b61-9c71-4030c2f73093", "company_uuid": "c5e3e3e9-732f-4762-849e-20b5cec9036f", "status": "open", "latest_error_code": "R01", "original_debit_date": "2023-10-11", "check_date": "2023-10-13", "payroll_uuid": "210f2034-fb4a-4059-b109-6c3b5efe499d", "contractor_payment_uuids": null, "amount_outstanding": "10499.43", "event_total_amount": "5912.07"}] redebit-recovery-case: Basic: parameters: @@ -8040,18 +7896,17 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-ach-transactions: Example: parameters: path: company_uuid: "" - query: {} header: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "company_uuid": "456e7890-e12b-34c5-d678-901234567890", "payment_event_type": "Payroll", "payment_event_uuid": "789e0123-e45f-67ab-c890-123456789012", "recipient_type": "Employee", "recipient_uuid": "012e3456-f78d-90ab-12cd-345678901234", "error_code": "", "transaction_type": "Credit employee pay", "payment_status": "submitted", "payment_direction": "credit", "payment_event_check_date": "2023-10-02T00:00:00Z", "payment_date": "2023-10-17T00:00:00Z", "amount": "123.00", "description": "PAY 380654"}] + application/json: [{"uuid": "123e4567-e89b-12d3-a456-426655440000", "company_uuid": "456e7890-e12b-34c5-d678-901234567890", "payment_event_type": "Payroll", "payment_event_uuid": "789e0123-e45f-67ab-c890-123456789012", "recipient_type": "Employee", "recipient_uuid": "012e3456-f78d-90ab-12cd-345678901234", "error_code": "", "transaction_type": "Credit employee pay", "payment_status": "submitted", "payment_direction": "credit", "payment_event_check_date": "2023-10-02", "payment_date": "2023-10-17", "amount": "123.00", "description": "PAY 380654"}] get-wire_in_requests-wire_in_request_uuid: example: parameters: @@ -8061,7 +7916,7 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: {"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "status": "awaiting_funds", "origination_bank": "JP Morgan Chase", "origination_bank_address": "1 Chase Plaza, New York, NY 10081", "recipient_name": "Gusto, Inc", "recipient_address": "525 20th Street, San Francisco, CA 94107", "recipient_account_number": "21911761", "recipient_routing_number": "123454321", "additional_notes": "Additional Notes", "bank_name": "JP Morgan Chase", "date_sent": "2024-06-10T00:00:00Z", "unique_tracking_code": "1trvxwxp57zf", "payment_type": "Payroll", "payment_uuid": "payroll", "amount_sent": "1014500.00", "requested_amount": "1014500.00", "wire_in_deadline": "2024-06-21T18:00:00Z"} + application/json: {"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "status": "awaiting_funds", "origination_bank": "JP Morgan Chase", "origination_bank_address": "1 Chase Plaza, New York, NY 10081", "recipient_name": "Gusto, Inc", "recipient_address": "525 20th Street, San Francisco, CA 94107", "recipient_account_number": "21911761", "recipient_routing_number": "123454321", "additional_notes": "Additional Notes", "bank_name": "JP Morgan Chase", "date_sent": "2024-06-10", "unique_tracking_code": "1trvxwxp57zf", "payment_type": "payroll", "payment_uuid": "5faae454-e629-490b-a72a-c022c2c9e6bc", "amount_sent": "1014500.00", "requested_amount": "1014500.00", "wire_in_deadline": "2024-06-21T18:00:00Z"} put-wire_in_requests-wire_in_request_uuid: Example: parameters: @@ -8072,8 +7927,10 @@ examples: requestBody: application/json: {"date_sent": "2024-06-10T00:00:00Z", "bank_name": "Chase", "amount_sent": "314500", "additional_notes": "Wire for 2024-06-15 payroll."} responses: + "200": + application/json: {} "422": - application/json: {"errors": [{"error_key": "", "category": ""}, {"error_key": "", "category": ""}, {"error_key": "", "category": ""}]} + application/json: {"errors": [{"error_key": "", "category": ""}]} example: parameters: path: @@ -8084,7 +7941,7 @@ examples: application/json: {"date_sent": "", "bank_name": "", "amount_sent": ""} responses: "200": - application/json: {"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "status": "awaiting_funds", "origination_bank": "JP Morgan Chase", "origination_bank_address": "1 Chase Plaza, New York, NY 10081", "recipient_name": "Gusto, Inc", "recipient_address": "525 20th Street, San Francisco, CA 94107", "recipient_account_number": "21911761", "recipient_routing_number": "123454321", "additional_notes": "Additional Notes", "bank_name": "JP Morgan Chase", "date_sent": "2024-06-10T00:00:00Z", "unique_tracking_code": "1trvxwxp57zf", "payment_type": "Payroll", "payment_uuid": "payroll", "amount_sent": "1014500.00", "requested_amount": "1014500.00", "wire_in_deadline": "2024-06-21T18:00:00Z"} + application/json: {"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "status": "awaiting_funds", "origination_bank": "JP Morgan Chase", "origination_bank_address": "1 Chase Plaza, New York, NY 10081", "recipient_name": "Gusto, Inc", "recipient_address": "525 20th Street, San Francisco, CA 94107", "recipient_account_number": "21911761", "recipient_routing_number": "123454321", "additional_notes": "Additional Notes", "bank_name": "JP Morgan Chase", "date_sent": "2024-06-10", "unique_tracking_code": "1trvxwxp57zf", "payment_type": "payroll", "payment_uuid": "5faae454-e629-490b-a72a-c022c2c9e6bc", "amount_sent": "1014500.00", "requested_amount": "1014500.00", "wire_in_deadline": "2024-06-21T18:00:00Z"} Basic: parameters: path: @@ -8117,7 +7974,7 @@ examples: application/json: {"date_sent": "", "bank_name": "", "amount_sent": ""} responses: "422": - application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}}]} + application/json: {"errors": [{"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "72ae4617-daa9-4ed7-85e0-18ed5d0ee835"}, "errors": [{"error_key": "hours", "category": "invalid_attribute_value", "message": "Ella Fitzgerald is paid fixed wage and hours cannot be set on a contractor payment"}]}, {"error_key": "contractor_payments", "category": "nested_errors", "metadata": {"contractor_uuid": "2d7bf62c-babf-4a12-8292-340e2d9cab28"}, "errors": [{"error_key": "wage", "category": "invalid_attribute_value", "message": "Isaiah Berlin is paid hourly and wage cannot be set on a contractor payment"}]}]} get-companies-company_uuid-wire_in_request_uuid: Example: parameters: @@ -8127,6 +7984,132 @@ examples: X-Gusto-API-Version: "2024-04-01" responses: "200": - application/json: [{"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "status": "rfi", "origination_bank": "JP Morgan Chase", "origination_bank_address": "1 Chase Plaza, New York, NY 10081", "recipient_name": "Gusto, Inc", "recipient_address": "525 20th Street, San Francisco, CA 94107", "recipient_account_number": "21911761", "recipient_routing_number": "5773243", "additional_notes": "Additional Notes", "bank_name": "Chase", "date_sent": "2024-06-10T00:00:00Z", "unique_tracking_code": "1trvxwxp57zf", "payment_type": "Payroll,", "payment_uuid": "payroll", "amount_sent": "1054693.52", "requested_amount": "1054693.52", "wire_in_deadline": "2024-06-21T18:00:00Z"}] -examplesVersion: 1.0.1 + application/json: [{"uuid": "c5fdae57-5483-4529-9aae-f0edceed92d4", "status": "awaiting_funds", "origination_bank": "JP Morgan Chase", "origination_bank_address": "1 Chase Plaza, New York, NY 10081", "recipient_name": "Gusto, Inc", "recipient_address": "525 20th Street, San Francisco, CA 94107", "recipient_account_number": "21911761", "recipient_routing_number": "5773243", "additional_notes": "Additional Notes", "bank_name": "Chase", "date_sent": "2024-06-10", "unique_tracking_code": "1trvxwxp57zf", "payment_type": "payroll", "payment_uuid": "5faae454-e629-490b-a72a-c022c2c9e6bc", "amount_sent": "1054693.52", "requested_amount": "1054693.52", "wire_in_deadline": "2024-06-21T18:00:00Z"}] + post-v1-employees-employee_id-salary_estimates: + speakeasy-default-post-v1-employees-employee-id-salary-estimates: + parameters: + path: + employee_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"annual_net_revenue": 500000, "zip_code": "94107", "occupations": []} + responses: + "201": + application/json: {"uuid": "b598a3c7-0723-47a6-8b19-87db25374cdf", "employee_uuid": "", "annual_net_revenue": "", "zip_code": "96291", "created_at": "2023-10-16T09:54:22.423Z", "updated_at": "2023-03-05T20:58:56.689Z", "occupations": []} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} + get-v1-salary_estimates-id: + speakeasy-default-get-v1-salary-estimates-id: + parameters: + path: + uuid: "3c9d1f7e-adda-44fb-ba0e-7e5843661514" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: {"uuid": "632f1e66-036f-4581-b3e8-8d4b1b430f71", "employee_uuid": "", "annual_net_revenue": "", "zip_code": "17959-3505", "created_at": "2025-04-15T11:03:53.382Z", "updated_at": "2024-08-21T17:29:15.878Z", "occupations": []} + "404": + application/json: {"errors": []} + put-v1-salary_estimates-id: + speakeasy-default-put-v1-salary-estimates-id: + parameters: + path: + uuid: "969f5dac-57dd-4091-b195-2546171d3a76" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"annual_net_revenue": 600000, "zip_code": "94107", "occupations": [{"code": "151252", "experience_level": "expert", "time_percentage": "0.6", "primary": true}]} + responses: + "200": + application/json: {"uuid": "036222cd-57e6-4f9f-b8b4-0da3610fb9b0", "employee_uuid": "", "annual_net_revenue": "", "zip_code": "99537-5737", "created_at": "2024-01-13T09:25:43.529Z", "updated_at": "2023-11-30T08:47:23.683Z", "occupations": [{"code": "", "experience_level": "intermediate", "time_percentage": ""}]} + "404": + application/json: {"errors": []} + post-v1-salary_estimates-uuid-accept: + speakeasy-default-post-v1-salary-estimates-uuid-accept: + parameters: + path: + uuid: "22c00075-fa4c-4bdc-91e3-f72ab8ec7a1d" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"employee_job_uuid": "7f5d3d93-6d6f-48c0-9f4e-cd12c2d3e4b2"} + responses: + "200": + application/json: {"uuid": "c9c56b3f-9549-4cd6-bedf-53d6cddfed28", "employee_uuid": null, "annual_net_revenue": "", "zip_code": null, "created_at": "2025-12-04T13:25:53.282Z", "updated_at": "2024-02-04T16:04:31.441Z", "occupations": [{"code": "", "experience_level": "expert", "time_percentage": ""}]} + "404": + application/json: {"errors": []} + get-v1-salary_estimates-occupations: + speakeasy-default-get-v1-salary-estimates-occupations: + parameters: + query: + search: "software" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{"code": "15-1252", "title": "Software Developers", "description": "Research, design, and develop computer and network software or specialized utility programs."}] + "422": + application/json: {"errors": []} + get-v1-employees-employee_id-recurring_reimbursements: + speakeasy-default-get-v1-employees-employee-id-recurring-reimbursements: + parameters: + path: + employee_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: [{"uuid": "897ddfb9-d01f-46d5-a12f-643515816ebe", "employee_uuid": "", "description": "atomize stiff keel", "amount": "667.29", "version": ""}] + "404": + application/json: {"errors": []} + post-v1-employees-employee_id-recurring_reimbursements: + speakeasy-default-post-v1-employees-employee-id-recurring-reimbursements: + parameters: + path: + employee_id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"description": "as procrastinate produce provided gracefully huzzah likewise when", "amount": 2610.77} + responses: + "201": + application/json: {"uuid": "1cd7848e-26ee-46fa-bd94-dd5e5c9e7b13", "employee_uuid": "", "description": "agreeable fray tense creaking fiercely by furthermore", "amount": "103.11", "version": ""} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} + get-v1-recurring_reimbursements: + speakeasy-default-get-v1-recurring-reimbursements: + parameters: + path: + id: "" + header: + X-Gusto-API-Version: "2024-04-01" + responses: + "200": + application/json: {"uuid": "85ac47b3-cfab-4c71-a3bb-94592cc07efe", "employee_uuid": "", "description": "awkwardly fervently while aside weakly", "amount": "600.16", "version": ""} + "404": + application/json: {"errors": [{"error_key": "", "category": ""}]} + put-v1-recurring_reimbursements: + speakeasy-default-put-v1-recurring-reimbursements: + parameters: + path: + id: "" + header: + X-Gusto-API-Version: "2024-04-01" + requestBody: + application/json: {"version": "56d00c178bc7393b2a206ed6a86afcb4"} + responses: + "200": + application/json: {"uuid": "6d284604-28f3-4c8f-bb7b-3cb6b1f7fa47", "employee_uuid": "", "description": "abaft including easily cruelly annually however hmph provided dandelion light", "amount": "171.94", "version": ""} + "404": + application/json: {"errors": []} + delete-v1-recurring_reimbursements: + speakeasy-default-delete-v1-recurring-reimbursements: + parameters: + path: + id: "" + header: + X-Gusto-API-Version: "2024-04-01" +examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Python SDK Changes Detected:\n* `gusto.payrolls.generate_printable_checks()`: `response.starting_check_number` **Changed** **Breaking** :warning:\n* `gusto.payrolls.get_receipt()`: \n * `request.x-gusto-api-version` **Changed**\n * `response.employee_compensations.[].payment_method` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.wire_in_requests.submit()`: `response` **Changed** **Breaking** :warning:\n* `gusto.wire_in_requests.get()`: `response` **Changed** **Breaking** :warning:\n* `gusto.ach_transactions.get_all()`: `response.[].recipient_type` **Changed** **Breaking** :warning:\n* `gusto.recovery_cases.get()`: `response.[].contractor_payment_uuids` **Changed** **Breaking** :warning:\n* `gusto.information_requests.get-information-requests()`: `response.[].type` **Changed** **Breaking** :warning:\n* `gusto.notifications.get_details()`: `response` **Changed** **Breaking** :warning:\n* `gusto.tax_requirements.get()`: `response.requirement_sets.[].requirements.[]` **Changed** **Breaking** :warning:\n* `gusto.employee_benefits.update()`: `response` **Changed** **Breaking** :warning:\n* `gusto.employee_benefits.retrieve()`: `response` **Changed** **Breaking** :warning:\n* `gusto.employee_benefits.get()`: `response.[]` **Changed** **Breaking** :warning:\n* `gusto.employee_benefits.create()`: `response` **Changed** **Breaking** :warning:\n* `gusto.company_benefits.update_employee_benefits()`: \n * `request.employee_benefits.[]` **Changed**\n * `response.[]` **Changed** **Breaking** :warning:\n* `gusto.company_benefits.get_employee_benefits()`: `response.[]` **Changed** **Breaking** :warning:\n* `gusto.reports.create_custom()`: `response.custom_name` **Changed** **Breaking** :warning:\n* `gusto.contractor_payment_groups.preview()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.payrolls.cancel()`: `response` **Changed** **Breaking** :warning:\n* `gusto.contractor_payments.get_receipt()`: `response.contractor_payments.[].payment_method` **Changed** **Breaking** :warning:\n* `gusto.time_off_policies.deactivate()`: `response` **Changed** **Breaking** :warning:\n* `gusto.time_off_policies.update_balance()`: `response` **Changed** **Breaking** :warning:\n* `gusto.time_off_policies.remove_employees()`: `response` **Changed** **Breaking** :warning:\n* `gusto.time_off_policies.add_employees()`: `response` **Changed** **Breaking** :warning:\n* `gusto.time_off_policies.create()`: `response` **Changed** **Breaking** :warning:\n* `gusto.companies.get()`: `response.locations.[]` **Changed** **Breaking** :warning:\n* `gusto.companies.update()`: `response.locations.[]` **Changed** **Breaking** :warning:\n* `gusto.time_off_policies.get_all()`: `response.[]` **Changed** **Breaking** :warning:\n* `gusto.time_off_policies.update()`: \n * `request.version` **Added** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n* `gusto.companies.get_custom_fields()`: `response.custom_fields.[].description` **Changed** **Breaking** :warning:\n* `gusto.companies.suspensions.get()`: \n * `request.x-gusto-api-version` **Changed**\n * `response.[]` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.companies.suspensions.suspend()`: \n * `request.x-gusto-api-version` **Changed**\n * `response` **Changed** **Breaking** :warning:\n* `gusto.time_off_policies.get()`: `response` **Changed** **Breaking** :warning:\n* `gusto.wire_in_requests.list()`: `response.[]` **Changed** **Breaking** :warning:\n* `gusto.employee_tax_setup.update_state_taxes()`: \n * `request.x-gusto-api-version` **Changed**\n * `response.[]` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.contractor_payment_groups.create()`: \n * `request.x-gusto-api-version` **Changed**\n * `response` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.payrolls.prepare()`: \n * `request` **Changed**\n * `response` **Changed** **Breaking** :warning:\n* `gusto.payrolls.delete()`: \n * `request.x-gusto-api-version` **Changed**\n * `error` **Changed** **Breaking** :warning:\n* `gusto.payrolls.update()`: \n * `request` **Changed**\n * `response` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.bank_accounts.create()`: \n * `request` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.payrolls.get()`: \n * `request` **Changed**\n * `response` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.external_payrolls.create()`: `response.applicable_benefits` **Changed** **Breaking** :warning:\n* `gusto.external_payrolls.retrieve()`: `response.applicable_benefits` **Changed** **Breaking** :warning:\n* `gusto.external_payrolls.update()`: `response.applicable_benefits` **Changed** **Breaking** :warning:\n* `gusto.payment_configs.get()`: `response` **Changed** **Breaking** :warning:\n* `gusto.payment_configs.update()`: `response` **Changed** **Breaking** :warning:\n* `gusto.pay_schedules.get_assignments()`: `response.employees.[].pay_schedule_uuid` **Changed** **Breaking** :warning:\n* `gusto.employees.list()`: \n * `request` **Changed**\n * `response.[]` **Changed** **Breaking** :warning:\n* `gusto.employees.create()`: \n * `request.work_email` **Added**\n * `response` **Changed** **Breaking** :warning:\n* `gusto.employees.create_historical()`: `response` **Changed** **Breaking** :warning:\n* `gusto.employees.get()`: \n * `request.include` **Changed**\n * `response` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.employees.update()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n* `gusto.payrolls.list()`: \n * `request` **Changed**\n * `response.[]` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.historical_employees.update()`: `response` **Changed** **Breaking** :warning:\n* `gusto.employee_employments.get_history()`: `response.[].termination_date` **Changed** **Breaking** :warning:\n* `gusto.payrolls.create_off_cycle()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.contractor_payment_method.update()`: `response.type` **Changed** **Breaking** :warning:\n* `gusto.contractor_payment_method.get()`: `response.type` **Changed** **Breaking** :warning:\n* `gusto.contractors.update_address()`: `response` **Changed** **Breaking** :warning:\n* `gusto.employee_addresses.delete()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[422]` **Removed** **Breaking** :warning:\n* `gusto.contractors.get_address()`: `response` **Changed** **Breaking** :warning:\n* `gusto.contractors.update()`: `response` **Changed** **Breaking** :warning:\n* `gusto.contractors.get()`: `response` **Changed** **Breaking** :warning:\n* `gusto.contractors.list()`: \n * `request.sort_by` **Added**\n * `response.[]` **Changed** **Breaking** :warning:\n* `gusto.contractors.create()`: `response` **Changed** **Breaking** :warning:\n* `gusto.employee_tax_setup.get_federal_taxes()`: `response.additional_withholding` **Changed** **Breaking** :warning:\n* `gusto.employee_tax_setup.update_federal_taxes()`: `response.additional_withholding` **Changed** **Breaking** :warning:\n* `gusto.employee_tax_setup.get_state_taxes()`: \n * `request.x-gusto-api-version` **Changed**\n * `response.[]` **Changed** **Breaking** :warning:\n * `error.status[404]` **Added**\n* `gusto.federal_tax_details.get()`: `response.ein_verification` **Added**\n* `gusto.jobs_and_compensations.create_job()`: `response` **Changed**\n* `gusto.jobs_and_compensations.get_jobs()`: `response.[]` **Changed**\n* `gusto.jobs_and_compensations.get_job()`: `response` **Changed**\n* `gusto.jobs_and_compensations.update()`: `response` **Changed**\n* `gusto.employee_addresses.delete_work_address()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto.employee_addresses.update_work_address()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto.employee_addresses.retrieve_work_address()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto.employee_addresses.create_work_address()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto.employee_addresses.get_work_addresses()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto.employee_addresses.update()`: \n * `request` **Changed**\n * `response` **Changed**\n * `error.status[404]` **Added**\n* `gusto.employee_addresses.retrieve_home_address()`: \n * `request.x-gusto-api-version` **Changed**\n * `response` **Changed**\n * `error.status[404]` **Added**\n* `gusto.employee_addresses.create()`: \n * `request` **Changed**\n * `response` **Changed**\n * `error.status[404]` **Added**\n* `gusto.employee_addresses.get()`: \n * `request.x-gusto-api-version` **Changed**\n * `response.[]` **Changed**\n * `error.status[404]` **Added**\n* `gusto.employees.get_onboarding_status()`: `error.status[404]` **Added**\n* `gusto.bank_accounts.get()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto.locations.update()`: `response.inactive` **Added**\n* `gusto.locations.retrieve()`: `response.inactive` **Added**\n* `gusto.locations.get()`: `response.[].inactive` **Added**\n* `gusto.locations.create()`: `response.inactive` **Added**\n* `gusto.flows.create()`: `request.options` **Added**\n* `gusto.payrolls.get_pay_stub()`: \n * `response.status[200].content[application/pdf` **Added**\n * `error.status[404]` **Added**\n* `gusto.payrolls.get_pay_stubs()`: \n * `request` **Changed**\n * `response.[].payment_method` **Added**\n* `gusto.federal_tax_details.update()`: `response.ein_verification` **Added**\n* `gusto.bank_accounts.delete-v1-companies-company_id-bank-accounts-bank_account_id()`: **Added**\n* `gusto.companies.finish_onboarding()`: `response.onboarding_steps.[].completed_at` **Added**\n* `gusto.companies.get_onboarding_status()`: `response.onboarding_steps.[].completed_at` **Added**\n* `gusto.reports.get()`: **Deleted** **Breaking** :warning:\n* `gusto.reimbursements.delete-v1-recurring_reimbursements()`: **Added**\n* `gusto.reimbursements.put-v1-recurring_reimbursements()`: **Added**\n* `gusto.reimbursements.get-v1-recurring_reimbursements()`: **Added**\n* `gusto.reimbursements.post-v1-employees-employee_id-recurring_reimbursements()`: **Added**\n* `gusto.reimbursements.get-v1-employees-employee_id-recurring_reimbursements()`: **Added**\n* `gusto.salary_estimates.get-v1-salary_estimates-occupations()`: **Added**\n* `gusto.contractor_payment_groups.get_list()`: \n * `request.x-gusto-api-version` **Changed**\n * `response.[]` **Changed**\n * `error.status[404]` **Added**\n* `gusto.salary_estimates.post-v1-salary_estimates-uuid-accept()`: **Added**\n* `gusto.contractor_payment_groups.get()`: \n * `request.x-gusto-api-version` **Changed**\n * `response` **Changed**\n * `error.status[404]` **Added**\n* `gusto.contractor_payment_groups.delete()`: \n * `request.x-gusto-api-version` **Changed**\n * `error.status[404]` **Added**\n* `gusto.contractor_payment_groups.fund()`: \n * `request.x-gusto-api-version` **Changed**\n * `response` **Changed**\n * `error.status[404]` **Added**\n* `gusto.company_forms.get_all()`: `request.sort_by` **Added**\n* `gusto.salary_estimates.put-v1-salary_estimates-id()`: **Added**\n* `gusto.company_benefits.get_all()`: `response.[].writable_by_application` **Added**\n* `gusto.company_benefits.get_supported()`: `response.writable_by_application` **Added**\n* `gusto.salary_estimates.get-v1-salary_estimates-id()`: **Added**\n* `gusto.salary_estimates.post-v1-employees-employee_id-salary_estimates()`: **Added**\n* `gusto.notifications.get-company-notifications()`: **Added**\n* `gusto.company_benefits.put-v1-company_benefits-company_benefit_id-contribution_exclusions()`: **Added**\n* `gusto.company_benefits.get-v1-company_benefits-company_benefit_id-contribution_exclusions()`: **Added**\n* `gusto.reports.get-reports-request_uuid()`: **Added**\n* `gusto.reports.post-payrolls-payroll_uuid-reports-general_ledger()`: **Added**\n* `gusto.contractor_payment_groups.patch-v1-contractor_payment_groups-id-partner_disbursements()`: **Added**\n* `gusto.contractor_payment_groups.get-v1-contractor_payment_groups-id-partner_disbursements()`: **Added**\n* `gusto.payrolls.patch-v1-companies-company_id-payrolls-id-partner_disbursements()`: **Added**\n* `gusto.payrolls.get-v1-companies-company_id-payrolls-id-partner_disbursements()`: **Added**\n* `gusto.webhooks.get-v1-webhooks-health_check()`: **Added**\n* `gusto.contractors.get-v1-companies-company_id-contractors-payment_details()`: **Added**\n* `gusto.employees.get-v1-companies-company_id-employees-payment_details()`: **Added**\n" diff --git a/gusto_embedded/.speakeasy/gen.yaml b/gusto_embedded/.speakeasy/gen.yaml index 306293dd..c01660ea 100644 --- a/gusto_embedded/.speakeasy/gen.yaml +++ b/gusto_embedded/.speakeasy/gen.yaml @@ -7,6 +7,7 @@ generation: maintainOpenAPIOrder: true usageSnippets: optionalPropertyRendering: withExample + sdkInitStyle: constructor useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true @@ -18,13 +19,25 @@ generation: auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true + hoistGlobalSecurity: true + schemas: + allOfMergeStrategy: shallowMerge + tests: + generateTests: true + generateNewTests: false + skipResponseBodyAssertions: false python: - version: 0.3.0 + version: 0.4.0 additionalDependencies: dev: {} main: {} + allowedRedefinedBuiltins: + - id + - object + asyncMode: both authors: - Speakeasy + baseErrorName: GustoError clientServerStatusCodesAsErrors: true defaultErrorName: APIError description: Python Client SDK Generated by Speakeasy. @@ -45,10 +58,15 @@ python: shared: "" webhooks: "" inputModelSuffix: input + legacyPyright: true maxMethodParams: 999 methodArguments: infer-optional-args + moduleName: "" outputModelSuffix: output + packageManager: poetry packageName: gusto_embedded + pytestFilterWarnings: [] pytestTimeout: 0 responseFormat: flat + sseFlatResponse: false templateVersion: v2 diff --git a/gusto_embedded/README-PYPI.md b/gusto_embedded/README-PYPI.md index 56161145..27f89695 100644 --- a/gusto_embedded/README-PYPI.md +++ b/gusto_embedded/README-PYPI.md @@ -19,22 +19,22 @@ Gusto API: Welcome to Gusto's Embedded Payroll API documentation! ## Table of Contents -* [gusto](https://github.com/Gusto/gusto-python-client/blob/master/#gusto) - * [SDK Installation](https://github.com/Gusto/gusto-python-client/blob/master/#sdk-installation) - * [IDE Support](https://github.com/Gusto/gusto-python-client/blob/master/#ide-support) - * [Example Usage](https://github.com/Gusto/gusto-python-client/blob/master/#example-usage) - * [Authentication](https://github.com/Gusto/gusto-python-client/blob/master/#authentication) - * [Available Resources and Operations](https://github.com/Gusto/gusto-python-client/blob/master/#available-resources-and-operations) - * [File uploads](https://github.com/Gusto/gusto-python-client/blob/master/#file-uploads) - * [Retries](https://github.com/Gusto/gusto-python-client/blob/master/#retries) - * [Error Handling](https://github.com/Gusto/gusto-python-client/blob/master/#error-handling) - * [Server Selection](https://github.com/Gusto/gusto-python-client/blob/master/#server-selection) - * [Custom HTTP Client](https://github.com/Gusto/gusto-python-client/blob/master/#custom-http-client) - * [Resource Management](https://github.com/Gusto/gusto-python-client/blob/master/#resource-management) - * [Debugging](https://github.com/Gusto/gusto-python-client/blob/master/#debugging) -* [Development](https://github.com/Gusto/gusto-python-client/blob/master/#development) - * [Maturity](https://github.com/Gusto/gusto-python-client/blob/master/#maturity) - * [Contributions](https://github.com/Gusto/gusto-python-client/blob/master/#contributions) +* [gusto](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#gusto) + * [SDK Installation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#sdk-installation) + * [IDE Support](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#ide-support) + * [Example Usage](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#example-usage) + * [Authentication](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#authentication) + * [Available Resources and Operations](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#available-resources-and-operations) + * [File uploads](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#file-uploads) + * [Retries](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#retries) + * [Error Handling](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#error-handling) + * [Server Selection](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#server-selection) + * [Custom HTTP Client](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#custom-http-client) + * [Resource Management](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#resource-management) + * [Debugging](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#debugging) +* [Development](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#development) + * [Maturity](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#maturity) + * [Contributions](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#contributions) @@ -46,7 +46,15 @@ Gusto API: Welcome to Gusto's Embedded Payroll API documentation! > > Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated. -The SDK can be installed with either *pip* or *poetry* package managers. +The SDK can be installed with *uv*, *pip*, or *poetry* package managers. + +### uv + +*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities. + +```bash +uv add gusto_embedded +``` ### PIP @@ -227,6 +235,7 @@ This SDK supports the following security scheme globally: To authenticate with the API the `company_access_auth` parameter must be set when initializing the SDK client instance. For example: ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -235,7 +244,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info() + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -265,7 +274,7 @@ with Gusto() as gusto: "trade_name": "Frank’s Ocean", "ein": "123456789", "contractor_only": False, - }) + }, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -279,410 +288,437 @@ with Gusto() as gusto:
Available methods -### [ach_transactions](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/achtransactions/README.md) - -* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/achtransactions/README.md#get_all) - Get all ACH transactions for a company - -### [bank_accounts](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/bankaccounts/README.md) - -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/bankaccounts/README.md#create) - Create a company bank account -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/bankaccounts/README.md#get) - Get all company bank accounts -* [verify](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/bankaccounts/README.md#verify) - Verify a company bank account -* [create_from_plaid_token](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/bankaccounts/README.md#create_from_plaid_token) - Create a bank account from a plaid processor token - -### [companies](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md) - -* [create_partner_managed](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#create_partner_managed) - Create a partner managed company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#get) - Get a company -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#update) - Update a company -* [migrate](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#migrate) - Migrate company to embedded payroll -* [accept_terms_of_service](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#accept_terms_of_service) - Accept terms of service for a company user -* [retrieve_terms_of_service](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#retrieve_terms_of_service) - Retrieve terms of service status for a company user -* [create_admin](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#create_admin) - Create an admin for the company -* [list_admins](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#list_admins) - Get all the admins at a company -* [get_onboarding_status](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#get_onboarding_status) - Get the company's onboarding status -* [finish_onboarding](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#finish_onboarding) - Finish company onboarding -* [get_custom_fields](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companies/README.md#get_custom_fields) - Get the custom fields of a company - -#### [companies.suspensions](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/suspensions/README.md) - -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/suspensions/README.md#get) - Get suspensions for this company -* [suspend](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/suspensions/README.md#suspend) - Suspend a company's account - -### [company_attachment](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companyattachmentsdk/README.md) - -* [get_download_url](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companyattachmentsdk/README.md#get_download_url) - Get a temporary url to download the Company Attachment file - -### [company_attachments](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companyattachments/README.md) - -* [get_details](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companyattachments/README.md#get_details) - Get Company Attachment Details -* [get_list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companyattachments/README.md#get_list) - Get List of Company Attachments -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companyattachments/README.md#create) - Create Company Attachment and Upload File - -### [company_benefits](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md) - -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#create) - Create a company benefit -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#list) - Get benefits for a company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#get) - Get a company benefit -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#update) - Update a company benefit -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#delete) - Delete a company benefit -* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#get_all) - Get all benefits supported by Gusto -* [get_supported](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#get_supported) - Get a supported benefit by ID -* [get_summary](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#get_summary) - Get company benefit summary by company benefit id. -* [get_employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#get_employee_benefits) - Get all employee benefits for a company benefit -* [update_employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#update_employee_benefits) - Bulk update employee benefits for a company benefit -* [get_requirements](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companybenefits/README.md#get_requirements) - Get benefit fields requirements by ID - -### [company_forms](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companyforms/README.md) - -* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companyforms/README.md#get_all) - Get all company forms -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companyforms/README.md#get) - Get a company form -* [get_pdf](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companyforms/README.md#get_pdf) - Get a company form pdf -* [sign](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/companyforms/README.md#sign) - Sign a company form - -### [contractor_documents](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractordocuments/README.md) - -* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractordocuments/README.md#get_all) - Get all contractor documents -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractordocuments/README.md#get) - Get a contractor document -* [get_pdf](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractordocuments/README.md#get_pdf) - Get the contractor document pdf -* [sign](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractordocuments/README.md#sign) - Sign a contractor document - -### [contractor_forms](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorforms/README.md) - -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorforms/README.md#list) - Get all contractor forms -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorforms/README.md#get) - Get a contractor form -* [get_pdf](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorforms/README.md#get_pdf) - Get the contractor form pdf -* [generate1099](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorforms/README.md#generate1099) - Generate a 1099 form [DEMO] - -### [contractor_payment_groups](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentgroups/README.md) - -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentgroups/README.md#create) - Create a contractor payment group -* [get_list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentgroups/README.md#get_list) - Get contractor payment groups for a company -* [preview](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentgroups/README.md#preview) - Preview a contractor payment group -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentgroups/README.md#get) - Fetch a contractor payment group -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentgroups/README.md#delete) - Cancel a contractor payment group -* [fund](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentgroups/README.md#fund) - Fund a contractor payment group [DEMO] - -### [contractor_payment_method](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentmethodsdk/README.md) - -* [get_bank_accounts](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentmethodsdk/README.md#get_bank_accounts) - Get all contractor bank accounts -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentmethodsdk/README.md#get) - Get a contractor's payment method -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentmethodsdk/README.md#update) - Update a contractor's payment method +### [ach_transactions](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/achtransactions/README.md) -### [contractor_payment_methods](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentmethods/README.md) +* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/achtransactions/README.md#get_all) - Get all ACH transactions for a company -* [create_bank_account](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpaymentmethods/README.md#create_bank_account) - Create a contractor bank account +### [bank_accounts](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/bankaccounts/README.md) -### [contractor_payments](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpayments/README.md) +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/bankaccounts/README.md#get) - Get all company bank accounts +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/bankaccounts/README.md#create) - Create a company bank account +* [verify](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/bankaccounts/README.md#verify) - Verify a company bank account +* [create_from_plaid_token](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/bankaccounts/README.md#create_from_plaid_token) - Create a bank account from a plaid processor token +* [delete_v1_companies_company_id_bank_accounts_bank_account_id](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/bankaccounts/README.md#delete_v1_companies_company_id_bank_accounts_bank_account_id) - Delete a company bank account -* [get_receipt](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpayments/README.md#get_receipt) - Get a single contractor payment receipt -* [fund](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpayments/README.md#fund) - Fund a contractor payment [DEMO] -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpayments/README.md#create) - Create a contractor payment -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpayments/README.md#list) - Get contractor payments for a company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpayments/README.md#get) - Get a single contractor payment -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpayments/README.md#delete) - Cancel a contractor payment -* [preview](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractorpayments/README.md#preview) - Preview contractor payment debit date - -### [contractors](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md) - -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#create) - Create a contractor -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#list) - Get contractors of a company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#get) - Get a contractor -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#update) - Update a contractor -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#delete) - Delete a contractor -* [get_onboarding_status](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#get_onboarding_status) - Get the contractor's onboarding status -* [update_onboarding_status](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#update_onboarding_status) - Change the contractor's onboarding status -* [get_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#get_address) - Get a contractor address -* [update_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/contractors/README.md#update_address) - Update a contractor's address - -### [departments](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md) - -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#create) - Create a department -* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#get_all) - Get all departments of a company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#get) - Get a department -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#update) - Update a department -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#delete) - Delete a department -* [add_people](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#add_people) - Add people to a department -* [remove_people](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/departments/README.md#remove_people) - Remove people from a department - -### [earning_types](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/earningtypes/README.md) - -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/earningtypes/README.md#create) - Create a custom earning type -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/earningtypes/README.md#list) - Get all earning types for a company -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/earningtypes/README.md#update) - Update an earning type -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/earningtypes/README.md#delete) - Deactivate an earning type - -### [employee_addresses](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md) - -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#get) - Get an employee's home addresses -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#create) - Create an employee's home address -* [retrieve_home_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#retrieve_home_address) - Get an employee's home address -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#update) - Update an employee's home address -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#delete) - Delete an employee's home address -* [get_work_addresses](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#get_work_addresses) - Get an employee's work addresses -* [create_work_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#create_work_address) - Create an employee work address -* [retrieve_work_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#retrieve_work_address) - Get an employee work address -* [update_work_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#update_work_address) - Update an employee work address -* [delete_work_address](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeaddresses/README.md#delete_work_address) - Delete an employee's work address - -### [employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md) +### [companies](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md) -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#create) - Create an employee benefit -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#get) - Get all benefits for an employee -* [retrieve](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#retrieve) - Get an employee benefit -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#update) - Update an employee benefit -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#delete) - Delete an employee benefit -* [get_ytd_benefit_amounts_from_different_company](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#get_ytd_benefit_amounts_from_different_company) - Get year-to-date benefit amounts from a different company -* [create_ytd_benefit_amounts_from_different_company](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeebenefits/README.md#create_ytd_benefit_amounts_from_different_company) - Create year-to-date benefit amounts from a different company +* [create_partner_managed](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md#create_partner_managed) - Create a partner managed company +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md#get) - Get a company +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md#update) - Update a company +* [migrate](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md#migrate) - Migrate company to embedded payroll +* [accept_terms_of_service](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md#accept_terms_of_service) - Accept terms of service for a company user +* [retrieve_terms_of_service](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md#retrieve_terms_of_service) - Retrieve terms of service status for a company user +* [create_admin](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md#create_admin) - Create an admin for the company +* [list_admins](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md#list_admins) - Get all the admins at a company +* [get_onboarding_status](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md#get_onboarding_status) - Get the company's onboarding status +* [finish_onboarding](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md#finish_onboarding) - Finish company onboarding +* [get_custom_fields](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companies/README.md#get_custom_fields) - Get the custom fields of a company -### [employee_employments](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md) +#### [companies.suspensions](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/suspensions/README.md) -* [create_termination](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#create_termination) - Create an employee termination -* [get_terminations](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#get_terminations) - Get terminations for an employee -* [delete_termination](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#delete_termination) - Delete an employee termination -* [update_termination](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#update_termination) - Update an employee termination -* [create_rehire](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#create_rehire) - Create an employee rehire -* [rehire](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#rehire) - Update an employee rehire -* [get_rehire](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#get_rehire) - Get an employee rehire -* [delete_rehire](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#delete_rehire) - Delete an employee rehire -* [get_history](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeemployments/README.md#get_history) - Get employment history for an employee +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/suspensions/README.md#get) - Get suspensions for this company +* [suspend](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/suspensions/README.md#suspend) - Suspend a company's account + +### [company_attachment](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companyattachmentsdk/README.md) -### [employee_forms](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeforms/README.md) +* [get_download_url](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companyattachmentsdk/README.md#get_download_url) - Get a temporary url to download the Company Attachment file -* [generate_w2](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeforms/README.md#generate_w2) - Generate a W2 form [DEMO] -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeforms/README.md#list) - Get all employee forms -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeforms/README.md#get) - Get an employee form -* [get_pdf](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeforms/README.md#get_pdf) - Get the employee form pdf -* [sign](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeeforms/README.md#sign) - Sign an employee form +### [company_attachments](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companyattachments/README.md) -### [employee_payment_method](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeepaymentmethodsdk/README.md) +* [get_details](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companyattachments/README.md#get_details) - Get Company Attachment Details +* [get_list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companyattachments/README.md#get_list) - Get List of Company Attachments +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companyattachments/README.md#create) - Create Company Attachment and Upload File -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeepaymentmethodsdk/README.md#create) - Create an employee bank account -* [delete_bank_account](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeepaymentmethodsdk/README.md#delete_bank_account) - Delete an employee bank account -* [update_bank_account](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeepaymentmethodsdk/README.md#update_bank_account) - Update an employee bank account -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeepaymentmethodsdk/README.md#get) - Get an employee's payment method -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeepaymentmethodsdk/README.md#update) - Update an employee's payment method +### [company_benefits](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md) -### [employee_payment_methods](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeepaymentmethods/README.md) +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#create) - Create a company benefit +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#list) - Get benefits for a company +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#get) - Get a company benefit +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#update) - Update a company benefit +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#delete) - Delete a company benefit +* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#get_all) - Get all benefits supported by Gusto +* [get_supported](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#get_supported) - Get a supported benefit by ID +* [get_summary](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#get_summary) - Get company benefit summary by company benefit id. +* [get_employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#get_employee_benefits) - Get all employee benefits for a company benefit +* [update_employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#update_employee_benefits) - Bulk update employee benefits for a company benefit +* [get_requirements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#get_requirements) - Get benefit fields requirements by ID +* [get_v1_company_benefits_company_benefit_id_contribution_exclusions](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#get_v1_company_benefits_company_benefit_id_contribution_exclusions) - Get contribution exclusions for a company benefit +* [put_v1_company_benefits_company_benefit_id_contribution_exclusions](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companybenefits/README.md#put_v1_company_benefits_company_benefit_id_contribution_exclusions) - Update contribution exclusions for a company benefit + +### [company_forms](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companyforms/README.md) + +* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companyforms/README.md#get_all) - Get all company forms +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companyforms/README.md#get) - Get a company form +* [get_pdf](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companyforms/README.md#get_pdf) - Get a company form pdf +* [sign](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/companyforms/README.md#sign) - Sign a company form + +### [contractor_documents](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractordocuments/README.md) + +* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractordocuments/README.md#get_all) - Get all contractor documents +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractordocuments/README.md#get) - Get a contractor document +* [get_pdf](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractordocuments/README.md#get_pdf) - Get the contractor document pdf +* [sign](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractordocuments/README.md#sign) - Sign a contractor document + +### [contractor_forms](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorforms/README.md) + +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorforms/README.md#list) - Get all contractor forms +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorforms/README.md#get) - Get a contractor form +* [get_pdf](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorforms/README.md#get_pdf) - Get the contractor form pdf +* [generate1099](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorforms/README.md#generate1099) - Generate a 1099 form [DEMO] + +### [contractor_payment_groups](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md) + +* [get_list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md#get_list) - Get contractor payment groups for a company +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md#create) - Create a contractor payment group +* [preview](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md#preview) - Preview a contractor payment group +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md#get) - Get a contractor payment group +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md#delete) - Cancel a contractor payment group +* [fund](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md#fund) - Fund a contractor payment group [DEMO] +* [get_v1_contractor_payment_groups_id_partner_disbursements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md#get_v1_contractor_payment_groups_id_partner_disbursements) - Get partner disbursements for a contractor payment group +* [patch_v1_contractor_payment_groups_id_partner_disbursements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md#patch_v1_contractor_payment_groups_id_partner_disbursements) - Update partner disbursements for a contractor payment group + +### [contractor_payment_method](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentmethodsdk/README.md) + +* [get_bank_accounts](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentmethodsdk/README.md#get_bank_accounts) - Get all contractor bank accounts +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentmethodsdk/README.md#get) - Get a contractor's payment method +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentmethodsdk/README.md#update) - Update a contractor's payment method + +### [contractor_payment_methods](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentmethods/README.md) + +* [create_bank_account](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpaymentmethods/README.md#create_bank_account) - Create a contractor bank account + +### [contractor_payments](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpayments/README.md) + +* [get_receipt](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpayments/README.md#get_receipt) - Get a single contractor payment receipt +* [fund](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpayments/README.md#fund) - Fund a contractor payment [DEMO] +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpayments/README.md#create) - Create a contractor payment +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpayments/README.md#list) - Get contractor payments for a company +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpayments/README.md#get) - Get a single contractor payment +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpayments/README.md#delete) - Cancel a contractor payment +* [preview](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractorpayments/README.md#preview) - Preview contractor payment debit date + +### [contractors](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractors/README.md) + +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractors/README.md#create) - Create a contractor +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractors/README.md#list) - Get contractors of a company +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractors/README.md#get) - Get a contractor +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractors/README.md#update) - Update a contractor +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractors/README.md#delete) - Delete a contractor +* [get_onboarding_status](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractors/README.md#get_onboarding_status) - Get the contractor's onboarding status +* [update_onboarding_status](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractors/README.md#update_onboarding_status) - Change the contractor's onboarding status +* [get_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractors/README.md#get_address) - Get a contractor address +* [update_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractors/README.md#update_address) - Update a contractor's address +* [get_v1_companies_company_id_contractors_payment_details](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/contractors/README.md#get_v1_companies_company_id_contractors_payment_details) - List contractor payment details + +### [departments](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/departments/README.md) + +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/departments/README.md#create) - Create a department +* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/departments/README.md#get_all) - Get all departments of a company +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/departments/README.md#get) - Get a department +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/departments/README.md#update) - Update a department +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/departments/README.md#delete) - Delete a department +* [add_people](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/departments/README.md#add_people) - Add people to a department +* [remove_people](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/departments/README.md#remove_people) - Remove people from a department + +### [earning_types](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/earningtypes/README.md) + +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/earningtypes/README.md#create) - Create a custom earning type +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/earningtypes/README.md#list) - Get all earning types for a company +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/earningtypes/README.md#update) - Update an earning type +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/earningtypes/README.md#delete) - Deactivate an earning type + +### [employee_addresses](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeaddresses/README.md) + +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeaddresses/README.md#get) - Get an employee's home addresses +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeaddresses/README.md#create) - Create an employee's home address +* [retrieve_home_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeaddresses/README.md#retrieve_home_address) - Get an employee's home address +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeaddresses/README.md#update) - Update an employee's home address +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeaddresses/README.md#delete) - Delete an employee's home address +* [get_work_addresses](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeaddresses/README.md#get_work_addresses) - Get an employee's work addresses +* [create_work_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeaddresses/README.md#create_work_address) - Create an employee work address +* [retrieve_work_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeaddresses/README.md#retrieve_work_address) - Get an employee work address +* [update_work_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeaddresses/README.md#update_work_address) - Update an employee work address +* [delete_work_address](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeaddresses/README.md#delete_work_address) - Delete an employee's work address + +### [employee_benefits](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeebenefits/README.md) + +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeebenefits/README.md#create) - Create an employee benefit +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeebenefits/README.md#get) - Get all benefits for an employee +* [retrieve](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeebenefits/README.md#retrieve) - Get an employee benefit +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeebenefits/README.md#update) - Update an employee benefit +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeebenefits/README.md#delete) - Delete an employee benefit +* [get_ytd_benefit_amounts_from_different_company](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeebenefits/README.md#get_ytd_benefit_amounts_from_different_company) - Get year-to-date benefit amounts from a different company +* [create_ytd_benefit_amounts_from_different_company](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeebenefits/README.md#create_ytd_benefit_amounts_from_different_company) - Create year-to-date benefit amounts from a different company -* [get_bank_accounts](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeepaymentmethods/README.md#get_bank_accounts) - Get all employee bank accounts +### [employee_employments](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeemployments/README.md) -### [employee_tax_setup](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeetaxsetup/README.md) +* [create_termination](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeemployments/README.md#create_termination) - Create an employee termination +* [get_terminations](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeemployments/README.md#get_terminations) - Get terminations for an employee +* [delete_termination](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeemployments/README.md#delete_termination) - Delete an employee termination +* [update_termination](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeemployments/README.md#update_termination) - Update an employee termination +* [create_rehire](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeemployments/README.md#create_rehire) - Create an employee rehire +* [rehire](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeemployments/README.md#rehire) - Update an employee rehire +* [get_rehire](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeemployments/README.md#get_rehire) - Get an employee rehire +* [delete_rehire](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeemployments/README.md#delete_rehire) - Delete an employee rehire +* [get_history](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeemployments/README.md#get_history) - Get employment history for an employee + +### [employee_forms](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeforms/README.md) + +* [generate_w2](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeforms/README.md#generate_w2) - Generate a W2 form [DEMO] +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeforms/README.md#list) - Get all employee forms +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeforms/README.md#get) - Get an employee form +* [get_pdf](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeforms/README.md#get_pdf) - Get the employee form pdf +* [sign](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeeforms/README.md#sign) - Sign an employee form + +### [employee_payment_method](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeepaymentmethodsdk/README.md) -* [get_federal_taxes](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeetaxsetup/README.md#get_federal_taxes) - Get an employee's federal taxes -* [update_federal_taxes](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeetaxsetup/README.md#update_federal_taxes) - Update an employee's federal taxes -* [get_state_taxes](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeetaxsetup/README.md#get_state_taxes) - Get an employee's state taxes -* [update_state_taxes](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employeetaxsetup/README.md#update_state_taxes) - Update an employee's state taxes +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeepaymentmethodsdk/README.md#create) - Create an employee bank account +* [delete_bank_account](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeepaymentmethodsdk/README.md#delete_bank_account) - Delete an employee bank account +* [update_bank_account](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeepaymentmethodsdk/README.md#update_bank_account) - Update an employee bank account +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeepaymentmethodsdk/README.md#get) - Get an employee's payment method +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeepaymentmethodsdk/README.md#update) - Update an employee's payment method -### [employees](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md) +### [employee_payment_methods](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeepaymentmethods/README.md) -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#list) - Get employees of a company -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#create) - Create an employee -* [create_historical](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#create_historical) - Create a historical employee -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#get) - Get an employee -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#update) - Update an employee. -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#delete) - Delete an onboarding employee -* [get_custom_fields](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#get_custom_fields) - Get an employee's custom fields -* [update_onboarding_documents_config](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#update_onboarding_documents_config) - Update an employee's onboarding documents config -* [get_onboarding_status](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#get_onboarding_status) - Get the employee's onboarding status -* [update_onboarding_status](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#update_onboarding_status) - Update the employee's onboarding status -* [get_time_off_activities](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/employees/README.md#get_time_off_activities) - Get employee time off activities +* [get_bank_accounts](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeepaymentmethods/README.md#get_bank_accounts) - Get all employee bank accounts -### [events](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/events/README.md) +### [employee_tax_setup](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeetaxsetup/README.md) -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/events/README.md#get) - Get all events +* [get_federal_taxes](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeetaxsetup/README.md#get_federal_taxes) - Get an employee's federal taxes +* [update_federal_taxes](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeetaxsetup/README.md#update_federal_taxes) - Update an employee's federal taxes +* [get_state_taxes](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeetaxsetup/README.md#get_state_taxes) - Get an employee's state taxes +* [update_state_taxes](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employeetaxsetup/README.md#update_state_taxes) - Update an employee's state taxes -### [external_payrolls](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/externalpayrolls/README.md) +### [employees](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md) -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/externalpayrolls/README.md#create) - Create a new external payroll for a company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/externalpayrolls/README.md#get) - Get external payrolls for a company -* [retrieve](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/externalpayrolls/README.md#retrieve) - Get an external payroll -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/externalpayrolls/README.md#delete) - Delete an external payroll -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/externalpayrolls/README.md#update) - Update an external payroll -* [calculate_taxes](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/externalpayrolls/README.md#calculate_taxes) - Get tax suggestions for an external payroll -* [list_tax_liabilities](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/externalpayrolls/README.md#list_tax_liabilities) - Get tax liabilities -* [update_tax_liabilities](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/externalpayrolls/README.md#update_tax_liabilities) - Update tax liabilities -* [finalize_tax_liabilities](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/externalpayrolls/README.md#finalize_tax_liabilities) - Finalize tax liabilities options and convert into processed payrolls +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#list) - Get employees of a company +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#create) - Create an employee +* [get_v1_companies_company_id_employees_payment_details](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#get_v1_companies_company_id_employees_payment_details) - Get employee payment details for a company +* [create_historical](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#create_historical) - Create a historical employee +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#get) - Get an employee +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#update) - Update an employee. +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#delete) - Delete an onboarding employee +* [get_custom_fields](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#get_custom_fields) - Get an employee's custom fields +* [update_onboarding_documents_config](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#update_onboarding_documents_config) - Update an employee's onboarding documents config +* [get_onboarding_status](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#get_onboarding_status) - Get the employee's onboarding status +* [update_onboarding_status](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#update_onboarding_status) - Update the employee's onboarding status +* [get_time_off_activities](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/employees/README.md#get_time_off_activities) - Get employee time off activities -### [federal_tax_details](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/federaltaxdetailssdk/README.md) +### [events](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/events/README.md) -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/federaltaxdetailssdk/README.md#get) - Get Federal Tax Details -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/federaltaxdetailssdk/README.md#update) - Update Federal Tax Details +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/events/README.md#get) - Get all events -### [flows](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/flows/README.md) +### [external_payrolls](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/externalpayrolls/README.md) -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/flows/README.md#create) - Create a flow +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/externalpayrolls/README.md#create) - Create a new external payroll for a company +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/externalpayrolls/README.md#get) - Get external payrolls for a company +* [retrieve](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/externalpayrolls/README.md#retrieve) - Get an external payroll +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/externalpayrolls/README.md#delete) - Delete an external payroll +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/externalpayrolls/README.md#update) - Update an external payroll +* [calculate_taxes](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/externalpayrolls/README.md#calculate_taxes) - Get tax suggestions for an external payroll +* [list_tax_liabilities](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/externalpayrolls/README.md#list_tax_liabilities) - Get tax liabilities +* [update_tax_liabilities](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/externalpayrolls/README.md#update_tax_liabilities) - Update tax liabilities +* [finalize_tax_liabilities](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/externalpayrolls/README.md#finalize_tax_liabilities) - Finalize tax liabilities options and convert into processed payrolls -### [garnishments](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md) +### [federal_tax_details](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/federaltaxdetailssdk/README.md) -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md#create) - Create a garnishment -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md#list) - Get garnishments for an employee -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md#get) - Get a garnishment -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md#update) - Update a garnishment -* [get_child_support_data](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/garnishments/README.md#get_child_support_data) - Get child support garnishment data +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/federaltaxdetailssdk/README.md#get) - Get Federal Tax Details +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/federaltaxdetailssdk/README.md#update) - Update Federal Tax Details -### [generated_documents](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/generateddocuments/README.md) +### [flows](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/flows/README.md) -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/generateddocuments/README.md#get) - Get a generated document +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/flows/README.md#create) - Create a flow +### [garnishments](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/garnishments/README.md) -### [historical_employees](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/historicalemployees/README.md) +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/garnishments/README.md#create) - Create a garnishment +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/garnishments/README.md#list) - Get garnishments for an employee +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/garnishments/README.md#get) - Get a garnishment +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/garnishments/README.md#update) - Update a garnishment +* [get_child_support_data](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/garnishments/README.md#get_child_support_data) - Get child support garnishment data -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/historicalemployees/README.md#update) - Update a historical employee +### [generated_documents](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/generateddocuments/README.md) -### [holiday_pay_policies](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/holidaypaypolicies/README.md) +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/generateddocuments/README.md#get) - Get a generated document -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/holidaypaypolicies/README.md#get) - Get a company's holiday pay policy -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/holidaypaypolicies/README.md#create) - Create a holiday pay policy for a company -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/holidaypaypolicies/README.md#update) - Update a company's holiday pay policy -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/holidaypaypolicies/README.md#delete) - Delete a company's holiday pay policy -* [add_employees](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/holidaypaypolicies/README.md#add_employees) - Add employees to a company's holiday pay policy -* [remove_employees](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/holidaypaypolicies/README.md#remove_employees) - Remove employees from a company's holiday pay policy -* [preview_paid_holidays](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/holidaypaypolicies/README.md#preview_paid_holidays) - Preview a company's paid holidays +### [historical_employees](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/historicalemployees/README.md) -### [i9_verification](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/i9verification/README.md) +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/historicalemployees/README.md#update) - Update a historical employee -* [get_authorization](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/i9verification/README.md#get_authorization) - Get an employee's I-9 authorization -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/i9verification/README.md#update) - Create or update an employee's I-9 authorization -* [get_document_options](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/i9verification/README.md#get_document_options) - Get an employee's I-9 verification document options -* [get_documents](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/i9verification/README.md#get_documents) - Get an employee's I-9 verification documents -* [create_documents](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/i9verification/README.md#create_documents) - Create an employee's I-9 authorization verification documents -* [delete_document](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/i9verification/README.md#delete_document) - Delete an employee's I-9 verification document -* [employer_sign](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/i9verification/README.md#employer_sign) - Employer sign an employee's Form I-9 +### [holiday_pay_policies](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/holidaypaypolicies/README.md) -### [industry_selection](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/industryselection/README.md) +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/holidaypaypolicies/README.md#get) - Get a company's holiday pay policy +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/holidaypaypolicies/README.md#create) - Create a holiday pay policy for a company +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/holidaypaypolicies/README.md#update) - Update a company's holiday pay policy +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/holidaypaypolicies/README.md#delete) - Delete a company's holiday pay policy +* [add_employees](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/holidaypaypolicies/README.md#add_employees) - Add employees to a company's holiday pay policy +* [remove_employees](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/holidaypaypolicies/README.md#remove_employees) - Remove employees from a company's holiday pay policy +* [preview_paid_holidays](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/holidaypaypolicies/README.md#preview_paid_holidays) - Preview a company's paid holidays -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/industryselection/README.md#get) - Get a company industry selection -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/industryselection/README.md#update) - Update a company industry selection +### [i9_verification](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/i9verification/README.md) -### [information_requests](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/informationrequests/README.md) +* [get_authorization](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/i9verification/README.md#get_authorization) - Get an employee's I-9 authorization +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/i9verification/README.md#update) - Create or update an employee's I-9 authorization +* [get_document_options](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/i9verification/README.md#get_document_options) - Get an employee's I-9 verification document options +* [get_documents](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/i9verification/README.md#get_documents) - Get an employee's I-9 verification documents +* [create_documents](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/i9verification/README.md#create_documents) - Create an employee's I-9 authorization verification documents +* [delete_document](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/i9verification/README.md#delete_document) - Delete an employee's I-9 verification document +* [employer_sign](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/i9verification/README.md#employer_sign) - Employer sign an employee's Form I-9 -* [get_information_requests](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/informationrequests/README.md#get_information_requests) - Get all information requests for a company +### [industry_selection](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/industryselection/README.md) -### [introspection](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/introspection/README.md) +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/industryselection/README.md#get) - Get a company industry selection +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/industryselection/README.md#update) - Update a company industry selection -* [get_info](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/introspection/README.md#get_info) - Get info about the current access token -* [refresh_token](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/introspection/README.md#refresh_token) - Refresh access token +### [information_requests](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/informationrequests/README.md) -### [invoices](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/invoices/README.md) +* [get_information_requests](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/informationrequests/README.md#get_information_requests) - Get all information requests for a company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/invoices/README.md#get) - Retrieve invoicing data for companies +### [introspection](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/introspection/README.md) -### [jobs_and_compensations](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md) +* [get_info](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/introspection/README.md#get_info) - Get info about the current access token +* [refresh_token](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/introspection/README.md#refresh_token) - Refresh access token -* [create_job](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#create_job) - Create a job -* [get_jobs](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#get_jobs) - Get jobs for an employee -* [get_job](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#get_job) - Get a job -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#update) - Update a job -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#delete) - Delete an individual job -* [get_compensations](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#get_compensations) - Get compensations for a job -* [create_compensation](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#create_compensation) - Create a compensation -* [get_compensation](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#get_compensation) - Get a compensation -* [update_compensation](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#update_compensation) - Update a compensation -* [delete_compensation](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/jobsandcompensations/README.md#delete_compensation) - Delete a compensation +### [invoices](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/invoices/README.md) -### [locations](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/locations/README.md) +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/invoices/README.md#get) - Retrieve invoicing data for companies -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/locations/README.md#create) - Create a company location -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/locations/README.md#get) - Get company locations -* [retrieve](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/locations/README.md#retrieve) - Get a location -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/locations/README.md#update) - Update a location -* [get_minimum_wages](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/locations/README.md#get_minimum_wages) - Get minimum wages for a location +### [jobs_and_compensations](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/jobsandcompensations/README.md) -### [notifications](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/notifications/README.md) +* [create_job](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/jobsandcompensations/README.md#create_job) - Create a job +* [get_jobs](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/jobsandcompensations/README.md#get_jobs) - Get jobs for an employee +* [get_job](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/jobsandcompensations/README.md#get_job) - Get a job +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/jobsandcompensations/README.md#update) - Update a job +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/jobsandcompensations/README.md#delete) - Delete an individual job +* [get_compensations](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/jobsandcompensations/README.md#get_compensations) - Get compensations for a job +* [create_compensation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/jobsandcompensations/README.md#create_compensation) - Create a compensation +* [get_compensation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/jobsandcompensations/README.md#get_compensation) - Get a compensation +* [update_compensation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/jobsandcompensations/README.md#update_compensation) - Update a compensation +* [delete_compensation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/jobsandcompensations/README.md#delete_compensation) - Delete a compensation -* [get_details](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/notifications/README.md#get_details) - Get a notification's details +### [locations](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/locations/README.md) -### [pay_schedules](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md) +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/locations/README.md#create) - Create a company location +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/locations/README.md#get) - Get company locations +* [retrieve](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/locations/README.md#retrieve) - Get a location +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/locations/README.md#update) - Update a location +* [get_minimum_wages](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/locations/README.md#get_minimum_wages) - Get minimum wages for a location -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#create) - Create a new pay schedule -* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#get_all) - Get the pay schedules for a company -* [get_preview](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#get_preview) - Preview pay schedule dates -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#get) - Get a pay schedule -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#update) - Update a pay schedule -* [get_pay_periods](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#get_pay_periods) - Get pay periods for a company -* [get_unprocessed_termination_periods](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#get_unprocessed_termination_periods) - Get termination pay periods for a company -* [get_assignments](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#get_assignments) - Get pay schedule assignments for a company -* [preview_assignment](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#preview_assignment) - Preview pay schedule assignments for a company -* [assign](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payschedules/README.md#assign) - Assign pay schedules for a company +### [notifications](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/notifications/README.md) -### [payment_configs](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/paymentconfigssdk/README.md) +* [get_details](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/notifications/README.md#get_details) - Get a notification's details +* [get_company_notifications](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/notifications/README.md#get_company_notifications) - Get notifications for company -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/paymentconfigssdk/README.md#get) - Get a company's payment configs -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/paymentconfigssdk/README.md#update) - Update a company's payment configs +### [pay_schedules](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payschedules/README.md) -### [payrolls](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md) +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payschedules/README.md#create) - Create a new pay schedule +* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payschedules/README.md#get_all) - Get the pay schedules for a company +* [get_preview](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payschedules/README.md#get_preview) - Preview pay schedule dates +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payschedules/README.md#get) - Get a pay schedule +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payschedules/README.md#update) - Update a pay schedule +* [get_pay_periods](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payschedules/README.md#get_pay_periods) - Get pay periods for a company +* [get_unprocessed_termination_periods](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payschedules/README.md#get_unprocessed_termination_periods) - Get termination pay periods for a company +* [get_assignments](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payschedules/README.md#get_assignments) - Get pay schedule assignments for a company +* [preview_assignment](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payschedules/README.md#preview_assignment) - Preview pay schedule assignments for a company +* [assign](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payschedules/README.md#assign) - Assign pay schedules for a company -* [create_off_cycle](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#create_off_cycle) - Create an off-cycle payroll -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#list) - Get all payrolls for a company -* [get_approved_reversals](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#get_approved_reversals) - Get approved payroll reversals -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#get) - Get a single payroll -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#update) - Update a payroll by ID -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#delete) - Delete a payroll -* [prepare](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#prepare) - Prepare a payroll for update -* [get_receipt](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#get_receipt) - Get a single payroll receipt -* [get_blockers](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#get_blockers) - Get all payroll blockers for a company -* [skip](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#skip) - Skip a payroll -* [calculate_gross_up](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#calculate_gross_up) - Calculate gross up -* [calculate](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#calculate) - Calculate a payroll -* [submit](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#submit) - Submit payroll -* [cancel](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#cancel) - Cancel a payroll -* [get_pay_stub](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#get_pay_stub) - Get an employee pay stub (pdf) -* [get_pay_stubs](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#get_pay_stubs) - Get an employee's pay stubs -* [generate_printable_checks](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/payrolls/README.md#generate_printable_checks) - Generate printable payroll checks (pdf) +### [payment_configs](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/paymentconfigssdk/README.md) -### [recovery_cases](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/recoverycases/README.md) - -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/recoverycases/README.md#get) - Get all recovery cases for a company -* [redebit](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/recoverycases/README.md#redebit) - Initiate a redebit for a recovery case +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/paymentconfigssdk/README.md#get) - Get a company's payment configs +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/paymentconfigssdk/README.md#update) - Update a company's payment configs -### [reports](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/reports/README.md) +### [payrolls](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md) -* [create_custom](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/reports/README.md#create_custom) - Create a custom report -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/reports/README.md#get) - Get a report -* [get_template](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/reports/README.md#get_template) - Get a report template +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#list) - Get all payrolls for a company +* [create_off_cycle](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#create_off_cycle) - Create an off-cycle payroll +* [get_approved_reversals](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#get_approved_reversals) - Get approved payroll reversals +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#get) - Get a single payroll +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#update) - Update a payroll by ID +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#delete) - Delete a payroll +* [prepare](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#prepare) - Prepare a payroll for update +* [get_receipt](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#get_receipt) - Get a single payroll receipt +* [get_blockers](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#get_blockers) - Get all payroll blockers for a company +* [skip](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#skip) - Skip a payroll +* [calculate_gross_up](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#calculate_gross_up) - Calculate gross up +* [calculate](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#calculate) - Calculate a payroll +* [submit](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#submit) - Submit payroll +* [cancel](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#cancel) - Cancel a payroll +* [get_pay_stub](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#get_pay_stub) - Get an employee pay stub (pdf) +* [get_pay_stubs](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#get_pay_stubs) - Get an employee's pay stubs +* [generate_printable_checks](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#generate_printable_checks) - Generate printable payroll checks (pdf) +* [get_v1_companies_company_id_payrolls_id_partner_disbursements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#get_v1_companies_company_id_payrolls_id_partner_disbursements) - Get partner disbursements for a payroll +* [patch_v1_companies_company_id_payrolls_id_partner_disbursements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/payrolls/README.md#patch_v1_companies_company_id_payrolls_id_partner_disbursements) - Update partner disbursements for a payroll + +### [recovery_cases](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/recoverycases/README.md) + +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/recoverycases/README.md#get) - Get all recovery cases for a company +* [redebit](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/recoverycases/README.md#redebit) - Initiate a redebit for a recovery case -### [signatories](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/signatories/README.md) +### [reimbursements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/reimbursements/README.md) + +* [get_v1_employees_employee_id_recurring_reimbursements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/reimbursements/README.md#get_v1_employees_employee_id_recurring_reimbursements) - Get recurring reimbursements for an employee +* [post_v1_employees_employee_id_recurring_reimbursements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/reimbursements/README.md#post_v1_employees_employee_id_recurring_reimbursements) - Create a recurring reimbursement +* [get_v1_recurring_reimbursements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/reimbursements/README.md#get_v1_recurring_reimbursements) - Get a recurring reimbursement +* [put_v1_recurring_reimbursements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/reimbursements/README.md#put_v1_recurring_reimbursements) - Update a recurring reimbursement +* [delete_v1_recurring_reimbursements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/reimbursements/README.md#delete_v1_recurring_reimbursements) - Delete a recurring reimbursement -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/signatories/README.md#create) - Create a signatory -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/signatories/README.md#list) - Get all company signatories -* [invite](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/signatories/README.md#invite) - Invite a signatory -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/signatories/README.md#update) - Update a signatory -* [delete](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/signatories/README.md#delete) - Delete a signatory +### [reports](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/reports/README.md) -### [tax_requirements](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/taxrequirements/README.md) - -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/taxrequirements/README.md#get) - Get State Tax Requirements -* [update_state](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/taxrequirements/README.md#update_state) - Update State Tax Requirements -* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/taxrequirements/README.md#get_all) - Get All Tax Requirement States - -### [time_off_policies](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md) - -* [calculate_accruing_time_off_hours](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md#calculate_accruing_time_off_hours) - Calculate accruing time off hours -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md#get) - Get a time off policy -* [update](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md#update) - Update a time off policy -* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md#get_all) - Get all time off policies -* [create](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md#create) - Create a time off policy -* [add_employees](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md#add_employees) - Add employees to a time off policy -* [remove_employees](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md#remove_employees) - Remove employees from a time off policy -* [update_balance](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md#update_balance) - Update employee time off hour balances -* [deactivate](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/timeoffpolicies/README.md#deactivate) - Deactivate a time off policy - -### [webhooks](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md) - -* [create_subscription](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#create_subscription) - Create a webhook subscription -* [list_subscriptions](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#list_subscriptions) - List webhook subscriptions -* [update_subscription](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#update_subscription) - Update a webhook subscription -* [get_subscription](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#get_subscription) - Get a webhook subscription -* [delete_subscription](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#delete_subscription) - Delete a webhook subscription -* [verify](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#verify) - Verify the webhook subscription -* [request_verification_token](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/webhooks/README.md#request_verification_token) - Request the webhook subscription verification_token - -### [wire_in_requests](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/wireinrequests/README.md) - -* [get](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/wireinrequests/README.md#get) - Get a single Wire In Request -* [submit](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/wireinrequests/README.md#submit) - Submit a wire in request -* [list](https://github.com/Gusto/gusto-python-client/blob/master/docs/sdks/wireinrequests/README.md#list) - Get all Wire In Requests for a company +* [create_custom](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/reports/README.md#create_custom) - Create a custom report +* [post_payrolls_payroll_uuid_reports_general_ledger](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/reports/README.md#post_payrolls_payroll_uuid_reports_general_ledger) - Create a general ledger report +* [get_reports_request_uuid](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/reports/README.md#get_reports_request_uuid) - Get a report +* [get_template](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/reports/README.md#get_template) - Get a report template + +### [salary_estimates](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/salaryestimates/README.md) + +* [post_v1_employees_employee_id_salary_estimates](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/salaryestimates/README.md#post_v1_employees_employee_id_salary_estimates) - Create a salary estimate for an employee +* [get_v1_salary_estimates_id](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/salaryestimates/README.md#get_v1_salary_estimates_id) - Get a salary estimate +* [put_v1_salary_estimates_id](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/salaryestimates/README.md#put_v1_salary_estimates_id) - Update a salary estimate +* [post_v1_salary_estimates_uuid_accept](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/salaryestimates/README.md#post_v1_salary_estimates_uuid_accept) - Accept a salary estimate +* [get_v1_salary_estimates_occupations](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/salaryestimates/README.md#get_v1_salary_estimates_occupations) - Search for BLS occupations + +### [signatories](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/signatories/README.md) + +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/signatories/README.md#create) - Create a signatory +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/signatories/README.md#list) - Get all company signatories +* [invite](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/signatories/README.md#invite) - Invite a signatory +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/signatories/README.md#update) - Update a signatory +* [delete](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/signatories/README.md#delete) - Delete a signatory + +### [tax_requirements](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/taxrequirements/README.md) + +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/taxrequirements/README.md#get) - Get State Tax Requirements +* [update_state](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/taxrequirements/README.md#update_state) - Update State Tax Requirements +* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/taxrequirements/README.md#get_all) - Get All Tax Requirement States + +### [time_off_policies](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/timeoffpolicies/README.md) + +* [calculate_accruing_time_off_hours](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/timeoffpolicies/README.md#calculate_accruing_time_off_hours) - Calculate accruing time off hours +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/timeoffpolicies/README.md#get) - Get a time off policy +* [update](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/timeoffpolicies/README.md#update) - Update a time off policy +* [get_all](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/timeoffpolicies/README.md#get_all) - Get all time off policies +* [create](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/timeoffpolicies/README.md#create) - Create a time off policy +* [add_employees](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/timeoffpolicies/README.md#add_employees) - Add employees to a time off policy +* [remove_employees](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/timeoffpolicies/README.md#remove_employees) - Remove employees from a time off policy +* [update_balance](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/timeoffpolicies/README.md#update_balance) - Update employee time off hour balances +* [deactivate](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/timeoffpolicies/README.md#deactivate) - Deactivate a time off policy + +### [webhooks](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/webhooks/README.md) + +* [create_subscription](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/webhooks/README.md#create_subscription) - Create a webhook subscription +* [list_subscriptions](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/webhooks/README.md#list_subscriptions) - List webhook subscriptions +* [update_subscription](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/webhooks/README.md#update_subscription) - Update a webhook subscription +* [get_subscription](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/webhooks/README.md#get_subscription) - Get a webhook subscription +* [delete_subscription](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/webhooks/README.md#delete_subscription) - Delete a webhook subscription +* [verify](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/webhooks/README.md#verify) - Verify the webhook subscription +* [request_verification_token](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/webhooks/README.md#request_verification_token) - Request the webhook subscription verification_token +* [get_v1_webhooks_health_check](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/webhooks/README.md#get_v1_webhooks_health_check) - Get the webhooks health status + +### [wire_in_requests](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/wireinrequests/README.md) + +* [get](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/wireinrequests/README.md#get) - Get a single Wire In Request +* [submit](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/wireinrequests/README.md#submit) - Submit a wire in request +* [list](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/docs/sdks/wireinrequests/README.md#list) - Get all Wire In Requests for a company
@@ -710,7 +746,7 @@ with Gusto( res = gusto.company_attachments.create(company_id="", document={ "file_name": "example.file", "content": open("example.file", "rb"), - }, category=gusto_embedded.PostV1CompaniesAttachmentCategory.GEP_NOTICE) + }, category=gusto_embedded.PostV1CompaniesAttachmentCategory.GEP_NOTICE, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -725,6 +761,7 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call: ```python +import gusto_embedded from gusto_embedded import Gusto from gusto_embedded.utils import BackoffStrategy, RetryConfig import os @@ -734,7 +771,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info(, + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) # Handle response @@ -744,6 +781,7 @@ with Gusto( If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK: ```python +import gusto_embedded from gusto_embedded import Gusto from gusto_embedded.utils import BackoffStrategy, RetryConfig import os @@ -754,7 +792,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info() + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -765,26 +803,18 @@ with Gusto( ## Error Handling -Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception. - -By default, an API error will raise a models.APIError exception, which has the following properties: +[`GustoError`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/./src/gusto_embedded/models/gustoerror.py) is the base class for all HTTP error responses. It has the following properties: -| Property | Type | Description | -|-----------------|------------------|-----------------------| -| `.status_code` | *int* | The HTTP status code | -| `.message` | *str* | The error message | -| `.raw_response` | *httpx.Response* | The raw HTTP response | -| `.body` | *str* | The response content | - -When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_partner_managed_async` method may raise the following exceptions: - -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ----------- | ---------------- | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Property | Type | Description | +| ------------------ | ---------------- | --------------------------------------------------------------------------------------- | +| `err.message` | `str` | Error message | +| `err.status_code` | `int` | HTTP response status code eg `404` | +| `err.headers` | `httpx.Headers` | HTTP response headers | +| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. | +| `err.raw_response` | `httpx.Response` | Raw HTTP response | +| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#error-classes). | ### Example - ```python import gusto_embedded from gusto_embedded import Gusto, models @@ -807,18 +837,51 @@ with Gusto() as gusto: "trade_name": "Frank’s Ocean", "ein": "123456789", "contractor_only": False, - }) + }, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) - except models.UnprocessableEntityErrorObjectError as e: - # handle e.data: models.UnprocessableEntityErrorObjectErrorData - raise(e) - except models.APIError as e: - # handle exception - raise(e) + + except models.GustoError as e: + # The base class for HTTP error responses + print(e.message) + print(e.status_code) + print(e.body) + print(e.headers) + print(e.raw_response) + + # Depending on the method different errors may be thrown + if isinstance(e, models.UnprocessableEntityErrorObject): + print(e.data.errors) # List[gusto_embedded.EntityErrorObject] ``` + +### Error Classes +**Primary error:** +* [`GustoError`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/./src/gusto_embedded/models/gustoerror.py): The base class for HTTP error responses. + +
Less common errors (11) + +
+ +**Network errors:** +* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors. + * [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server. + * [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out. + + +**Inherit from [`GustoError`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/./src/gusto_embedded/models/gustoerror.py)**: +* [`UnprocessableEntityErrorObject`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/./src/gusto_embedded/models/unprocessableentityerrorobject.py): Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. Applicable to 154 of 273 methods.* +* [`NotFoundErrorObject`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/./src/gusto_embedded/models/notfounderrorobject.py): Not Found The requested resource does not exist. Make sure the provided ID/UUID is valid. Status code `404`. Applicable to 4 of 273 methods.* +* [`PayrollBlockersError`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/./src/gusto_embedded/models/payrollblockerserror.py): Payroll Blockers Error For detailed information, see the [Payroll Blockers guide](https://docs.gusto.com/embedded-payroll/docs/payroll-blockers). Status code `422`. Applicable to 4 of 273 methods.* +* [`GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBody`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/./src/gusto_embedded/models/getcompaniescompanyuuidcontractorpaymentspreviewcontractorpaymentsresponsebody.py): Unprocessable Entity (WebDAV). Status code `422`. Applicable to 1 of 273 methods.* +* [`DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/./src/gusto_embedded/models/deletev1companybenefitscompanybenefitidresponsebody.py): Unprocessable Entity. Status code `422`. Applicable to 1 of 273 methods.* +* [`CompanySuspensionCreationErrorsError`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/./src/gusto_embedded/models/companysuspensioncreationerrorserror.py): Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. Status code `422`. Applicable to 1 of 273 methods.* +* [`ResponseValidationError`](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/./src/gusto_embedded/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. + +
+ +\* Check [the method documentation](https://github.com/Gusto/gusto-python-client/blob/master/gusto_embedded/#available-resources-and-operations) to see if the error is applicable. @@ -836,6 +899,7 @@ You can override the default server globally by passing a server name to the `se #### Example ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -845,7 +909,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info() + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -856,6 +920,7 @@ with Gusto( The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example: ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -865,7 +930,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info() + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/README.md b/gusto_embedded/README.md index 3d6d6120..b5d34cef 100644 --- a/gusto_embedded/README.md +++ b/gusto_embedded/README.md @@ -46,7 +46,15 @@ Gusto API: Welcome to Gusto's Embedded Payroll API documentation! > > Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated. -The SDK can be installed with either *pip* or *poetry* package managers. +The SDK can be installed with *uv*, *pip*, or *poetry* package managers. + +### uv + +*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities. + +```bash +uv add gusto_embedded +``` ### PIP @@ -227,6 +235,7 @@ This SDK supports the following security scheme globally: To authenticate with the API the `company_access_auth` parameter must be set when initializing the SDK client instance. For example: ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -235,7 +244,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info() + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -265,7 +274,7 @@ with Gusto() as gusto: "trade_name": "Frank’s Ocean", "ein": "123456789", "contractor_only": False, - }) + }, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -285,10 +294,11 @@ with Gusto() as gusto: ### [bank_accounts](docs/sdks/bankaccounts/README.md) -* [create](docs/sdks/bankaccounts/README.md#create) - Create a company bank account * [get](docs/sdks/bankaccounts/README.md#get) - Get all company bank accounts +* [create](docs/sdks/bankaccounts/README.md#create) - Create a company bank account * [verify](docs/sdks/bankaccounts/README.md#verify) - Verify a company bank account * [create_from_plaid_token](docs/sdks/bankaccounts/README.md#create_from_plaid_token) - Create a bank account from a plaid processor token +* [delete_v1_companies_company_id_bank_accounts_bank_account_id](docs/sdks/bankaccounts/README.md#delete_v1_companies_company_id_bank_accounts_bank_account_id) - Delete a company bank account ### [companies](docs/sdks/companies/README.md) @@ -332,6 +342,8 @@ with Gusto() as gusto: * [get_employee_benefits](docs/sdks/companybenefits/README.md#get_employee_benefits) - Get all employee benefits for a company benefit * [update_employee_benefits](docs/sdks/companybenefits/README.md#update_employee_benefits) - Bulk update employee benefits for a company benefit * [get_requirements](docs/sdks/companybenefits/README.md#get_requirements) - Get benefit fields requirements by ID +* [get_v1_company_benefits_company_benefit_id_contribution_exclusions](docs/sdks/companybenefits/README.md#get_v1_company_benefits_company_benefit_id_contribution_exclusions) - Get contribution exclusions for a company benefit +* [put_v1_company_benefits_company_benefit_id_contribution_exclusions](docs/sdks/companybenefits/README.md#put_v1_company_benefits_company_benefit_id_contribution_exclusions) - Update contribution exclusions for a company benefit ### [company_forms](docs/sdks/companyforms/README.md) @@ -356,12 +368,14 @@ with Gusto() as gusto: ### [contractor_payment_groups](docs/sdks/contractorpaymentgroups/README.md) -* [create](docs/sdks/contractorpaymentgroups/README.md#create) - Create a contractor payment group * [get_list](docs/sdks/contractorpaymentgroups/README.md#get_list) - Get contractor payment groups for a company +* [create](docs/sdks/contractorpaymentgroups/README.md#create) - Create a contractor payment group * [preview](docs/sdks/contractorpaymentgroups/README.md#preview) - Preview a contractor payment group -* [get](docs/sdks/contractorpaymentgroups/README.md#get) - Fetch a contractor payment group +* [get](docs/sdks/contractorpaymentgroups/README.md#get) - Get a contractor payment group * [delete](docs/sdks/contractorpaymentgroups/README.md#delete) - Cancel a contractor payment group * [fund](docs/sdks/contractorpaymentgroups/README.md#fund) - Fund a contractor payment group [DEMO] +* [get_v1_contractor_payment_groups_id_partner_disbursements](docs/sdks/contractorpaymentgroups/README.md#get_v1_contractor_payment_groups_id_partner_disbursements) - Get partner disbursements for a contractor payment group +* [patch_v1_contractor_payment_groups_id_partner_disbursements](docs/sdks/contractorpaymentgroups/README.md#patch_v1_contractor_payment_groups_id_partner_disbursements) - Update partner disbursements for a contractor payment group ### [contractor_payment_method](docs/sdks/contractorpaymentmethodsdk/README.md) @@ -394,6 +408,7 @@ with Gusto() as gusto: * [update_onboarding_status](docs/sdks/contractors/README.md#update_onboarding_status) - Change the contractor's onboarding status * [get_address](docs/sdks/contractors/README.md#get_address) - Get a contractor address * [update_address](docs/sdks/contractors/README.md#update_address) - Update a contractor's address +* [get_v1_companies_company_id_contractors_payment_details](docs/sdks/contractors/README.md#get_v1_companies_company_id_contractors_payment_details) - List contractor payment details ### [departments](docs/sdks/departments/README.md) @@ -478,6 +493,7 @@ with Gusto() as gusto: * [list](docs/sdks/employees/README.md#list) - Get employees of a company * [create](docs/sdks/employees/README.md#create) - Create an employee +* [get_v1_companies_company_id_employees_payment_details](docs/sdks/employees/README.md#get_v1_companies_company_id_employees_payment_details) - Get employee payment details for a company * [create_historical](docs/sdks/employees/README.md#create_historical) - Create a historical employee * [get](docs/sdks/employees/README.md#get) - Get an employee * [update](docs/sdks/employees/README.md#update) - Update an employee. @@ -525,7 +541,6 @@ with Gusto() as gusto: * [get](docs/sdks/generateddocuments/README.md#get) - Get a generated document - ### [historical_employees](docs/sdks/historicalemployees/README.md) * [update](docs/sdks/historicalemployees/README.md#update) - Update a historical employee @@ -592,6 +607,7 @@ with Gusto() as gusto: ### [notifications](docs/sdks/notifications/README.md) * [get_details](docs/sdks/notifications/README.md#get_details) - Get a notification's details +* [get_company_notifications](docs/sdks/notifications/README.md#get_company_notifications) - Get notifications for company ### [pay_schedules](docs/sdks/payschedules/README.md) @@ -613,8 +629,8 @@ with Gusto() as gusto: ### [payrolls](docs/sdks/payrolls/README.md) -* [create_off_cycle](docs/sdks/payrolls/README.md#create_off_cycle) - Create an off-cycle payroll * [list](docs/sdks/payrolls/README.md#list) - Get all payrolls for a company +* [create_off_cycle](docs/sdks/payrolls/README.md#create_off_cycle) - Create an off-cycle payroll * [get_approved_reversals](docs/sdks/payrolls/README.md#get_approved_reversals) - Get approved payroll reversals * [get](docs/sdks/payrolls/README.md#get) - Get a single payroll * [update](docs/sdks/payrolls/README.md#update) - Update a payroll by ID @@ -630,18 +646,37 @@ with Gusto() as gusto: * [get_pay_stub](docs/sdks/payrolls/README.md#get_pay_stub) - Get an employee pay stub (pdf) * [get_pay_stubs](docs/sdks/payrolls/README.md#get_pay_stubs) - Get an employee's pay stubs * [generate_printable_checks](docs/sdks/payrolls/README.md#generate_printable_checks) - Generate printable payroll checks (pdf) +* [get_v1_companies_company_id_payrolls_id_partner_disbursements](docs/sdks/payrolls/README.md#get_v1_companies_company_id_payrolls_id_partner_disbursements) - Get partner disbursements for a payroll +* [patch_v1_companies_company_id_payrolls_id_partner_disbursements](docs/sdks/payrolls/README.md#patch_v1_companies_company_id_payrolls_id_partner_disbursements) - Update partner disbursements for a payroll ### [recovery_cases](docs/sdks/recoverycases/README.md) * [get](docs/sdks/recoverycases/README.md#get) - Get all recovery cases for a company * [redebit](docs/sdks/recoverycases/README.md#redebit) - Initiate a redebit for a recovery case +### [reimbursements](docs/sdks/reimbursements/README.md) + +* [get_v1_employees_employee_id_recurring_reimbursements](docs/sdks/reimbursements/README.md#get_v1_employees_employee_id_recurring_reimbursements) - Get recurring reimbursements for an employee +* [post_v1_employees_employee_id_recurring_reimbursements](docs/sdks/reimbursements/README.md#post_v1_employees_employee_id_recurring_reimbursements) - Create a recurring reimbursement +* [get_v1_recurring_reimbursements](docs/sdks/reimbursements/README.md#get_v1_recurring_reimbursements) - Get a recurring reimbursement +* [put_v1_recurring_reimbursements](docs/sdks/reimbursements/README.md#put_v1_recurring_reimbursements) - Update a recurring reimbursement +* [delete_v1_recurring_reimbursements](docs/sdks/reimbursements/README.md#delete_v1_recurring_reimbursements) - Delete a recurring reimbursement + ### [reports](docs/sdks/reports/README.md) * [create_custom](docs/sdks/reports/README.md#create_custom) - Create a custom report -* [get](docs/sdks/reports/README.md#get) - Get a report +* [post_payrolls_payroll_uuid_reports_general_ledger](docs/sdks/reports/README.md#post_payrolls_payroll_uuid_reports_general_ledger) - Create a general ledger report +* [get_reports_request_uuid](docs/sdks/reports/README.md#get_reports_request_uuid) - Get a report * [get_template](docs/sdks/reports/README.md#get_template) - Get a report template +### [salary_estimates](docs/sdks/salaryestimates/README.md) + +* [post_v1_employees_employee_id_salary_estimates](docs/sdks/salaryestimates/README.md#post_v1_employees_employee_id_salary_estimates) - Create a salary estimate for an employee +* [get_v1_salary_estimates_id](docs/sdks/salaryestimates/README.md#get_v1_salary_estimates_id) - Get a salary estimate +* [put_v1_salary_estimates_id](docs/sdks/salaryestimates/README.md#put_v1_salary_estimates_id) - Update a salary estimate +* [post_v1_salary_estimates_uuid_accept](docs/sdks/salaryestimates/README.md#post_v1_salary_estimates_uuid_accept) - Accept a salary estimate +* [get_v1_salary_estimates_occupations](docs/sdks/salaryestimates/README.md#get_v1_salary_estimates_occupations) - Search for BLS occupations + ### [signatories](docs/sdks/signatories/README.md) * [create](docs/sdks/signatories/README.md#create) - Create a signatory @@ -677,6 +712,7 @@ with Gusto() as gusto: * [delete_subscription](docs/sdks/webhooks/README.md#delete_subscription) - Delete a webhook subscription * [verify](docs/sdks/webhooks/README.md#verify) - Verify the webhook subscription * [request_verification_token](docs/sdks/webhooks/README.md#request_verification_token) - Request the webhook subscription verification_token +* [get_v1_webhooks_health_check](docs/sdks/webhooks/README.md#get_v1_webhooks_health_check) - Get the webhooks health status ### [wire_in_requests](docs/sdks/wireinrequests/README.md) @@ -710,7 +746,7 @@ with Gusto( res = gusto.company_attachments.create(company_id="", document={ "file_name": "example.file", "content": open("example.file", "rb"), - }, category=gusto_embedded.PostV1CompaniesAttachmentCategory.GEP_NOTICE) + }, category=gusto_embedded.PostV1CompaniesAttachmentCategory.GEP_NOTICE, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -725,6 +761,7 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call: ```python +import gusto_embedded from gusto_embedded import Gusto from gusto_embedded.utils import BackoffStrategy, RetryConfig import os @@ -734,7 +771,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info(, + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) # Handle response @@ -744,6 +781,7 @@ with Gusto( If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK: ```python +import gusto_embedded from gusto_embedded import Gusto from gusto_embedded.utils import BackoffStrategy, RetryConfig import os @@ -754,7 +792,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info() + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -765,26 +803,18 @@ with Gusto( ## Error Handling -Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception. - -By default, an API error will raise a models.APIError exception, which has the following properties: - -| Property | Type | Description | -|-----------------|------------------|-----------------------| -| `.status_code` | *int* | The HTTP status code | -| `.message` | *str* | The error message | -| `.raw_response` | *httpx.Response* | The raw HTTP response | -| `.body` | *str* | The response content | +[`GustoError`](./src/gusto_embedded/models/gustoerror.py) is the base class for all HTTP error responses. It has the following properties: -When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_partner_managed_async` method may raise the following exceptions: - -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ----------- | ---------------- | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Property | Type | Description | +| ------------------ | ---------------- | --------------------------------------------------------------------------------------- | +| `err.message` | `str` | Error message | +| `err.status_code` | `int` | HTTP response status code eg `404` | +| `err.headers` | `httpx.Headers` | HTTP response headers | +| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. | +| `err.raw_response` | `httpx.Response` | Raw HTTP response | +| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). | ### Example - ```python import gusto_embedded from gusto_embedded import Gusto, models @@ -807,18 +837,51 @@ with Gusto() as gusto: "trade_name": "Frank’s Ocean", "ein": "123456789", "contractor_only": False, - }) + }, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) - except models.UnprocessableEntityErrorObjectError as e: - # handle e.data: models.UnprocessableEntityErrorObjectErrorData - raise(e) - except models.APIError as e: - # handle exception - raise(e) + + except models.GustoError as e: + # The base class for HTTP error responses + print(e.message) + print(e.status_code) + print(e.body) + print(e.headers) + print(e.raw_response) + + # Depending on the method different errors may be thrown + if isinstance(e, models.UnprocessableEntityErrorObject): + print(e.data.errors) # List[gusto_embedded.EntityErrorObject] ``` + +### Error Classes +**Primary error:** +* [`GustoError`](./src/gusto_embedded/models/gustoerror.py): The base class for HTTP error responses. + +
Less common errors (11) + +
+ +**Network errors:** +* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors. + * [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server. + * [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out. + + +**Inherit from [`GustoError`](./src/gusto_embedded/models/gustoerror.py)**: +* [`UnprocessableEntityErrorObject`](./src/gusto_embedded/models/unprocessableentityerrorobject.py): Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. Applicable to 154 of 273 methods.* +* [`NotFoundErrorObject`](./src/gusto_embedded/models/notfounderrorobject.py): Not Found The requested resource does not exist. Make sure the provided ID/UUID is valid. Status code `404`. Applicable to 4 of 273 methods.* +* [`PayrollBlockersError`](./src/gusto_embedded/models/payrollblockerserror.py): Payroll Blockers Error For detailed information, see the [Payroll Blockers guide](https://docs.gusto.com/embedded-payroll/docs/payroll-blockers). Status code `422`. Applicable to 4 of 273 methods.* +* [`GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBody`](./src/gusto_embedded/models/getcompaniescompanyuuidcontractorpaymentspreviewcontractorpaymentsresponsebody.py): Unprocessable Entity (WebDAV). Status code `422`. Applicable to 1 of 273 methods.* +* [`DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody`](./src/gusto_embedded/models/deletev1companybenefitscompanybenefitidresponsebody.py): Unprocessable Entity. Status code `422`. Applicable to 1 of 273 methods.* +* [`CompanySuspensionCreationErrorsError`](./src/gusto_embedded/models/companysuspensioncreationerrorserror.py): Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. Status code `422`. Applicable to 1 of 273 methods.* +* [`ResponseValidationError`](./src/gusto_embedded/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. + +
+ +\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable. @@ -836,6 +899,7 @@ You can override the default server globally by passing a server name to the `se #### Example ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -845,7 +909,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info() + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -856,6 +920,7 @@ with Gusto( The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example: ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -865,7 +930,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info() + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/USAGE.md b/gusto_embedded/USAGE.md index 14bd9b2f..215cea3a 100644 --- a/gusto_embedded/USAGE.md +++ b/gusto_embedded/USAGE.md @@ -1,6 +1,7 @@ ```python # Synchronous Example +import gusto_embedded from gusto_embedded import Gusto import os @@ -9,7 +10,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info() + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -17,10 +18,12 @@ with Gusto(
-The same SDK client can also be used to make asychronous requests by importing asyncio. +The same SDK client can also be used to make asynchronous requests by importing asyncio. + ```python # Asynchronous Example import asyncio +import gusto_embedded from gusto_embedded import Gusto import os @@ -30,7 +33,7 @@ async def main(): company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = await gusto.introspection.get_info_async() + res = await gusto.introspection.get_info_async(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/models/achtransaction.md b/gusto_embedded/docs/models/achtransaction.md index b8834b61..1dfe9006 100644 --- a/gusto_embedded/docs/models/achtransaction.md +++ b/gusto_embedded/docs/models/achtransaction.md @@ -11,7 +11,7 @@ Representation of an ACH transaction | `company_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the company to which the ACH transaction belongs | | `payment_event_type` | [Optional[models.PaymentEventType]](../models/paymenteventtype.md) | :heavy_minus_sign: | The type of payment event associated with the ACH transaction | | `payment_event_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the payment event associated with the ACH transaction | -| `recipient_type` | [Optional[models.AchTransactionRecipientType]](../models/achtransactionrecipienttype.md) | :heavy_minus_sign: | The type of recipient associated with the ACH transaction | +| `recipient_type` | [OptionalNullable[models.AchTransactionRecipientType]](../models/achtransactionrecipienttype.md) | :heavy_minus_sign: | The type of recipient associated with the ACH transaction | | `recipient_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the recipient associated with the ACH transaction | | `error_code` | *Optional[str]* | :heavy_minus_sign: | The error code associated with the ACH transaction, if any. If there is no error on the ACH transaction, this field will be nil. See [this article](https://engineering.gusto.com/how-ach-works-a-developer-perspective-part-2/) for a complete list of ACH return codes. | | `transaction_type` | *Optional[str]* | :heavy_minus_sign: | The type of transaction associated with the ACH transaction | diff --git a/gusto_embedded/docs/models/admin.md b/gusto_embedded/docs/models/admin.md index cab88339..b2e6e882 100644 --- a/gusto_embedded/docs/models/admin.md +++ b/gusto_embedded/docs/models/admin.md @@ -5,9 +5,9 @@ The representation of an admin user in Gusto. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *str* | :heavy_check_mark: | The unique id of the admin. | -| `email` | *Optional[str]* | :heavy_minus_sign: | The email of the admin for Gusto's system. If the email matches an existing user, this will create an admin account for them. | -| `first_name` | *Optional[str]* | :heavy_minus_sign: | The first name of the admin. | -| `last_name` | *Optional[str]* | :heavy_minus_sign: | The last name of the admin. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `uuid` | *str* | :heavy_check_mark: | The unique id of the admin. | +| `email` | *Optional[str]* | :heavy_minus_sign: | The email of the admin for Gusto's system. | +| `first_name` | *Optional[str]* | :heavy_minus_sign: | The first name of the admin. | +| `last_name` | *Optional[str]* | :heavy_minus_sign: | The last name of the admin. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/aggregation.md b/gusto_embedded/docs/models/aggregation.md new file mode 100644 index 00000000..6eb639eb --- /dev/null +++ b/gusto_embedded/docs/models/aggregation.md @@ -0,0 +1,13 @@ +# Aggregation + +The breakdown level used for the report + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `DEFAULT` | default | +| `JOB` | job | +| `DEPARTMENT` | department | +| `INTEGRATION` | integration | \ No newline at end of file diff --git a/gusto_embedded/docs/models/amounttype.md b/gusto_embedded/docs/models/amounttype.md new file mode 100644 index 00000000..bbb815ff --- /dev/null +++ b/gusto_embedded/docs/models/amounttype.md @@ -0,0 +1,11 @@ +# AmountType + +The amount type of the deduction for the pay period. + + +## Values + +| Name | Value | +| --------- | --------- | +| `FIXED` | fixed | +| `PERCENT` | percent | \ No newline at end of file diff --git a/gusto_embedded/docs/models/answers.md b/gusto_embedded/docs/models/answers.md index 84f48f86..9f8ccb72 100644 --- a/gusto_embedded/docs/models/answers.md +++ b/gusto_embedded/docs/models/answers.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `value` | [Nullable[models.PutV1EmployeesEmployeeIDStateTaxesValue]](../models/putv1employeesemployeeidstatetaxesvalue.md) | :heavy_check_mark: | N/A | -| `valid_from` | *str* | :heavy_check_mark: | N/A | -| `valid_up_to` | *OptionalNullable[Any]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `value` | [Nullable[models.EmployeeStateTaxesRequestValue]](../models/employeestatetaxesrequestvalue.md) | :heavy_check_mark: | N/A | +| `valid_from` | *str* | :heavy_check_mark: | N/A | +| `valid_up_to` | *OptionalNullable[Any]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/benefits.md b/gusto_embedded/docs/models/benefits.md index 124f07ba..e465d54a 100644 --- a/gusto_embedded/docs/models/benefits.md +++ b/gusto_embedded/docs/models/benefits.md @@ -3,9 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `employee_deduction` | *Optional[float]* | :heavy_minus_sign: | N/A | -| `company_contribution` | *Optional[float]* | :heavy_minus_sign: | N/A | -| `imputed` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `benefit_id` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `company_contribution_amount` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `employee_deduction_amount` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/blockertype.md b/gusto_embedded/docs/models/blockertype.md new file mode 100644 index 00000000..32799eef --- /dev/null +++ b/gusto_embedded/docs/models/blockertype.md @@ -0,0 +1,11 @@ +# BlockerType + +The type of blocker + + +## Values + +| Name | Value | +| ------------------------- | ------------------------- | +| `MINIMUM_DAYS` | minimum_days | +| `MINIMUM_FUNDED_PAYMENTS` | minimum_funded_payments | \ No newline at end of file diff --git a/gusto_embedded/docs/models/blsoccupation.md b/gusto_embedded/docs/models/blsoccupation.md new file mode 100644 index 00000000..5ace8a1e --- /dev/null +++ b/gusto_embedded/docs/models/blsoccupation.md @@ -0,0 +1,12 @@ +# BLSOccupation + +A Bureau of Labor Statistics occupation code with its title and description, used for salary estimate calculations. + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `code` | *str* | :heavy_check_mark: | Bureau of Labor Statistics (BLS) occupation code. | 15-1252 | +| `title` | *str* | :heavy_check_mark: | Occupation title. | Software Developers | +| `description` | *Optional[str]* | :heavy_minus_sign: | Occupation description. | Research, design, and develop computer and network software or specialized utility programs. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/companyaddress.md b/gusto_embedded/docs/models/companyaddress.md index 86233715..e5eaf35f 100644 --- a/gusto_embedded/docs/models/companyaddress.md +++ b/gusto_embedded/docs/models/companyaddress.md @@ -13,4 +13,4 @@ The representation of a company's address in Gusto. | `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | `zip` | *Optional[str]* | :heavy_minus_sign: | N/A | | `country` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `active` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | \ No newline at end of file +| `inactive` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/companybankaccountrequest.md b/gusto_embedded/docs/models/companybankaccountrequest.md new file mode 100644 index 00000000..3865b928 --- /dev/null +++ b/gusto_embedded/docs/models/companybankaccountrequest.md @@ -0,0 +1,10 @@ +# CompanyBankAccountRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `routing_number` | *str* | :heavy_check_mark: | The bank routing number | +| `account_number` | *str* | :heavy_check_mark: | The bank account number | +| `account_type` | [models.CompanyBankAccountRequestAccountType](../models/companybankaccountrequestaccounttype.md) | :heavy_check_mark: | The bank account type | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsaccounttype.md b/gusto_embedded/docs/models/companybankaccountrequestaccounttype.md similarity index 74% rename from gusto_embedded/docs/models/postv1companiescompanyidbankaccountsaccounttype.md rename to gusto_embedded/docs/models/companybankaccountrequestaccounttype.md index 91114c6c..b0badaea 100644 --- a/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsaccounttype.md +++ b/gusto_embedded/docs/models/companybankaccountrequestaccounttype.md @@ -1,4 +1,4 @@ -# PostV1CompaniesCompanyIDBankAccountsAccountType +# CompanyBankAccountRequestAccountType The bank account type diff --git a/gusto_embedded/docs/models/companybenefitwithemployeebenefitsvaluetiers.md b/gusto_embedded/docs/models/companybenefitwithemployeebenefitsvaluetiers.md index 4d245e5e..9a746ef4 100644 --- a/gusto_embedded/docs/models/companybenefitwithemployeebenefitsvaluetiers.md +++ b/gusto_embedded/docs/models/companybenefitwithemployeebenefitsvaluetiers.md @@ -5,8 +5,8 @@ A single tier of a tiered matching scheme. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | -| `threshold` | *Optional[str]* | :heavy_minus_sign: | The percentage threshold at which this tier ends (inclusive).

For example, a value of "5" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll.

If this is the first tier, a value of "5" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. | -| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | +| `threshold` | *Optional[str]* | :heavy_minus_sign: | Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to.

Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards.

For example:

If the first tier has a threshold of "3", and `rate` of "100", the company will match 100% of employee contributions from 0% up to and including 3% of payroll.

If the next tier has a threshold of "5" and a rate of "50", the company will match 50% of contributions from above 3% up to and including 5% of payroll. | +| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/companycustomfield.md b/gusto_embedded/docs/models/companycustomfield.md index 1a670af3..905db155 100644 --- a/gusto_embedded/docs/models/companycustomfield.md +++ b/gusto_embedded/docs/models/companycustomfield.md @@ -10,5 +10,5 @@ A custom field on a company | `uuid` | *str* | :heavy_check_mark: | UUID of the company custom field | | `name` | *str* | :heavy_check_mark: | Name of the company custom field | | `type` | [models.CustomFieldType](../models/customfieldtype.md) | :heavy_check_mark: | Input type for the custom field. | -| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the company custom field | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the company custom field | | `selection_options` | List[*str*] | :heavy_minus_sign: | An array of options for fields of type radio. Otherwise, null. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/companyformssortby.md b/gusto_embedded/docs/models/companyformssortby.md new file mode 100644 index 00000000..8bd86881 --- /dev/null +++ b/gusto_embedded/docs/models/companyformssortby.md @@ -0,0 +1,12 @@ +# CompanyFormsSortBy + + +## Values + +| Name | Value | +| ----------------------- | ----------------------- | +| `NAME` | name | +| `YEAR` | year | +| `QUARTER` | quarter | +| `DRAFT` | draft | +| `DOCUMENT_CONTENT_TYPE` | document_content_type | \ No newline at end of file diff --git a/gusto_embedded/docs/models/companysuspension.md b/gusto_embedded/docs/models/companysuspension.md index 5d71ddc3..3255b0df 100644 --- a/gusto_embedded/docs/models/companysuspension.md +++ b/gusto_embedded/docs/models/companysuspension.md @@ -10,10 +10,10 @@ Record representing the suspension of a company's Gusto account. | `uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for this suspension. | | `company_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the company which is suspended. | | `effective_date` | *Optional[str]* | :heavy_minus_sign: | Date that the suspension took effect. | -| `leaving_for` | *Optional[str]* | :heavy_minus_sign: | Which competitor the company is joining instead. Only required if `reason` is `'switching_provider'`. | +| `leaving_for` | *OptionalNullable[str]* | :heavy_minus_sign: | Which competitor the company is joining instead. Only required if `reason` is `'switching_provider'`. | | `reason` | *Optional[str]* | :heavy_minus_sign: | Explanation for why the company's account was suspended. | | `reconcile_tax_method` | [Optional[models.ReconcileTaxMethod]](../models/reconciletaxmethod.md) | :heavy_minus_sign: | How Gusto will handle taxes already collected. | -| `file_quarterly_forms` | *Optional[bool]* | :heavy_minus_sign: | Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company
is suspending their account, and how taxes are being reconciled.
| -| `file_yearly_forms` | *Optional[bool]* | :heavy_minus_sign: | Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company
is suspending their account, and how taxes are being reconciled.
| -| `comments` | *Optional[str]* | :heavy_minus_sign: | User-supplied comments describing why then are suspending their account. | -| `tax_refunds` | [Optional[models.TaxRefunds]](../models/taxrefunds.md) | :heavy_minus_sign: | Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid
by Gusto, depending on the value in `reconcile_tax_method`.
| \ No newline at end of file +| `file_quarterly_forms` | *Optional[bool]* | :heavy_minus_sign: | Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled.
| +| `file_yearly_forms` | *Optional[bool]* | :heavy_minus_sign: | Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled.
| +| `comments` | *OptionalNullable[str]* | :heavy_minus_sign: | User-supplied comments describing why they are suspending their account. | +| `tax_refunds` | List[[models.TaxRefunds](../models/taxrefunds.md)] | :heavy_minus_sign: | Describes the taxes which are refundable to the company for this suspension. These may be refunded or paid by Gusto depending on the value in `reconcile_tax_method`.
| \ No newline at end of file diff --git a/gusto_embedded/docs/models/companysuspensioncreationerrorserror.md b/gusto_embedded/docs/models/companysuspensioncreationerrorserror.md new file mode 100644 index 00000000..333d5cb7 --- /dev/null +++ b/gusto_embedded/docs/models/companysuspensioncreationerrorserror.md @@ -0,0 +1,13 @@ +# CompanySuspensionCreationErrorsError + +Unprocessable Entity + +This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `errors` | List[[models.EntityErrorObject](../models/entityerrorobject.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractor.md b/gusto_embedded/docs/models/contractor.md index b72c1416..831bd1f7 100644 --- a/gusto_embedded/docs/models/contractor.md +++ b/gusto_embedded/docs/models/contractor.md @@ -23,10 +23,12 @@ The representation of a contractor (individual or business) in Gusto. | `start_date` | *Optional[str]* | :heavy_minus_sign: | The contractor's start date. | | | `address` | [OptionalNullable[models.Address]](../models/address.md) | :heavy_minus_sign: | The contractor’s home address. | | | `hourly_rate` | *Optional[str]* | :heavy_minus_sign: | The contractor’s hourly rate. This attribute is required if the wage_type is “Hourly”. | 50.0 | -| `file_new_hire_report` | *Optional[bool]* | :heavy_minus_sign: | The boolean flag indicating whether Gusto will file a new hire report for the contractor | | +| `file_new_hire_report` | *OptionalNullable[bool]* | :heavy_minus_sign: | The boolean flag indicating whether Gusto will file a new hire report for the contractor | | | `work_state` | *OptionalNullable[str]* | :heavy_minus_sign: | State where the contractor will be conducting the majority of their work for the company.
This value is used when generating the new hire report. | | | `onboarded` | *Optional[bool]* | :heavy_minus_sign: | The updated onboarding status for the contractor | | | `onboarding_status` | [Optional[models.ContractorOnboardingStatus1]](../models/contractoronboardingstatus1.md) | :heavy_minus_sign: | One of the "onboarding_status" enum values. | | | `payment_method` | [OptionalNullable[models.ContractorPaymentMethod1]](../models/contractorpaymentmethod1.md) | :heavy_minus_sign: | The contractor's payment method. | | | `has_ssn` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the contractor has an SSN in Gusto. | | +| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | The contractor's department in the company. | | +| `dismissal_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The contractor's dismissal date. | | | `department_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the department the contractor is under | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractoraddress.md b/gusto_embedded/docs/models/contractoraddress.md index 5539613e..2a00ad91 100644 --- a/gusto_embedded/docs/models/contractoraddress.md +++ b/gusto_embedded/docs/models/contractoraddress.md @@ -6,11 +6,11 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `street_1` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `country` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `city` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `state` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `zip` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `active` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | | `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the contractor | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractoronboardingstatusonboardingstatus.md b/gusto_embedded/docs/models/contractoronboardingstatusonboardingstatus.md index 82113ab2..4de1fdad 100644 --- a/gusto_embedded/docs/models/contractoronboardingstatusonboardingstatus.md +++ b/gusto_embedded/docs/models/contractoronboardingstatusonboardingstatus.md @@ -9,4 +9,8 @@ One of the "onboarding_status" enum values. | ----------------------------- | ----------------------------- | | `ONBOARDING_COMPLETED` | onboarding_completed | | `ADMIN_ONBOARDING_REVIEW` | admin_onboarding_review | -| `ADMIN_ONBOARDING_INCOMPLETE` | admin_onboarding_incomplete | \ No newline at end of file +| `ADMIN_ONBOARDING_INCOMPLETE` | admin_onboarding_incomplete | +| `SELF_ONBOARDING_NOT_INVITED` | self_onboarding_not_invited | +| `SELF_ONBOARDING_INVITED` | self_onboarding_invited | +| `SELF_ONBOARDING_STARTED` | self_onboarding_started | +| `SELF_ONBOARDING_REVIEW` | self_onboarding_review | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentdetailslist.md b/gusto_embedded/docs/models/contractorpaymentdetailslist.md new file mode 100644 index 00000000..0784d22b --- /dev/null +++ b/gusto_embedded/docs/models/contractorpaymentdetailslist.md @@ -0,0 +1,13 @@ +# ContractorPaymentDetailsList + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `payment_method` | [Optional[models.ContractorPaymentDetailsListPaymentMethod]](../models/contractorpaymentdetailslistpaymentmethod.md) | :heavy_minus_sign: | N/A | +| `first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `last_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `split_by` | [OptionalNullable[models.ContractorPaymentDetailsListSplitBy]](../models/contractorpaymentdetailslistsplitby.md) | :heavy_minus_sign: | Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. | +| `splits` | List[[models.Splits](../models/splits.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentdetailslistpaymentmethod.md b/gusto_embedded/docs/models/contractorpaymentdetailslistpaymentmethod.md new file mode 100644 index 00000000..958d1027 --- /dev/null +++ b/gusto_embedded/docs/models/contractorpaymentdetailslistpaymentmethod.md @@ -0,0 +1,9 @@ +# ContractorPaymentDetailsListPaymentMethod + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentdetailslistsplitby.md b/gusto_embedded/docs/models/contractorpaymentdetailslistsplitby.md new file mode 100644 index 00000000..15d7e014 --- /dev/null +++ b/gusto_embedded/docs/models/contractorpaymentdetailslistsplitby.md @@ -0,0 +1,11 @@ +# ContractorPaymentDetailsListSplitBy + +Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `AMOUNT` | Amount | +| `PERCENTAGE` | Percentage | \ No newline at end of file diff --git a/gusto_app_int/docs/models/contractorpaymentforgroup.md b/gusto_embedded/docs/models/contractorpaymentforgrouppreview.md similarity index 96% rename from gusto_app_int/docs/models/contractorpaymentforgroup.md rename to gusto_embedded/docs/models/contractorpaymentforgrouppreview.md index cc299c07..77183a2f 100644 --- a/gusto_app_int/docs/models/contractorpaymentforgroup.md +++ b/gusto_embedded/docs/models/contractorpaymentforgrouppreview.md @@ -1,21 +1,21 @@ -# ContractorPaymentForGroup +# ContractorPaymentForGroupPreview -The representation of a single contractor payment. +Preview representation of a single contractor payment with nullable uuid. ## Fields | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *Optional[str]* | :heavy_minus_sign: | The unique identifier of the contractor payment in Gusto. | +| `uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique identifier of the contractor payment in Gusto. | | `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the contractor. | | `bonus` | *Optional[str]* | :heavy_minus_sign: | The bonus amount in the payment. | | `hours` | *Optional[str]* | :heavy_minus_sign: | The number of hours worked for the payment. | -| `payment_method` | [Optional[models.ContractorPaymentForGroupPaymentMethod]](../models/contractorpaymentforgrouppaymentmethod.md) | :heavy_minus_sign: | The payment method. | +| `payment_method` | [Optional[models.ContractorPaymentForGroupPreviewPaymentMethod]](../models/contractorpaymentforgrouppreviewpaymentmethod.md) | :heavy_minus_sign: | The payment method. | | `reimbursement` | *Optional[str]* | :heavy_minus_sign: | The reimbursement amount in the payment. | -| `status` | [Optional[models.ContractorPaymentForGroupStatus]](../models/contractorpaymentforgroupstatus.md) | :heavy_minus_sign: | The status of the contractor payment. Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`. | +| `status` | [Optional[models.ContractorPaymentForGroupPreviewStatus]](../models/contractorpaymentforgrouppreviewstatus.md) | :heavy_minus_sign: | The status of the contractor payment. Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`. | | `hourly_rate` | *Optional[str]* | :heavy_minus_sign: | The rate per hour worked for the payment. | | `may_cancel` | *Optional[bool]* | :heavy_minus_sign: | Determine if the contractor payment can be cancelled. | | `wage` | *Optional[str]* | :heavy_minus_sign: | The fixed wage of the payment, regardless of hours worked. | -| `wage_type` | [Optional[models.ContractorPaymentForGroupWageType]](../models/contractorpaymentforgroupwagetype.md) | :heavy_minus_sign: | The wage type for the payment. | +| `wage_type` | [Optional[models.ContractorPaymentForGroupPreviewWageType]](../models/contractorpaymentforgrouppreviewwagetype.md) | :heavy_minus_sign: | The wage type for the payment. | | `wage_total` | *Optional[str]* | :heavy_minus_sign: | (hours * hourly_rate) + wage + bonus | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md b/gusto_embedded/docs/models/contractorpaymentforgrouppreviewpaymentmethod.md similarity index 55% rename from gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md rename to gusto_embedded/docs/models/contractorpaymentforgrouppreviewpaymentmethod.md index 6a11793e..5ea4eae3 100644 --- a/gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md +++ b/gusto_embedded/docs/models/contractorpaymentforgrouppreviewpaymentmethod.md @@ -1,4 +1,6 @@ -# PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod +# ContractorPaymentForGroupPreviewPaymentMethod + +The payment method. ## Values @@ -7,4 +9,5 @@ | -------------------- | -------------------- | | `DIRECT_DEPOSIT` | Direct Deposit | | `CHECK` | Check | -| `HISTORICAL_PAYMENT` | Historical Payment | \ No newline at end of file +| `HISTORICAL_PAYMENT` | Historical Payment | +| `CORRECTION_PAYMENT` | Correction Payment | \ No newline at end of file diff --git a/gusto_app_int/docs/models/contractorpaymentforgroupstatus.md b/gusto_embedded/docs/models/contractorpaymentforgrouppreviewstatus.md similarity index 90% rename from gusto_app_int/docs/models/contractorpaymentforgroupstatus.md rename to gusto_embedded/docs/models/contractorpaymentforgrouppreviewstatus.md index 65e062d5..fe234fa1 100644 --- a/gusto_app_int/docs/models/contractorpaymentforgroupstatus.md +++ b/gusto_embedded/docs/models/contractorpaymentforgrouppreviewstatus.md @@ -1,4 +1,4 @@ -# ContractorPaymentForGroupStatus +# ContractorPaymentForGroupPreviewStatus The status of the contractor payment. Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`. diff --git a/gusto_app_int/docs/models/contractorpaymentforgroupwagetype.md b/gusto_embedded/docs/models/contractorpaymentforgrouppreviewwagetype.md similarity index 76% rename from gusto_app_int/docs/models/contractorpaymentforgroupwagetype.md rename to gusto_embedded/docs/models/contractorpaymentforgrouppreviewwagetype.md index dac0e400..aba10ce0 100644 --- a/gusto_app_int/docs/models/contractorpaymentforgroupwagetype.md +++ b/gusto_embedded/docs/models/contractorpaymentforgrouppreviewwagetype.md @@ -1,4 +1,4 @@ -# ContractorPaymentForGroupWageType +# ContractorPaymentForGroupPreviewWageType The wage type for the payment. diff --git a/gusto_embedded/docs/models/contractorpaymentgroup.md b/gusto_embedded/docs/models/contractorpaymentgroup.md index eff2a7b2..6e19af1a 100644 --- a/gusto_embedded/docs/models/contractorpaymentgroup.md +++ b/gusto_embedded/docs/models/contractorpaymentgroup.md @@ -13,5 +13,8 @@ The full contractor payment group, including associated contractor payments. | `debit_date` | *Optional[str]* | :heavy_minus_sign: | The debit date of the contractor payment group. | | `status` | [Optional[models.ContractorPaymentGroupStatus]](../models/contractorpaymentgroupstatus.md) | :heavy_minus_sign: | The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. | | `creation_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token. | +| `partner_owned_disbursement` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the disbursement is partner owned. | +| `submission_blockers` | List[List[[models.PayrollSubmissionBlockersType](../models/payrollsubmissionblockerstype.md)]] | :heavy_minus_sign: | List of submission blockers for the contractor payment group. | +| `credit_blockers` | List[List[[models.PayrollCreditBlockersType](../models/payrollcreditblockerstype.md)]] | :heavy_minus_sign: | List of credit blockers for the contractor payment group. | | `totals` | [Optional[models.ContractorPaymentGroupTotals]](../models/contractorpaymentgrouptotals.md) | :heavy_minus_sign: | N/A | | `contractor_payments` | List[[models.ContractorPaymentForGroup](../models/contractorpaymentforgroup.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentgroupminimaltotals.md b/gusto_embedded/docs/models/contractorpaymentgroupminimaltotals.md deleted file mode 100644 index bcad87ba..00000000 --- a/gusto_embedded/docs/models/contractorpaymentgroupminimaltotals.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContractorPaymentGroupMinimalTotals - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `amount` | *Optional[str]* | :heavy_minus_sign: | The total amount for the group of contractor payments. | -| `debit_amount` | *Optional[str]* | :heavy_minus_sign: | The total debit amount for the group of contractor payments. Sum of wage & reimbursement amount. | -| `wage_amount` | *Optional[str]* | :heavy_minus_sign: | The total wage amount for the group of contractor payments. | -| `reimbursement_amount` | *Optional[str]* | :heavy_minus_sign: | The total reimbursement amount for the group of contractor payments. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentgrouppartnerdisbursements.md b/gusto_embedded/docs/models/contractorpaymentgrouppartnerdisbursements.md new file mode 100644 index 00000000..eb415908 --- /dev/null +++ b/gusto_embedded/docs/models/contractorpaymentgrouppartnerdisbursements.md @@ -0,0 +1,11 @@ +# ContractorPaymentGroupPartnerDisbursements + +Partner disbursements for a contractor payment group + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `contractor_payment_group_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the contractor payment group | +| `disbursements` | List[[models.Disbursements](../models/disbursements.md)] | :heavy_minus_sign: | List of disbursements for the contractor payment group | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentgrouppartnerdisbursementspaymentmethod.md b/gusto_embedded/docs/models/contractorpaymentgrouppartnerdisbursementspaymentmethod.md new file mode 100644 index 00000000..1e5d6771 --- /dev/null +++ b/gusto_embedded/docs/models/contractorpaymentgrouppartnerdisbursementspaymentmethod.md @@ -0,0 +1,11 @@ +# ContractorPaymentGroupPartnerDisbursementsPaymentMethod + +The payment method for the disbursement + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentgrouppartnerdisbursementspaymentstatus.md b/gusto_embedded/docs/models/contractorpaymentgrouppartnerdisbursementspaymentstatus.md new file mode 100644 index 00000000..0d958e87 --- /dev/null +++ b/gusto_embedded/docs/models/contractorpaymentgrouppartnerdisbursementspaymentstatus.md @@ -0,0 +1,13 @@ +# ContractorPaymentGroupPartnerDisbursementsPaymentStatus + +The status of the payment + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `PENDING` | Pending | +| `PAID` | Paid | +| `NOT_PARTNER_MANAGED` | Not partner managed | +| `CONVERTED_TO_CHECK` | Converted to check | \ No newline at end of file diff --git a/gusto_app_int/docs/models/contractorpaymentgroupminimal.md b/gusto_embedded/docs/models/contractorpaymentgrouppreview.md similarity index 66% rename from gusto_app_int/docs/models/contractorpaymentgroupminimal.md rename to gusto_embedded/docs/models/contractorpaymentgrouppreview.md index dc29723b..4071a564 100644 --- a/gusto_app_int/docs/models/contractorpaymentgroupminimal.md +++ b/gusto_embedded/docs/models/contractorpaymentgrouppreview.md @@ -1,16 +1,20 @@ -# ContractorPaymentGroupMinimal +# ContractorPaymentGroupPreview -The summary of a contractor payment group. +Preview of a contractor payment group ## Fields | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *Optional[str]* | :heavy_minus_sign: | The unique identifier of the contractor payment group. | +| `uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique identifier of the contractor payment group. | | `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company. | | `check_date` | *Optional[str]* | :heavy_minus_sign: | The check date of the contractor payment group. | | `debit_date` | *Optional[str]* | :heavy_minus_sign: | The debit date of the contractor payment group. | -| `status` | [Optional[models.ContractorPaymentGroupMinimalStatus]](../models/contractorpaymentgroupminimalstatus.md) | :heavy_minus_sign: | The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. | +| `status` | [Optional[models.ContractorPaymentGroupPreviewStatus]](../models/contractorpaymentgrouppreviewstatus.md) | :heavy_minus_sign: | The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. | | `creation_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token. | -| `totals` | [Optional[models.Totals]](../models/totals.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `partner_owned_disbursement` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the disbursement is partner owned. | +| `submission_blockers` | List[List[[models.PayrollSubmissionBlockersType](../models/payrollsubmissionblockerstype.md)]] | :heavy_minus_sign: | List of submission blockers for the contractor payment group. | +| `credit_blockers` | List[List[[models.PayrollCreditBlockersType](../models/payrollcreditblockerstype.md)]] | :heavy_minus_sign: | List of credit blockers for the contractor payment group. | +| `totals` | [Optional[models.ContractorPaymentGroupPreviewTotals]](../models/contractorpaymentgrouppreviewtotals.md) | :heavy_minus_sign: | N/A | +| `contractor_payments` | List[[models.ContractorPaymentForGroupPreview](../models/contractorpaymentforgrouppreview.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_app_int/docs/models/contractorpaymentgroupminimalstatus.md b/gusto_embedded/docs/models/contractorpaymentgrouppreviewstatus.md similarity index 91% rename from gusto_app_int/docs/models/contractorpaymentgroupminimalstatus.md rename to gusto_embedded/docs/models/contractorpaymentgrouppreviewstatus.md index c71415d9..47adce56 100644 --- a/gusto_app_int/docs/models/contractorpaymentgroupminimalstatus.md +++ b/gusto_embedded/docs/models/contractorpaymentgrouppreviewstatus.md @@ -1,4 +1,4 @@ -# ContractorPaymentGroupMinimalStatus +# ContractorPaymentGroupPreviewStatus The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. diff --git a/gusto_app_int/docs/models/contractorpaymentgrouptotals.md b/gusto_embedded/docs/models/contractorpaymentgrouppreviewtotals.md similarity index 84% rename from gusto_app_int/docs/models/contractorpaymentgrouptotals.md rename to gusto_embedded/docs/models/contractorpaymentgrouppreviewtotals.md index 0aa7c49d..6eabdc49 100644 --- a/gusto_app_int/docs/models/contractorpaymentgrouptotals.md +++ b/gusto_embedded/docs/models/contractorpaymentgrouppreviewtotals.md @@ -1,4 +1,4 @@ -# ContractorPaymentGroupTotals +# ContractorPaymentGroupPreviewTotals ## Fields @@ -8,4 +8,5 @@ | `amount` | *Optional[str]* | :heavy_minus_sign: | The total amount for the group of contractor payments. | | `debit_amount` | *Optional[str]* | :heavy_minus_sign: | The total debit amount for the group of contractor payments. Sum of wage & reimbursement amount. | | `wage_amount` | *Optional[str]* | :heavy_minus_sign: | The total wage amount for the group of contractor payments. | -| `reimbursement_amount` | *Optional[str]* | :heavy_minus_sign: | The total reimbursement amount for the group of contractor payments. | \ No newline at end of file +| `reimbursement_amount` | *Optional[str]* | :heavy_minus_sign: | The total reimbursement amount for the group of contractor payments. | +| `check_amount` | *Optional[str]* | :heavy_minus_sign: | The total check amount for the group of contractor payments. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentgrouptotals.md b/gusto_embedded/docs/models/contractorpaymentgrouptotals.md index 0aa7c49d..eb9f7d89 100644 --- a/gusto_embedded/docs/models/contractorpaymentgrouptotals.md +++ b/gusto_embedded/docs/models/contractorpaymentgrouptotals.md @@ -8,4 +8,5 @@ | `amount` | *Optional[str]* | :heavy_minus_sign: | The total amount for the group of contractor payments. | | `debit_amount` | *Optional[str]* | :heavy_minus_sign: | The total debit amount for the group of contractor payments. Sum of wage & reimbursement amount. | | `wage_amount` | *Optional[str]* | :heavy_minus_sign: | The total wage amount for the group of contractor payments. | -| `reimbursement_amount` | *Optional[str]* | :heavy_minus_sign: | The total reimbursement amount for the group of contractor payments. | \ No newline at end of file +| `reimbursement_amount` | *Optional[str]* | :heavy_minus_sign: | The total reimbursement amount for the group of contractor payments. | +| `check_amount` | *Optional[str]* | :heavy_minus_sign: | The total check amount for the group of contractor payments. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/contractorpaymentgroup.md b/gusto_embedded/docs/models/contractorpaymentgroupwithblockers.md similarity index 79% rename from gusto_app_int/docs/models/contractorpaymentgroup.md rename to gusto_embedded/docs/models/contractorpaymentgroupwithblockers.md index eff2a7b2..cf1ea433 100644 --- a/gusto_app_int/docs/models/contractorpaymentgroup.md +++ b/gusto_embedded/docs/models/contractorpaymentgroupwithblockers.md @@ -1,6 +1,6 @@ -# ContractorPaymentGroup +# ContractorPaymentGroupWithBlockers -The full contractor payment group, including associated contractor payments. +Contractor payment group with submission and credit blockers, but without individual contractor payments. ## Fields @@ -11,7 +11,9 @@ The full contractor payment group, including associated contractor payments. | `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company. | | `check_date` | *Optional[str]* | :heavy_minus_sign: | The check date of the contractor payment group. | | `debit_date` | *Optional[str]* | :heavy_minus_sign: | The debit date of the contractor payment group. | -| `status` | [Optional[models.ContractorPaymentGroupStatus]](../models/contractorpaymentgroupstatus.md) | :heavy_minus_sign: | The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. | +| `status` | [Optional[models.ContractorPaymentGroupWithBlockersStatus]](../models/contractorpaymentgroupwithblockersstatus.md) | :heavy_minus_sign: | The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. | | `creation_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token. | -| `totals` | [Optional[models.ContractorPaymentGroupTotals]](../models/contractorpaymentgrouptotals.md) | :heavy_minus_sign: | N/A | -| `contractor_payments` | List[[models.ContractorPaymentForGroup](../models/contractorpaymentforgroup.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `partner_owned_disbursement` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the disbursement is partner owned. | +| `submission_blockers` | List[List[[models.PayrollSubmissionBlockersType](../models/payrollsubmissionblockerstype.md)]] | :heavy_minus_sign: | List of submission blockers for the contractor payment group. | +| `credit_blockers` | List[List[[models.PayrollCreditBlockersType](../models/payrollcreditblockerstype.md)]] | :heavy_minus_sign: | List of credit blockers for the contractor payment group. | +| `totals` | [Optional[models.ContractorPaymentGroupWithBlockersTotals]](../models/contractorpaymentgroupwithblockerstotals.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentgroupminimalstatus.md b/gusto_embedded/docs/models/contractorpaymentgroupwithblockersstatus.md similarity index 90% rename from gusto_embedded/docs/models/contractorpaymentgroupminimalstatus.md rename to gusto_embedded/docs/models/contractorpaymentgroupwithblockersstatus.md index c71415d9..04afb691 100644 --- a/gusto_embedded/docs/models/contractorpaymentgroupminimalstatus.md +++ b/gusto_embedded/docs/models/contractorpaymentgroupwithblockersstatus.md @@ -1,4 +1,4 @@ -# ContractorPaymentGroupMinimalStatus +# ContractorPaymentGroupWithBlockersStatus The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method. diff --git a/gusto_app_int/docs/models/totals.md b/gusto_embedded/docs/models/contractorpaymentgroupwithblockerstotals.md similarity index 84% rename from gusto_app_int/docs/models/totals.md rename to gusto_embedded/docs/models/contractorpaymentgroupwithblockerstotals.md index 96b89680..7f2d4a48 100644 --- a/gusto_app_int/docs/models/totals.md +++ b/gusto_embedded/docs/models/contractorpaymentgroupwithblockerstotals.md @@ -1,4 +1,4 @@ -# Totals +# ContractorPaymentGroupWithBlockersTotals ## Fields @@ -8,4 +8,5 @@ | `amount` | *Optional[str]* | :heavy_minus_sign: | The total amount for the group of contractor payments. | | `debit_amount` | *Optional[str]* | :heavy_minus_sign: | The total debit amount for the group of contractor payments. Sum of wage & reimbursement amount. | | `wage_amount` | *Optional[str]* | :heavy_minus_sign: | The total wage amount for the group of contractor payments. | -| `reimbursement_amount` | *Optional[str]* | :heavy_minus_sign: | The total reimbursement amount for the group of contractor payments. | \ No newline at end of file +| `reimbursement_amount` | *Optional[str]* | :heavy_minus_sign: | The total reimbursement amount for the group of contractor payments. | +| `check_amount` | *Optional[str]* | :heavy_minus_sign: | The total check amount for the group of contractor payments. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentmethod.md b/gusto_embedded/docs/models/contractorpaymentmethod.md index 6b333718..9eb72187 100644 --- a/gusto_embedded/docs/models/contractorpaymentmethod.md +++ b/gusto_embedded/docs/models/contractorpaymentmethod.md @@ -5,9 +5,9 @@ Example response ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `type` | [Optional[models.ContractorPaymentMethodType]](../models/contractorpaymentmethodtype.md) | :heavy_minus_sign: | The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required. | -| `split_by` | [OptionalNullable[models.ContractorPaymentMethodSplitBy]](../models/contractorpaymentmethodsplitby.md) | :heavy_minus_sign: | Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. | -| `splits` | List[[models.PaymentMethodBankAccount](../models/paymentmethodbankaccount.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `type` | [OptionalNullable[models.ContractorPaymentMethodType]](../models/contractorpaymentmethodtype.md) | :heavy_minus_sign: | The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required. | +| `split_by` | [OptionalNullable[models.ContractorPaymentMethodSplitBy]](../models/contractorpaymentmethodsplitby.md) | :heavy_minus_sign: | Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last split amount must be nil to capture the remainder. | +| `splits` | List[[models.PaymentMethodBankAccount](../models/paymentmethodbankaccount.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorpaymentmethodsplitby.md b/gusto_embedded/docs/models/contractorpaymentmethodsplitby.md index d494415b..5035a3bc 100644 --- a/gusto_embedded/docs/models/contractorpaymentmethodsplitby.md +++ b/gusto_embedded/docs/models/contractorpaymentmethodsplitby.md @@ -1,6 +1,6 @@ # ContractorPaymentMethodSplitBy -Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. +Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last split amount must be nil to capture the remainder. ## Values diff --git a/gusto_embedded/docs/models/contractorpaymentmethodtype.md b/gusto_embedded/docs/models/contractorpaymentmethodtype.md index 2cc7211d..8878f328 100644 --- a/gusto_embedded/docs/models/contractorpaymentmethodtype.md +++ b/gusto_embedded/docs/models/contractorpaymentmethodtype.md @@ -1,6 +1,6 @@ # ContractorPaymentMethodType -The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required. +The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required. ## Values diff --git a/gusto_app_int/docs/models/contractorpaymentforgrouppaymentmethod.md b/gusto_embedded/docs/models/contractorpaymentreceiptpaymentmethod.md similarity index 88% rename from gusto_app_int/docs/models/contractorpaymentforgrouppaymentmethod.md rename to gusto_embedded/docs/models/contractorpaymentreceiptpaymentmethod.md index d5065ac2..0a91c964 100644 --- a/gusto_app_int/docs/models/contractorpaymentforgrouppaymentmethod.md +++ b/gusto_embedded/docs/models/contractorpaymentreceiptpaymentmethod.md @@ -1,4 +1,4 @@ -# ContractorPaymentForGroupPaymentMethod +# ContractorPaymentReceiptPaymentMethod The payment method. diff --git a/gusto_embedded/docs/models/contractorpaymentsmodel.md b/gusto_embedded/docs/models/contractorpaymentsmodel.md index 2cfff96c..dd46ebe5 100644 --- a/gusto_embedded/docs/models/contractorpaymentsmodel.md +++ b/gusto_embedded/docs/models/contractorpaymentsmodel.md @@ -3,14 +3,14 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the contractor. | -| `contractor_first_name` | *Optional[str]* | :heavy_minus_sign: | The first name of the contractor. Applies when `contractor_type` is `Individual`. | -| `contractor_last_name` | *Optional[str]* | :heavy_minus_sign: | The last name of the contractor. Applies when `contractor_type` is `Individual`. | -| `contractor_business_name` | *Optional[str]* | :heavy_minus_sign: | The business name of the contractor. Applies when `contractor_type` is `Business`. | -| `contractor_type` | *Optional[str]* | :heavy_minus_sign: | The type of contractor.

`Individual` `Business` | -| `payment_method` | *Optional[str]* | :heavy_minus_sign: | The payment method.

`Direct Deposit` `Check` `Historical Payment` `Correction Payment` | -| `wage` | *Optional[str]* | :heavy_minus_sign: | The fixed wage of the payment, regardless of hours worked. | -| `bonus` | *Optional[str]* | :heavy_minus_sign: | The bonus amount in the payment. | -| `reimbursement` | *Optional[str]* | :heavy_minus_sign: | The reimbursement amount in the payment. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the contractor. | +| `contractor_first_name` | *Optional[str]* | :heavy_minus_sign: | The first name of the contractor. Applies when `contractor_type` is `Individual`. | +| `contractor_last_name` | *Optional[str]* | :heavy_minus_sign: | The last name of the contractor. Applies when `contractor_type` is `Individual`. | +| `contractor_business_name` | *Optional[str]* | :heavy_minus_sign: | The business name of the contractor. Applies when `contractor_type` is `Business`. | +| `contractor_type` | *Optional[str]* | :heavy_minus_sign: | The type of contractor.

`Individual` `Business` | +| `payment_method` | [Optional[models.ContractorPaymentReceiptPaymentMethod]](../models/contractorpaymentreceiptpaymentmethod.md) | :heavy_minus_sign: | The payment method. | +| `wage` | *Optional[str]* | :heavy_minus_sign: | The fixed wage of the payment, regardless of hours worked. | +| `bonus` | *Optional[str]* | :heavy_minus_sign: | The bonus amount in the payment. | +| `reimbursement` | *Optional[str]* | :heavy_minus_sign: | The reimbursement amount in the payment. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contractorssortby.md b/gusto_embedded/docs/models/contractorssortby.md new file mode 100644 index 00000000..dda6aba4 --- /dev/null +++ b/gusto_embedded/docs/models/contractorssortby.md @@ -0,0 +1,11 @@ +# ContractorsSortBy + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `TYPE` | type | +| `ONBOARDING_STATUS` | onboarding_status | +| `NAME` | name | +| `CREATED_AT` | created_at | \ No newline at end of file diff --git a/gusto_embedded/docs/models/contributionexclusion.md b/gusto_embedded/docs/models/contributionexclusion.md new file mode 100644 index 00000000..913c7410 --- /dev/null +++ b/gusto_embedded/docs/models/contributionexclusion.md @@ -0,0 +1,12 @@ +# ContributionExclusion + +The representation of a contribution exclusion for a company benefit. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `contribution_uuid` | *str* | :heavy_check_mark: | The UUID of the contribution type. | +| `contribution_type` | *str* | :heavy_check_mark: | The name of the contribution type. | +| `excluded` | *bool* | :heavy_check_mark: | Whether this contribution type is excluded from the benefit. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/createreport.md b/gusto_embedded/docs/models/createreport.md index 607ef6af..177fc99b 100644 --- a/gusto_embedded/docs/models/createreport.md +++ b/gusto_embedded/docs/models/createreport.md @@ -9,5 +9,5 @@ Example response | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | | `request_uuid` | *Optional[str]* | :heavy_minus_sign: | A unique identifier of the report request | | `company_uuid` | *Optional[str]* | :heavy_minus_sign: | Company UUID | -| `custom_name` | *Optional[str]* | :heavy_minus_sign: | Title of the report | +| `custom_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Title of the report | | `file_type` | *Optional[str]* | :heavy_minus_sign: | File type | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deductions.md b/gusto_embedded/docs/models/deductions.md index 9921610e..aa44e12a 100644 --- a/gusto_embedded/docs/models/deductions.md +++ b/gusto_embedded/docs/models/deductions.md @@ -1,9 +1,13 @@ # Deductions +An array of deductions for the employee. + ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `amount` | *Optional[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the deduction. | +| `amount` | *Optional[float]* | :heavy_minus_sign: | The amount of the deduction for the pay period. | +| `amount_type` | [Optional[models.AmountType]](../models/amounttype.md) | :heavy_minus_sign: | The amount type of the deduction for the pay period. | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1companiescompanyidbankaccountsbankaccountidheaderxgustoapiversion.md b/gusto_embedded/docs/models/deletev1companiescompanyidbankaccountsbankaccountidheaderxgustoapiversion.md new file mode 100644 index 00000000..21e81f31 --- /dev/null +++ b/gusto_embedded/docs/models/deletev1companiescompanyidbankaccountsbankaccountidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1companiescompanyidbankaccountsbankaccountidrequest.md b/gusto_embedded/docs/models/deletev1companiescompanyidbankaccountsbankaccountidrequest.md new file mode 100644 index 00000000..68d222c8 --- /dev/null +++ b/gusto_embedded/docs/models/deletev1companiescompanyidbankaccountsbankaccountidrequest.md @@ -0,0 +1,10 @@ +# DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `bank_account_id` | *str* | :heavy_check_mark: | The UUID of the company bank account | +| `x_gusto_api_version` | [Optional[models.DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion]](../models/deletev1companiescompanyidbankaccountsbankaccountidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1companiescompanyidpayrollsheaderxgustoapiversion.md b/gusto_embedded/docs/models/deletev1companiescompanyidpayrollsheaderxgustoapiversion.md new file mode 100644 index 00000000..99354a75 --- /dev/null +++ b/gusto_embedded/docs/models/deletev1companiescompanyidpayrollsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1companiescompanyidpayrollsrequest.md b/gusto_embedded/docs/models/deletev1companiescompanyidpayrollsrequest.md index 4b4279b7..8ae555aa 100644 --- a/gusto_embedded/docs/models/deletev1companiescompanyidpayrollsrequest.md +++ b/gusto_embedded/docs/models/deletev1companiescompanyidpayrollsrequest.md @@ -8,4 +8,4 @@ | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | | `async_` | *Optional[bool]* | :heavy_minus_sign: | When true, request an asynchronous delete of the payroll. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../models/deletev1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md b/gusto_embedded/docs/models/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md new file mode 100644 index 00000000..1151e1b1 --- /dev/null +++ b/gusto_embedded/docs/models/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1contractorpaymentgroupscontractorpaymentgroupidrequest.md b/gusto_embedded/docs/models/deletev1contractorpaymentgroupscontractorpaymentgroupidrequest.md index 2c9c80ea..151e2c4b 100644 --- a/gusto_embedded/docs/models/deletev1contractorpaymentgroupscontractorpaymentgroupidrequest.md +++ b/gusto_embedded/docs/models/deletev1contractorpaymentgroupscontractorpaymentgroupidrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contractor_payment_group_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion]](../models/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md b/gusto_embedded/docs/models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..dac31c10 --- /dev/null +++ b/gusto_embedded/docs/models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1homeaddresseshomeaddressuuidrequest.md b/gusto_embedded/docs/models/deletev1homeaddresseshomeaddressuuidrequest.md index da12b601..c8af993c 100644 --- a/gusto_embedded/docs/models/deletev1homeaddresseshomeaddressuuidrequest.md +++ b/gusto_embedded/docs/models/deletev1homeaddresseshomeaddressuuidrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1recurringreimbursementsheaderxgustoapiversion.md b/gusto_embedded/docs/models/deletev1recurringreimbursementsheaderxgustoapiversion.md new file mode 100644 index 00000000..e76f8549 --- /dev/null +++ b/gusto_embedded/docs/models/deletev1recurringreimbursementsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1recurringreimbursementsrequest.md b/gusto_embedded/docs/models/deletev1recurringreimbursementsrequest.md new file mode 100644 index 00000000..beb09a7f --- /dev/null +++ b/gusto_embedded/docs/models/deletev1recurringreimbursementsrequest.md @@ -0,0 +1,9 @@ +# DeleteV1RecurringReimbursementsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion]](../models/deletev1recurringreimbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `id` | *str* | :heavy_check_mark: | The UUID of the reimbursement | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md b/gusto_embedded/docs/models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..b88408d6 --- /dev/null +++ b/gusto_embedded/docs/models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/deletev1workaddressesworkaddressuuidrequest.md b/gusto_embedded/docs/models/deletev1workaddressesworkaddressuuidrequest.md index 85071fb8..e21c51ef 100644 --- a/gusto_embedded/docs/models/deletev1workaddressesworkaddressuuidrequest.md +++ b/gusto_embedded/docs/models/deletev1workaddressesworkaddressuuidrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/detailedpaymentaccountsplit.md b/gusto_embedded/docs/models/detailedpaymentaccountsplit.md new file mode 100644 index 00000000..fc276028 --- /dev/null +++ b/gusto_embedded/docs/models/detailedpaymentaccountsplit.md @@ -0,0 +1,15 @@ +# DetailedPaymentAccountSplit + +Details of a single payment split for a payment method. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `bank_account_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the bank account. | +| `hidden_account_number` | *Optional[str]* | :heavy_minus_sign: | The masked account number. | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the bank account. | +| `priority` | *Optional[int]* | :heavy_minus_sign: | The priority of the payment split. | +| `split_amount` | *Optional[int]* | :heavy_minus_sign: | The amount for the split. If `split_by` is 'Amount', this is in cents (e.g., 500 for $5.00). If `split_by` is 'Percentage', this is the percentage value (e.g., 60 for 60%). | +| `encrypted_account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Ciphertext containing the full bank account number, which must be decrypted using a key provided by Gusto. Only visible with the appropriate `read:account_number` scope (e.g., `employee_payment_methods:read:account_number`). | \ No newline at end of file diff --git a/gusto_embedded/docs/models/disbursements.md b/gusto_embedded/docs/models/disbursements.md new file mode 100644 index 00000000..50316255 --- /dev/null +++ b/gusto_embedded/docs/models/disbursements.md @@ -0,0 +1,11 @@ +# Disbursements + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `contractor_payment_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the contractor payment | +| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the contractor | +| `payment_method` | [Optional[models.ContractorPaymentGroupPartnerDisbursementsPaymentMethod]](../models/contractorpaymentgrouppartnerdisbursementspaymentmethod.md) | :heavy_minus_sign: | The payment method for the disbursement | +| `payment_status` | [Optional[models.ContractorPaymentGroupPartnerDisbursementsPaymentStatus]](../models/contractorpaymentgrouppartnerdisbursementspaymentstatus.md) | :heavy_minus_sign: | The status of the payment | \ No newline at end of file diff --git a/gusto_embedded/docs/models/earnedfastachblockers.md b/gusto_embedded/docs/models/earnedfastachblockers.md new file mode 100644 index 00000000..fa8ede32 --- /dev/null +++ b/gusto_embedded/docs/models/earnedfastachblockers.md @@ -0,0 +1,9 @@ +# EarnedFastAchBlockers + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `blocker_type` | [Optional[models.BlockerType]](../models/blockertype.md) | :heavy_minus_sign: | The type of blocker | +| `threshold` | *Optional[float]* | :heavy_minus_sign: | The threshold needed to unblock | \ No newline at end of file diff --git a/gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md b/gusto_embedded/docs/models/einverification.md similarity index 51% rename from gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md rename to gusto_embedded/docs/models/einverification.md index a34b8933..362115c7 100644 --- a/gusto_app_int/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md +++ b/gusto_embedded/docs/models/einverification.md @@ -1,10 +1,10 @@ -# PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody +# EinVerification + +Information about the status of verifying the company's Employer Identification Number (EIN) ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `check_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | The payment check date | 2020-01-01 | -| `creation_token` | *Optional[str]* | :heavy_minus_sign: | Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. | 1d532d13-8f61-4a57-ad3c-b5fac1c6e05e | -| `contractor_payments` | List[[models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments](../models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `status` | [Optional[models.FederalTaxDetailsStatus]](../models/federaltaxdetailsstatus.md) | :heavy_minus_sign: | The status of EIN verification:
- `pending`: The EIN verification process has not completed (or the company does not yet have an EIN).
- `verified`: The EIN has been successfully verified as a valid EIN with the IRS.
- `failed`: The company's EIN did not pass verification. Common issues are being entered incorrectly or not matching the company's legal name. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employee.md b/gusto_embedded/docs/models/employee.md index fc978105..6982da2b 100644 --- a/gusto_embedded/docs/models/employee.md +++ b/gusto_embedded/docs/models/employee.md @@ -5,32 +5,40 @@ The representation of an employee in Gusto. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *str* | :heavy_check_mark: | The UUID of the employee in Gusto. | -| `first_name` | *str* | :heavy_check_mark: | N/A | -| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `last_name` | *str* | :heavy_check_mark: | N/A | -| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | The personal email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | -| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company the employee is employed by. | -| `manager_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the employee's manager. | -| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the employee. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee's department in the company. | -| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is terminated. | -| `two_percent_shareholder` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | -| `onboarded` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee has completed onboarding. | -| `onboarding_status` | [OptionalNullable[models.OnboardingStatus]](../models/onboardingstatus.md) | :heavy_minus_sign: | The current onboarding status of the employee | -| `onboarding_documents_config` | [Optional[models.OnboardingDocumentsConfig]](../models/onboardingdocumentsconfig.md) | :heavy_minus_sign: | Configuration for an employee onboarding documents during onboarding | -| `jobs` | List[[models.Job](../models/job.md)] | :heavy_minus_sign: | N/A | -| `eligible_paid_time_off` | List[[models.PaidTimeOff](../models/paidtimeoff.md)] | :heavy_minus_sign: | N/A | -| `terminations` | List[[models.Termination](../models/termination.md)] | :heavy_minus_sign: | N/A | -| `garnishments` | List[[models.Garnishment](../models/garnishment.md)] | :heavy_minus_sign: | N/A | -| `custom_fields` | List[[models.EmployeeCustomField](../models/employeecustomfield.md)] | :heavy_minus_sign: | Custom fields are only included for the employee if the include param has the custom_fields value set | -| `date_of_birth` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `has_ssn` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the employee has an SSN in Gusto. | -| `ssn` | *Optional[str]* | :heavy_minus_sign: | Deprecated. This field always returns an empty string. | -| `phone` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `payment_method` | [Optional[models.PaymentMethod]](../models/paymentmethod.md) | :heavy_minus_sign: | The employee's payment method | -| `work_email` | *OptionalNullable[str]* | :heavy_minus_sign: | The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | -| `current_employment_status` | [OptionalNullable[models.CurrentEmploymentStatus]](../models/currentemploymentstatus.md) | :heavy_minus_sign: | The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the employee in Gusto. | +| `first_name` | *str* | :heavy_check_mark: | N/A | +| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `last_name` | *str* | :heavy_check_mark: | N/A | +| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | The personal email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | +| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company the employee is employed by. | +| `manager_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the employee's manager. | +| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the employee. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee's department in the company. | +| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is terminated. | +| `two_percent_shareholder` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | +| `work_email` | *OptionalNullable[str]* | :heavy_minus_sign: | The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | +| `onboarded` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee has completed onboarding. | +| `onboarding_status` | [OptionalNullable[models.EmployeeOnboardingStatus1]](../models/employeeonboardingstatus1.md) | :heavy_minus_sign: | The current onboarding status of the employee | +| `onboarding_documents_config` | [Optional[models.EmployeeOnboardingDocumentsConfig]](../models/employeeonboardingdocumentsconfig.md) | :heavy_minus_sign: | Configuration for an employee onboarding documents during onboarding | +| `jobs` | List[[models.Job](../models/job.md)] | :heavy_minus_sign: | N/A | +| `eligible_paid_time_off` | List[[models.PaidTimeOff](../models/paidtimeoff.md)] | :heavy_minus_sign: | N/A | +| `terminations` | List[[models.Termination](../models/termination.md)] | :heavy_minus_sign: | N/A | +| `garnishments` | List[[models.Garnishment](../models/garnishment.md)] | :heavy_minus_sign: | N/A | +| `custom_fields` | List[[models.EmployeeCustomField](../models/employeecustomfield.md)] | :heavy_minus_sign: | Custom fields are only included for the employee if the include param has the custom_fields value set | +| `date_of_birth` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `has_ssn` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the employee has an SSN in Gusto. | +| `ssn` | *Optional[str]* | :heavy_minus_sign: | Deprecated. This field always returns an empty string. | +| `phone` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `payment_method` | [Optional[models.EmployeePaymentMethod1]](../models/employeepaymentmethod1.md) | :heavy_minus_sign: | The employee's payment method | +| `current_employment_status` | [OptionalNullable[models.EmployeeCurrentEmploymentStatus]](../models/employeecurrentemploymentstatus.md) | :heavy_minus_sign: | The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less. | +| `historical` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `employee_code` | *Optional[str]* | :heavy_minus_sign: | The short format code of the employee | +| `department_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the department the employee is under | +| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `hired_at` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date when the employee was hired to the company | +| `hidden_ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `flsa_status` | [Optional[models.FlsaStatusType]](../models/flsastatustype.md) | :heavy_minus_sign: | The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company. | +| `applicable_tax_ids` | List[*float*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeeaddress.md b/gusto_embedded/docs/models/employeeaddress.md index e2410685..0d6dddef 100644 --- a/gusto_embedded/docs/models/employeeaddress.md +++ b/gusto_embedded/docs/models/employeeaddress.md @@ -5,7 +5,10 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the employee address | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee started living at the address. | +| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | Determines if home taxes should be withheld and paid for employee. | | `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | | `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `city` | *Optional[str]* | :heavy_minus_sign: | N/A | @@ -13,7 +16,4 @@ | `zip` | *Optional[str]* | :heavy_minus_sign: | N/A | | `country` | *Optional[str]* | :heavy_minus_sign: | N/A | | `active` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | -| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee address | -| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee started living at the address. | -| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | Determines if home taxes should be withheld and paid for employee. | \ No newline at end of file +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeebenefit.md b/gusto_embedded/docs/models/employeebenefit.md index 4a1997f9..c2482f54 100644 --- a/gusto_embedded/docs/models/employeebenefit.md +++ b/gusto_embedded/docs/models/employeebenefit.md @@ -16,11 +16,11 @@ The representation of an employee benefit. | `elective` | *Optional[bool]* | :heavy_minus_sign: | Whether the company contribution is elective (aka matching). For "tiered" contribution types, this is always true. | | `company_contribution_annual_maximum` | *OptionalNullable[str]* | :heavy_minus_sign: | The maximum company contribution amount per year. A null value signifies no limit. | | `limit_option` | *OptionalNullable[str]* | :heavy_minus_sign: | Some benefits require additional information to determine their limit.

`Family` and `Individual` are applicable to HSA benefit.

`Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. | -| `catch_up` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee should use a benefit’s "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | +| `catch_up` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee should use a benefit's "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | | `retirement_loan_identifier` | *Optional[str]* | :heavy_minus_sign: | Identifier for a 401(k) loan assigned by the 401(k) provider | | `coverage_amount` | *OptionalNullable[str]* | :heavy_minus_sign: | The amount that the employee is insured for. Note: company contribution cannot be present if coverage amount is set. | | `deduction_reduces_taxable_income` | [OptionalNullable[models.DeductionReducesTaxableIncome]](../models/deductionreducestaxableincome.md) | :heavy_minus_sign: | Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not "unset", coverage amount and coverage salary multiplier are ignored. | -| `coverage_salary_multiplier` | *Optional[str]* | :heavy_minus_sign: | The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | +| `coverage_salary_multiplier` | *OptionalNullable[str]* | :heavy_minus_sign: | The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | | ~~`company_contribution`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types. | | ~~`contribute_as_percentage`~~ | *Optional[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Whether the company_contribution value should be treated as a percentage to be added to each payroll. This field will not appear for tiered contribution types. | | `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee to which the benefit belongs. | diff --git a/gusto_embedded/docs/models/employeebenefitforcompanybenefit.md b/gusto_embedded/docs/models/employeebenefitforcompanybenefit.md index e045015e..b7ea3500 100644 --- a/gusto_embedded/docs/models/employeebenefitforcompanybenefit.md +++ b/gusto_embedded/docs/models/employeebenefitforcompanybenefit.md @@ -16,11 +16,11 @@ The representation of an employee benefit for a company benefit. | `elective` | *Optional[bool]* | :heavy_minus_sign: | Whether the company contribution is elective (aka matching). For "tiered" contribution types, this is always true. | | `company_contribution_annual_maximum` | *OptionalNullable[str]* | :heavy_minus_sign: | The maximum company contribution amount per year. A null value signifies no limit. | | `limit_option` | *OptionalNullable[str]* | :heavy_minus_sign: | Some benefits require additional information to determine their limit.

`Family` and `Individual` are applicable to HSA benefit.

`Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. | -| `catch_up` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee should use a benefit’s "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | +| `catch_up` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee should use a benefit's "catch up" rate. Only Roth 401k and 401k benefits use this value for employees over 50. | | `retirement_loan_identifier` | *Optional[str]* | :heavy_minus_sign: | Identifier for a 401(k) loan assigned by the 401(k) provider | | `coverage_amount` | *OptionalNullable[str]* | :heavy_minus_sign: | The amount that the employee is insured for. Note: company contribution cannot be present if coverage amount is set. | | `deduction_reduces_taxable_income` | [OptionalNullable[models.EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome]](../models/employeebenefitforcompanybenefitdeductionreducestaxableincome.md) | :heavy_minus_sign: | Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not "unset", coverage amount and coverage salary multiplier are ignored. | -| `coverage_salary_multiplier` | *Optional[str]* | :heavy_minus_sign: | The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | +| `coverage_salary_multiplier` | *OptionalNullable[str]* | :heavy_minus_sign: | The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set. | | ~~`company_contribution`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types. | | ~~`contribute_as_percentage`~~ | *Optional[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Whether the company_contribution value should be treated as a percentage to be added to each payroll. This field will not appear for tiered contribution types. | | `employee_uuid` | *str* | :heavy_check_mark: | The UUID of the employee to which the benefit belongs. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeecompensations.md b/gusto_embedded/docs/models/employeecompensations.md index 0d1437a2..c0b71a2a 100644 --- a/gusto_embedded/docs/models/employeecompensations.md +++ b/gusto_embedded/docs/models/employeecompensations.md @@ -3,14 +3,23 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | -| `employee_first_name` | *Optional[str]* | :heavy_minus_sign: | The first name of the employee. | -| `employee_last_name` | *Optional[str]* | :heavy_minus_sign: | The last name of the employee. | -| `payment_method` | *Optional[str]* | :heavy_minus_sign: | The employee's compensation payment method.\n\n`Check` `Direct Deposit` | -| `net_pay` | *Optional[str]* | :heavy_minus_sign: | The employee's net pay. Net pay paid by check is available for reference but is not included in the `["totals"]["net_pay_debit"]` amount. | -| `total_tax` | *Optional[str]* | :heavy_minus_sign: | The total of employer and employee taxes for the pay period. | -| `total_garnishments` | *Optional[str]* | :heavy_minus_sign: | The total garnishments for the pay period. | -| `child_support_garnishment` | *Optional[str]* | :heavy_minus_sign: | The total child support garnishment for the pay period. | -| `total_reimbursement` | *Optional[str]* | :heavy_minus_sign: | The total reimbursement for the pay period. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | +| `excluded` | *Optional[bool]* | :heavy_minus_sign: | This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false. | +| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the employee. Requires `employees:read` scope. | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The preferred first name of the employee. Requires `employees:read` scope. | +| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the employee. Requires `employees:read` scope. | +| `gross_pay` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls. | +| `net_pay` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's net pay, equal to gross_pay - employee taxes - employee deductions or garnishments - cash tips. This value is only available for processed payrolls. | +| `check_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls. | +| `payment_method` | [OptionalNullable[models.PayrollShowPaymentMethod]](../models/payrollshowpaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. | +| `memo` | *OptionalNullable[str]* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | +| `fixed_compensations` | List[[models.PayrollShowFixedCompensations](../models/payrollshowfixedcompensations.md)] | :heavy_minus_sign: | An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned. | +| `hourly_compensations` | List[[models.PayrollShowHourlyCompensations](../models/payrollshowhourlycompensations.md)] | :heavy_minus_sign: | An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned. | +| `paid_time_off` | List[[models.PayrollShowPaidTimeOff](../models/payrollshowpaidtimeoff.md)] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. | +| `deductions` | List[[models.PayrollShowDeductions](../models/payrollshowdeductions.md)] | :heavy_minus_sign: | An array of employee deductions for the pay period. | +| `reimbursements` | List[[models.PayrollShowReimbursements](../models/payrollshowreimbursements.md)] | :heavy_minus_sign: | An array of reimbursements for the employee. | +| `taxes` | List[[models.PayrollShowTaxes](../models/payrollshowtaxes.md)] | :heavy_minus_sign: | An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | +| `benefits` | List[[models.PayrollShowBenefits](../models/payrollshowbenefits.md)] | :heavy_minus_sign: | An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeecurrentemploymentstatus.md b/gusto_embedded/docs/models/employeecurrentemploymentstatus.md new file mode 100644 index 00000000..46aa3991 --- /dev/null +++ b/gusto_embedded/docs/models/employeecurrentemploymentstatus.md @@ -0,0 +1,14 @@ +# EmployeeCurrentEmploymentStatus + +The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less. + + +## Values + +| Name | Value | +| ------------------------------ | ------------------------------ | +| `FULL_TIME` | full_time | +| `PART_TIME_UNDER_TWENTY_HOURS` | part_time_under_twenty_hours | +| `PART_TIME_TWENTY_PLUS_HOURS` | part_time_twenty_plus_hours | +| `VARIABLE` | variable | +| `SEASONAL` | seasonal | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeefederaltax.md b/gusto_embedded/docs/models/employeefederaltax.md index f50f54e6..e3868bb6 100644 --- a/gusto_embedded/docs/models/employeefederaltax.md +++ b/gusto_embedded/docs/models/employeefederaltax.md @@ -16,4 +16,4 @@ Example response | `deductions` | *Nullable[str]* | :heavy_check_mark: | Deductions other than the standard deduction to reduce withholding. | | `w4_data_type` | [models.W4DataType](../models/w4datatype.md) | :heavy_check_mark: | The version of w4 form. | | `federal_withholding_allowance` | *Optional[float]* | :heavy_minus_sign: | *does not apply to rev_2020_w4 form*

An exemption from paying a certain amount of income tax. | -| `additional_withholding` | *Optional[bool]* | :heavy_minus_sign: | *does not apply to rev_2020_w4 form* | \ No newline at end of file +| `additional_withholding` | *Optional[str]* | :heavy_minus_sign: | *does not apply to rev_2020_w4 form*

An additional withholding dollar amount | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeehomeaddress.md b/gusto_embedded/docs/models/employeehomeaddress.md new file mode 100644 index 00000000..7d9d67f1 --- /dev/null +++ b/gusto_embedded/docs/models/employeehomeaddress.md @@ -0,0 +1,15 @@ +# EmployeeHomeAddress + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `street_1` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `city` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `state` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `zip` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `active` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for this address. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeeonboardingdocumentsconfig.md b/gusto_embedded/docs/models/employeeonboardingdocumentsconfig.md new file mode 100644 index 00000000..d36fa7de --- /dev/null +++ b/gusto_embedded/docs/models/employeeonboardingdocumentsconfig.md @@ -0,0 +1,11 @@ +# EmployeeOnboardingDocumentsConfig + +Configuration for an employee onboarding documents during onboarding + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the onboarding documents config | +| `i9_document` | *Optional[bool]* | :heavy_minus_sign: | Whether to include Form I-9 for an employee during onboarding | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeeonboardingstatus1.md b/gusto_embedded/docs/models/employeeonboardingstatus1.md new file mode 100644 index 00000000..1719e031 --- /dev/null +++ b/gusto_embedded/docs/models/employeeonboardingstatus1.md @@ -0,0 +1,17 @@ +# EmployeeOnboardingStatus1 + +The current onboarding status of the employee + + +## Values + +| Name | Value | +| --------------------------------------- | --------------------------------------- | +| `ONBOARDING_COMPLETED` | onboarding_completed | +| `ADMIN_ONBOARDING_INCOMPLETE` | admin_onboarding_incomplete | +| `SELF_ONBOARDING_PENDING_INVITE` | self_onboarding_pending_invite | +| `SELF_ONBOARDING_INVITED` | self_onboarding_invited | +| `SELF_ONBOARDING_INVITED_STARTED` | self_onboarding_invited_started | +| `SELF_ONBOARDING_INVITED_OVERDUE` | self_onboarding_invited_overdue | +| `SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE` | self_onboarding_completed_by_employee | +| `SELF_ONBOARDING_AWAITING_ADMIN_REVIEW` | self_onboarding_awaiting_admin_review | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeepaymentdetail.md b/gusto_embedded/docs/models/employeepaymentdetail.md new file mode 100644 index 00000000..f4ed9d20 --- /dev/null +++ b/gusto_embedded/docs/models/employeepaymentdetail.md @@ -0,0 +1,13 @@ +# EmployeePaymentDetail + +Represents an employee's payment method details. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | +| `payment_method` | [Optional[models.EmployeePaymentDetailPaymentMethod]](../models/employeepaymentdetailpaymentmethod.md) | :heavy_minus_sign: | The type of payment method. | +| `split_by` | [OptionalNullable[models.SplitBy]](../models/splitby.md) | :heavy_minus_sign: | How the payment is split. This field is applicable when `payment_method` is "Direct Deposit". | +| `splits` | List[[models.DetailedPaymentAccountSplit](../models/detailedpaymentaccountsplit.md)] | :heavy_minus_sign: | An array of payment splits. This field is applicable when `payment_method` is "Direct Deposit". | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeepaymentdetailpaymentmethod.md b/gusto_embedded/docs/models/employeepaymentdetailpaymentmethod.md new file mode 100644 index 00000000..4f605187 --- /dev/null +++ b/gusto_embedded/docs/models/employeepaymentdetailpaymentmethod.md @@ -0,0 +1,11 @@ +# EmployeePaymentDetailPaymentMethod + +The type of payment method. + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeepaymentmethod.md b/gusto_embedded/docs/models/employeepaymentmethod.md index bc9da00f..e0bdef9b 100644 --- a/gusto_embedded/docs/models/employeepaymentmethod.md +++ b/gusto_embedded/docs/models/employeepaymentmethod.md @@ -5,9 +5,9 @@ Example response ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `type` | [Optional[models.EmployeePaymentMethodType]](../models/employeepaymentmethodtype.md) | :heavy_minus_sign: | The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required. | -| `split_by` | [OptionalNullable[models.SplitBy]](../models/splitby.md) | :heavy_minus_sign: | Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. | -| `splits` | List[[models.PaymentMethodBankAccount](../models/paymentmethodbankaccount.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `type` | [Optional[models.EmployeePaymentMethodType]](../models/employeepaymentmethodtype.md) | :heavy_minus_sign: | The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required. | +| `split_by` | [OptionalNullable[models.EmployeePaymentMethodSplitBy]](../models/employeepaymentmethodsplitby.md) | :heavy_minus_sign: | Describes how the payment will be split. If `split_by` is Percentage, then the split amounts must add up to exactly 100. If `split_by` is Amount, then the last split `amount` must be `null` to capture the remainder. | +| `splits` | List[[models.PaymentMethodBankAccount](../models/paymentmethodbankaccount.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeepaymentmethod1.md b/gusto_embedded/docs/models/employeepaymentmethod1.md new file mode 100644 index 00000000..659626f5 --- /dev/null +++ b/gusto_embedded/docs/models/employeepaymentmethod1.md @@ -0,0 +1,11 @@ +# EmployeePaymentMethod1 + +The employee's payment method + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeepaymentmethodsplitby.md b/gusto_embedded/docs/models/employeepaymentmethodsplitby.md new file mode 100644 index 00000000..5a7e7998 --- /dev/null +++ b/gusto_embedded/docs/models/employeepaymentmethodsplitby.md @@ -0,0 +1,11 @@ +# EmployeePaymentMethodSplitBy + +Describes how the payment will be split. If `split_by` is Percentage, then the split amounts must add up to exactly 100. If `split_by` is Amount, then the last split `amount` must be `null` to capture the remainder. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `AMOUNT` | Amount | +| `PERCENTAGE` | Percentage | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeepaymentmethodtype.md b/gusto_embedded/docs/models/employeepaymentmethodtype.md index 619dee21..e4317497 100644 --- a/gusto_embedded/docs/models/employeepaymentmethodtype.md +++ b/gusto_embedded/docs/models/employeepaymentmethodtype.md @@ -1,6 +1,6 @@ # EmployeePaymentMethodType -The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required. +The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required. ## Values diff --git a/gusto_embedded/docs/models/employeepaystubslist.md b/gusto_embedded/docs/models/employeepaystubslist.md index 73d7adf6..de048d36 100644 --- a/gusto_embedded/docs/models/employeepaystubslist.md +++ b/gusto_embedded/docs/models/employeepaystubslist.md @@ -5,11 +5,12 @@ The representation of an employee pay stub information. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `uuid` | *str* | :heavy_check_mark: | The UUID of the employee pay stub. | -| `check_date` | *Optional[str]* | :heavy_minus_sign: | The check date of the pay stub. | -| `gross_pay` | *Optional[str]* | :heavy_minus_sign: | The gross pay amount for the pay stub. | -| `net_pay` | *Optional[str]* | :heavy_minus_sign: | The net pay amount for the pay stub. | -| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | A unique identifier of the payroll to which the pay stub belongs. | -| `check_amount` | *Optional[str]* | :heavy_minus_sign: | The check amount for the pay stub. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the employee pay stub. | +| `check_date` | *Optional[str]* | :heavy_minus_sign: | The check date of the pay stub. | +| `gross_pay` | *Optional[str]* | :heavy_minus_sign: | The gross pay amount for the pay stub. | +| `net_pay` | *Optional[str]* | :heavy_minus_sign: | The net pay amount for the pay stub. | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | A unique identifier of the payroll to which the pay stub belongs. | +| `check_amount` | *Optional[str]* | :heavy_minus_sign: | The check amount for the pay stub. | +| `payment_method` | [Optional[models.EmployeePayStubsListPaymentMethod]](../models/employeepaystubslistpaymentmethod.md) | :heavy_minus_sign: | The payment method for the pay stub. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeepaystubslistpaymentmethod.md b/gusto_embedded/docs/models/employeepaystubslistpaymentmethod.md new file mode 100644 index 00000000..460ae0cc --- /dev/null +++ b/gusto_embedded/docs/models/employeepaystubslistpaymentmethod.md @@ -0,0 +1,11 @@ +# EmployeePayStubsListPaymentMethod + +The payment method for the pay stub. + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeestatetax.md b/gusto_embedded/docs/models/employeestatetaxeslist.md similarity index 84% rename from gusto_embedded/docs/models/employeestatetax.md rename to gusto_embedded/docs/models/employeestatetaxeslist.md index 4e29fea4..3c08be77 100644 --- a/gusto_embedded/docs/models/employeestatetax.md +++ b/gusto_embedded/docs/models/employeestatetaxeslist.md @@ -1,14 +1,12 @@ -# EmployeeStateTax - -Example response +# EmployeeStateTaxesList ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `employee_uuid` | *str* | :heavy_check_mark: | The employee's uuid | -| `state` | *str* | :heavy_check_mark: | Two letter US state abbreviation | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The employee's uuid | +| `state` | *Optional[str]* | :heavy_minus_sign: | Two letter US state abbreviation | | `file_new_hire_report` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `is_work_state` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `questions` | List[[models.EmployeeStateTaxQuestion](../models/employeestatetaxquestion.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| `questions` | List[[models.EmployeeStateTaxQuestion](../models/employeestatetaxquestion.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesrequestbody.md b/gusto_embedded/docs/models/employeestatetaxesrequest.md similarity index 92% rename from gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesrequestbody.md rename to gusto_embedded/docs/models/employeestatetaxesrequest.md index e73b5582..5f6d60ed 100644 --- a/gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesrequestbody.md +++ b/gusto_embedded/docs/models/employeestatetaxesrequest.md @@ -1,4 +1,4 @@ -# PutV1EmployeesEmployeeIDStateTaxesRequestBody +# EmployeeStateTaxesRequest ## Fields diff --git a/gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesvalue.md b/gusto_embedded/docs/models/employeestatetaxesrequestvalue.md similarity index 82% rename from gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesvalue.md rename to gusto_embedded/docs/models/employeestatetaxesrequestvalue.md index cd324977..50c6b034 100644 --- a/gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesvalue.md +++ b/gusto_embedded/docs/models/employeestatetaxesrequestvalue.md @@ -1,4 +1,4 @@ -# PutV1EmployeesEmployeeIDStateTaxesValue +# EmployeeStateTaxesRequestValue ## Supported Types diff --git a/gusto_embedded/docs/models/employeestatetaxquestion.md b/gusto_embedded/docs/models/employeestatetaxquestion.md index 9ed5ae3f..e2cf200f 100644 --- a/gusto_embedded/docs/models/employeestatetaxquestion.md +++ b/gusto_embedded/docs/models/employeestatetaxquestion.md @@ -6,7 +6,8 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `label` | *str* | :heavy_check_mark: | A short title for the question | -| `description` | *str* | :heavy_check_mark: | An explaination of the question - this may contain inline html formatted links. | +| `description` | *Nullable[str]* | :heavy_check_mark: | An explaination of the question - this may contain inline html formatted links. | | `key` | *str* | :heavy_check_mark: | A unique identifier of the question (for the given state) - used for updating the answer. | +| `is_question_for_admin_only` | *bool* | :heavy_check_mark: | N/A | | `input_question_format` | [models.EmployeeStateTaxInputQuestionFormat](../models/employeestatetaxinputquestionformat.md) | :heavy_check_mark: | N/A | | `answers` | List[[models.EmployeeStateTaxAnswer](../models/employeestatetaxanswer.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/employeeworkaddress.md b/gusto_embedded/docs/models/employeeworkaddress.md index 14bde25a..5e7cd8da 100644 --- a/gusto_embedded/docs/models/employeeworkaddress.md +++ b/gusto_embedded/docs/models/employeeworkaddress.md @@ -1,7 +1,5 @@ # EmployeeWorkAddress -List of employee work addresses - ## Fields diff --git a/gusto_embedded/docs/models/employmenthistorylist.md b/gusto_embedded/docs/models/employmenthistorylist.md index c69bf2fe..86ee96b1 100644 --- a/gusto_embedded/docs/models/employmenthistorylist.md +++ b/gusto_embedded/docs/models/employmenthistorylist.md @@ -8,7 +8,7 @@ The representation of an employee's individual employements. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `hire_date` | *Optional[str]* | :heavy_minus_sign: | The employee's start day of work for an employment. | -| `termination_date` | *Optional[str]* | :heavy_minus_sign: | The employee's last day of work for an employment. | +| `termination_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee's last day of work for an employment. | | `file_new_hire_report` | *Optional[bool]* | :heavy_minus_sign: | The boolean flag indicating whether Gusto will file a new hire report for the employee. | | `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | `employment_status` | [Optional[models.EmploymentHistoryListEmploymentStatus]](../models/employmenthistorylistemploymentstatus.md) | :heavy_minus_sign: | The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/experiencelevel.md b/gusto_embedded/docs/models/experiencelevel.md new file mode 100644 index 00000000..16efc21c --- /dev/null +++ b/gusto_embedded/docs/models/experiencelevel.md @@ -0,0 +1,14 @@ +# ExperienceLevel + +Experience level for this occupation. + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `NOVICE` | novice | +| `INTERMEDIATE` | intermediate | +| `AVERAGE` | average | +| `SKILLED` | skilled | +| `EXPERT` | expert | \ No newline at end of file diff --git a/gusto_embedded/docs/models/externalpayrollbenefits.md b/gusto_embedded/docs/models/externalpayrollbenefits.md deleted file mode 100644 index b2503869..00000000 --- a/gusto_embedded/docs/models/externalpayrollbenefits.md +++ /dev/null @@ -1,10 +0,0 @@ -# ExternalPayrollBenefits - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | -| `benefit_id` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `company_contribution_amount` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `employee_deduction_amount` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/externalpayrollitems.md b/gusto_embedded/docs/models/externalpayrollitems.md index 0a14b794..8633cc59 100644 --- a/gusto_embedded/docs/models/externalpayrollitems.md +++ b/gusto_embedded/docs/models/externalpayrollitems.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `earnings` | List[[models.Earnings](../models/earnings.md)] | :heavy_minus_sign: | N/A | -| `benefits` | List[[models.ExternalPayrollBenefits](../models/externalpayrollbenefits.md)] | :heavy_minus_sign: | N/A | -| `taxes` | List[[models.ExternalPayrollTaxes](../models/externalpayrolltaxes.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `earnings` | List[[models.Earnings](../models/earnings.md)] | :heavy_minus_sign: | N/A | +| `benefits` | List[[models.Benefits](../models/benefits.md)] | :heavy_minus_sign: | N/A | +| `taxes` | List[[models.ExternalPayrollTaxes](../models/externalpayrolltaxes.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/federaltaxdetails.md b/gusto_embedded/docs/models/federaltaxdetails.md index 67c43191..cef4f523 100644 --- a/gusto_embedded/docs/models/federaltaxdetails.md +++ b/gusto_embedded/docs/models/federaltaxdetails.md @@ -12,7 +12,8 @@ Example response | `taxable_as_scorp` | *Optional[bool]* | :heavy_minus_sign: | Whether the company is taxed as an S-Corporation. Tax payer types that may be taxed as an S-Corporation include:
- S-Corporation
- C-Corporation
- LLC | | `filing_form` | *Optional[str]* | :heavy_minus_sign: | The form used by the company for federal tax filing. One of:
- 941 (Quarterly federal tax return form)
- 944 (Annual federal tax return form) | | `has_ein` | *Optional[bool]* | :heavy_minus_sign: | Whether company's Employer Identification Number (EIN) is present | -| `ein_verified` | *Optional[bool]* | :heavy_minus_sign: | Whether the EIN was able to be verified as a valid EIN with the IRS. | +| `ein_verified` | *Optional[bool]* | :heavy_minus_sign: | Whether the EIN has been successfully verified as a valid EIN with the IRS. | +| `ein_verification` | [Optional[models.EinVerification]](../models/einverification.md) | :heavy_minus_sign: | Information about the status of verifying the company's Employer Identification Number (EIN) | | `legal_name` | *Optional[str]* | :heavy_minus_sign: | The legal name of the company | | `effective_date` | *Optional[str]* | :heavy_minus_sign: | The date that these details took effect. | | `deposit_schedule` | *Optional[str]* | :heavy_minus_sign: | How often the company sends money to the IRS. One of:
- Semiweekly
- Monthly | \ No newline at end of file diff --git a/gusto_embedded/docs/models/federaltaxdetailsstatus.md b/gusto_embedded/docs/models/federaltaxdetailsstatus.md new file mode 100644 index 00000000..04b78b39 --- /dev/null +++ b/gusto_embedded/docs/models/federaltaxdetailsstatus.md @@ -0,0 +1,15 @@ +# FederalTaxDetailsStatus + +The status of EIN verification: +- `pending`: The EIN verification process has not completed (or the company does not yet have an EIN). +- `verified`: The EIN has been successfully verified as a valid EIN with the IRS. +- `failed`: The company's EIN did not pass verification. Common issues are being entered incorrectly or not matching the company's legal name. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PENDING` | pending | +| `VERIFIED` | verified | +| `FAILED` | failed | \ No newline at end of file diff --git a/gusto_embedded/docs/models/filetype.md b/gusto_embedded/docs/models/filetype.md index d314c20c..d69a414f 100644 --- a/gusto_embedded/docs/models/filetype.md +++ b/gusto_embedded/docs/models/filetype.md @@ -8,4 +8,5 @@ The type of file to generate | Name | Value | | ------ | ------ | | `CSV` | csv | -| `JSON` | json | \ No newline at end of file +| `JSON` | json | +| `PDF` | pdf | \ No newline at end of file diff --git a/gusto_embedded/docs/models/generalledgerreport.md b/gusto_embedded/docs/models/generalledgerreport.md new file mode 100644 index 00000000..f682be30 --- /dev/null +++ b/gusto_embedded/docs/models/generalledgerreport.md @@ -0,0 +1,13 @@ +# GeneralLedgerReport + +Successful response for general ledger report generation + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll record for which the report was generated | +| `aggregation` | [Optional[models.Aggregation]](../models/aggregation.md) | :heavy_minus_sign: | The breakdown level used for the report | +| `integration_type` | [OptionalNullable[models.IntegrationType]](../models/integrationtype.md) | :heavy_minus_sign: | The `integration_type` used for the report, if `aggregation` was 'integration.' Otherwise, this will be null. | +| `request_uuid` | *Optional[str]* | :heavy_minus_sign: | UUID to use for polling the report status | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md b/gusto_embedded/docs/models/getcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md new file mode 100644 index 00000000..8004024f --- /dev/null +++ b/gusto_embedded/docs/models/getcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getcompaniescompanyuuidsuspensionsrequest.md b/gusto_embedded/docs/models/getcompaniescompanyuuidsuspensionsrequest.md index fb8b708d..37491866 100644 --- a/gusto_embedded/docs/models/getcompaniescompanyuuidsuspensionsrequest.md +++ b/gusto_embedded/docs/models/getcompaniescompanyuuidsuspensionsrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion]](../models/getcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getcompanynotificationsheaderxgustoapiversion.md b/gusto_embedded/docs/models/getcompanynotificationsheaderxgustoapiversion.md new file mode 100644 index 00000000..a479c0fc --- /dev/null +++ b/gusto_embedded/docs/models/getcompanynotificationsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetCompanyNotificationsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getcompanynotificationsrequest.md b/gusto_embedded/docs/models/getcompanynotificationsrequest.md new file mode 100644 index 00000000..637a1ff0 --- /dev/null +++ b/gusto_embedded/docs/models/getcompanynotificationsrequest.md @@ -0,0 +1,12 @@ +# GetCompanyNotificationsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company for which you would like to return notifications | +| `status` | [Optional[models.QueryParamStatus]](../models/queryparamstatus.md) | :heavy_minus_sign: | N/A | +| `x_gusto_api_version` | [Optional[models.GetCompanyNotificationsHeaderXGustoAPIVersion]](../models/getcompanynotificationsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getreportsrequestuuidrequest.md b/gusto_embedded/docs/models/getreportsrequestuuidrequest.md new file mode 100644 index 00000000..3cd358e0 --- /dev/null +++ b/gusto_embedded/docs/models/getreportsrequestuuidrequest.md @@ -0,0 +1,9 @@ +# GetReportsRequestUUIDRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `request_uuid` | *str* | :heavy_check_mark: | The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint. | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidbankaccountsheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1companiescompanyidbankaccountsheaderxgustoapiversion.md new file mode 100644 index 00000000..33cbe180 --- /dev/null +++ b/gusto_embedded/docs/models/getv1companiescompanyidbankaccountsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidbankaccountsrequest.md b/gusto_embedded/docs/models/getv1companiescompanyidbankaccountsrequest.md index 7f91797a..af1f4030 100644 --- a/gusto_embedded/docs/models/getv1companiescompanyidbankaccountsrequest.md +++ b/gusto_embedded/docs/models/getv1companiescompanyidbankaccountsrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion]](../models/getv1companiescompanyidbankaccountsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md new file mode 100644 index 00000000..a6592205 --- /dev/null +++ b/gusto_embedded/docs/models/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidcontractorpaymentgroupsrequest.md b/gusto_embedded/docs/models/getv1companiescompanyidcontractorpaymentgroupsrequest.md index 9da79c5a..9e83cb0d 100644 --- a/gusto_embedded/docs/models/getv1companiescompanyidcontractorpaymentgroupsrequest.md +++ b/gusto_embedded/docs/models/getv1companiescompanyidcontractorpaymentgroupsrequest.md @@ -10,4 +10,4 @@ | `end_date` | *Optional[str]* | :heavy_minus_sign: | The time period for which to retrieve contractor payment groups. Defaults to today's date. | 2020-12-31 | | `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | | `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion]](../models/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md new file mode 100644 index 00000000..22f14cd7 --- /dev/null +++ b/gusto_embedded/docs/models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidcontractorspaymentdetailsrequest.md b/gusto_embedded/docs/models/getv1companiescompanyidcontractorspaymentdetailsrequest.md new file mode 100644 index 00000000..0d986047 --- /dev/null +++ b/gusto_embedded/docs/models/getv1companiescompanyidcontractorspaymentdetailsrequest.md @@ -0,0 +1,11 @@ +# GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company. This identifies the company whose contractor payment details you want to retrieve. | +| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor. | +| `contractor_payment_group_uuid` | *Optional[str]* | :heavy_minus_sign: | Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group. | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion]](../models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1companiescompanyidcontractorpaymentgroupsrequest.md b/gusto_embedded/docs/models/getv1companiescompanyidemployeespaymentdetailsrequest.md similarity index 69% rename from gusto_app_int/docs/models/getv1companiescompanyidcontractorpaymentgroupsrequest.md rename to gusto_embedded/docs/models/getv1companiescompanyidemployeespaymentdetailsrequest.md index 9da79c5a..8148a32d 100644 --- a/gusto_app_int/docs/models/getv1companiescompanyidcontractorpaymentgroupsrequest.md +++ b/gusto_embedded/docs/models/getv1companiescompanyidemployeespaymentdetailsrequest.md @@ -1,13 +1,13 @@ -# GetV1CompaniesCompanyIDContractorPaymentGroupsRequest +# GetV1CompaniesCompanyIDEmployeesPaymentDetailsRequest ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | -| `start_date` | *Optional[str]* | :heavy_minus_sign: | The time period for which to retrieve contractor payment groups. Defaults to 6 months ago. | 2020-01-01 | -| `end_date` | *Optional[str]* | :heavy_minus_sign: | The time period for which to retrieve contractor payment groups. Defaults to today's date. | 2020-12-31 | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | -| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of a specific employee to fetch payment details for. | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of a specific payroll to fetch payment details for employees on that payroll. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidemployeesrequest.md b/gusto_embedded/docs/models/getv1companiescompanyidemployeesrequest.md index ea7eb735..b99cf41e 100644 --- a/gusto_embedded/docs/models/getv1companiescompanyidemployeesrequest.md +++ b/gusto_embedded/docs/models/getv1companiescompanyidemployeesrequest.md @@ -3,12 +3,19 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion]](../models/getv1companiescompanyidemployeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | -| `include` | List[[models.Include](../models/include.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options:
- all_compensations: Include all effective dated compensations for each job instead of only the current compensation
- custom_fields: Include employees' custom fields
| -| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by the provided boolean | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | -| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion]](../models/getv1companiescompanyidemployeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Filter employees by a specific primary work location | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | Filter employees by a specific payroll | +| `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | +| `sort_by` | *Optional[str]* | :heavy_minus_sign: | Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status | +| `include` | List[[models.Include](../models/include.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response. Multiple options are comma separated. | +| `onboarded` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have completed onboarding | +| `onboarded_active` | *Optional[bool]* | :heavy_minus_sign: | Filters employees who are ready to work (onboarded AND active today) | +| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have been or are scheduled to be terminated | +| `terminated_today` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated) | +| `uuids` | List[*str*] | :heavy_minus_sign: | Optional subset of employees to fetch. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md new file mode 100644 index 00000000..b5b72dc8 --- /dev/null +++ b/gusto_embedded/docs/models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md new file mode 100644 index 00000000..b6df5d8f --- /dev/null +++ b/gusto_embedded/docs/models/getv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidpayrollsidpartnerdisbursementsrequest.md b/gusto_embedded/docs/models/getv1companiescompanyidpayrollsidpartnerdisbursementsrequest.md new file mode 100644 index 00000000..1dcfd430 --- /dev/null +++ b/gusto_embedded/docs/models/getv1companiescompanyidpayrollsidpartnerdisbursementsrequest.md @@ -0,0 +1,10 @@ +# GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `id` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion]](../models/getv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md new file mode 100644 index 00000000..e1bfc227 --- /dev/null +++ b/gusto_embedded/docs/models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md b/gusto_embedded/docs/models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md index 011e6a4d..d07fadaa 100644 --- a/gusto_embedded/docs/models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md +++ b/gusto_embedded/docs/models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md @@ -8,4 +8,8 @@ | `BENEFITS` | benefits | | `DEDUCTIONS` | deductions | | `TAXES` | taxes | -| `PAYROLL_STATUS_META` | payroll_status_meta | \ No newline at end of file +| `PAYROLL_STATUS_META` | payroll_status_meta | +| `TOTALS` | totals | +| `RISK_BLOCKERS` | risk_blockers | +| `REVERSALS` | reversals | +| `PAYROLL_TAXES` | payroll_taxes | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidpayrollspayrollidrequest.md b/gusto_embedded/docs/models/getv1companiescompanyidpayrollspayrollidrequest.md index b3cacb14..76524668 100644 --- a/gusto_embedded/docs/models/getv1companiescompanyidpayrollspayrollidrequest.md +++ b/gusto_embedded/docs/models/getv1companiescompanyidpayrollspayrollidrequest.md @@ -7,5 +7,8 @@ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion]](../models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `include` | List[[models.GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude](../models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `sort_by` | [Optional[models.SortBy]](../models/sortby.md) | :heavy_minus_sign: | Field to sort employee compensations by | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidpayrollsqueryparaminclude.md b/gusto_embedded/docs/models/getv1companiescompanyidpayrollsqueryparaminclude.md index a33c2e1c..3027acaa 100644 --- a/gusto_embedded/docs/models/getv1companiescompanyidpayrollsqueryparaminclude.md +++ b/gusto_embedded/docs/models/getv1companiescompanyidpayrollsqueryparaminclude.md @@ -5,7 +5,8 @@ | Name | Value | | --------------------- | --------------------- | -| `TOTALS` | totals | +| `TAXES` | taxes | | `PAYROLL_STATUS_META` | payroll_status_meta | +| `TOTALS` | totals | | `RISK_BLOCKERS` | risk_blockers | | `REVERSALS` | reversals | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyidpayrollsrequest.md b/gusto_embedded/docs/models/getv1companiescompanyidpayrollsrequest.md index bafb9fcf..a9dcfe9d 100644 --- a/gusto_embedded/docs/models/getv1companiescompanyidpayrollsrequest.md +++ b/gusto_embedded/docs/models/getv1companiescompanyidpayrollsrequest.md @@ -3,15 +3,17 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | -| `processing_statuses` | List[[models.ProcessingStatuses](../models/processingstatuses.md)] | :heavy_minus_sign: | Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` | | -| `payroll_types` | List[[models.PayrollTypes](../models/payrolltypes.md)] | :heavy_minus_sign: | Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` | | -| `include` | List[[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude](../models/getv1companiescompanyidpayrollsqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta` | | -| `start_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is after the start date | | -| `end_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. | | -| `sort_order` | [Optional[models.SortOrder]](../models/sortorder.md) | :heavy_minus_sign: | A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. | asc | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | -| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `processing_statuses` | List[[models.ProcessingStatuses](../models/processingstatuses.md)] | :heavy_minus_sign: | Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` | | +| `payroll_types` | List[[models.PayrollTypes](../models/payrolltypes.md)] | :heavy_minus_sign: | Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` | | +| `processed` | *Optional[bool]* | :heavy_minus_sign: | Whether to return processed or unprocessed payrolls | | +| `include_off_cycle` | *Optional[bool]* | :heavy_minus_sign: | Whether to include off cycle payrolls in the response | | +| `include` | List[[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude](../models/getv1companiescompanyidpayrollsqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` | | +| `start_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is after the start date | 2020-01-31 | +| `end_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. | 2020-01-31 | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | +| `sort_order` | [Optional[models.QueryParamSortOrder]](../models/queryparamsortorder.md) | :heavy_minus_sign: | A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. | asc | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companiescompanyuuidcontractorsrequest.md b/gusto_embedded/docs/models/getv1companiescompanyuuidcontractorsrequest.md index 13d619bf..41df2dc9 100644 --- a/gusto_embedded/docs/models/getv1companiescompanyuuidcontractorsrequest.md +++ b/gusto_embedded/docs/models/getv1companiescompanyuuidcontractorsrequest.md @@ -9,4 +9,5 @@ | `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | +| `sort_by` | [Optional[models.ContractorsSortBy]](../models/contractorssortby.md) | :heavy_minus_sign: | Sort contractors. Options: type, onboarding_status, name, created_at | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md b/gusto_embedded/docs/models/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md similarity index 92% rename from gusto_app_int/docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md rename to gusto_embedded/docs/models/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md index d1e43cc4..61bb9efb 100644 --- a/gusto_app_int/docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md +++ b/gusto_embedded/docs/models/getv1companybenefitscompanybenefitidcontributionexclusionsrequest.md @@ -1,9 +1,9 @@ -# GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest +# GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest ## Fields | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contractor_payment_group_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | +| `company_benefit_id` | *str* | :heavy_check_mark: | The UUID of the company benefit | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1companyformsrequest.md b/gusto_embedded/docs/models/getv1companyformsrequest.md index 810960e8..57d63bd3 100644 --- a/gusto_embedded/docs/models/getv1companyformsrequest.md +++ b/gusto_embedded/docs/models/getv1companyformsrequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `sort_by` | [Optional[models.CompanyFormsSortBy]](../models/companyformssortby.md) | :heavy_minus_sign: | Sort company forms. Options: name, year, quarter, draft, document_content_type | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1contractordocumentpdfrequest.md b/gusto_embedded/docs/models/getv1contractordocumentpdfrequest.md index e9b5d891..77f59df0 100644 --- a/gusto_embedded/docs/models/getv1contractordocumentpdfrequest.md +++ b/gusto_embedded/docs/models/getv1contractordocumentpdfrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `document_uuid` | *str* | :heavy_check_mark: | The ID or UUID of the document | +| `document_uuid` | *str* | :heavy_check_mark: | The UUID of the document | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1contractordocumentrequest.md b/gusto_embedded/docs/models/getv1contractordocumentrequest.md index b02862ca..bd423763 100644 --- a/gusto_embedded/docs/models/getv1contractordocumentrequest.md +++ b/gusto_embedded/docs/models/getv1contractordocumentrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `document_uuid` | *str* | :heavy_check_mark: | The ID or UUID of the document | +| `document_uuid` | *str* | :heavy_check_mark: | The UUID of the document | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md new file mode 100644 index 00000000..79f000d9 --- /dev/null +++ b/gusto_embedded/docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md b/gusto_embedded/docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md index d1e43cc4..b96ae30f 100644 --- a/gusto_embedded/docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md +++ b/gusto_embedded/docs/models/getv1contractorpaymentgroupscontractorpaymentgroupidrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contractor_payment_group_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion]](../models/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md new file mode 100644 index 00000000..59d0ae95 --- /dev/null +++ b/gusto_embedded/docs/models/getv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1contractorpaymentgroupsidpartnerdisbursementsrequest.md b/gusto_embedded/docs/models/getv1contractorpaymentgroupsidpartnerdisbursementsrequest.md new file mode 100644 index 00000000..c73f4965 --- /dev/null +++ b/gusto_embedded/docs/models/getv1contractorpaymentgroupsidpartnerdisbursementsrequest.md @@ -0,0 +1,9 @@ +# GetV1ContractorPaymentGroupsIDPartnerDisbursementsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | +| `x_gusto_api_version` | [Optional[models.GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion]](../models/getv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md new file mode 100644 index 00000000..5112b545 --- /dev/null +++ b/gusto_embedded/docs/models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1employeesemployeeidhomeaddressesrequest.md b/gusto_embedded/docs/models/getv1employeesemployeeidhomeaddressesrequest.md index 2ff4c4f1..25bcddc3 100644 --- a/gusto_embedded/docs/models/getv1employeesemployeeidhomeaddressesrequest.md +++ b/gusto_embedded/docs/models/getv1employeesemployeeidhomeaddressesrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion]](../models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md new file mode 100644 index 00000000..ab32f2da --- /dev/null +++ b/gusto_embedded/docs/models/getv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1employeesemployeeidrecurringreimbursementsrequest.md b/gusto_embedded/docs/models/getv1employeesemployeeidrecurringreimbursementsrequest.md new file mode 100644 index 00000000..8f9f01fd --- /dev/null +++ b/gusto_embedded/docs/models/getv1employeesemployeeidrecurringreimbursementsrequest.md @@ -0,0 +1,11 @@ +# GetV1EmployeesEmployeeIDRecurringReimbursementsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion]](../models/getv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1employeesemployeeidrecurringreimbursementsresponsebody.md b/gusto_embedded/docs/models/getv1employeesemployeeidrecurringreimbursementsresponsebody.md new file mode 100644 index 00000000..8280dbcd --- /dev/null +++ b/gusto_embedded/docs/models/getv1employeesemployeeidrecurringreimbursementsresponsebody.md @@ -0,0 +1,14 @@ +# GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *str* | :heavy_check_mark: | N/A | +| `employee_uuid` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `amount` | *str* | :heavy_check_mark: | N/A | +| `version` | *str* | :heavy_check_mark: | N/A | +| `created_at` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `updated_at` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1employeesemployeeidstatetaxesheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1employeesemployeeidstatetaxesheaderxgustoapiversion.md new file mode 100644 index 00000000..7216ebf4 --- /dev/null +++ b/gusto_embedded/docs/models/getv1employeesemployeeidstatetaxesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1employeesemployeeidstatetaxesrequest.md b/gusto_embedded/docs/models/getv1employeesemployeeidstatetaxesrequest.md index a5a9882d..85e633a1 100644 --- a/gusto_embedded/docs/models/getv1employeesemployeeidstatetaxesrequest.md +++ b/gusto_embedded/docs/models/getv1employeesemployeeidstatetaxesrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_uuid` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion]](../models/getv1employeesemployeeidstatetaxesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `employee_uuid` | *str* | :heavy_check_mark: | The UUID of the employee | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md new file mode 100644 index 00000000..89fe3aff --- /dev/null +++ b/gusto_embedded/docs/models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1employeesemployeeidworkaddressesrequest.md b/gusto_embedded/docs/models/getv1employeesemployeeidworkaddressesrequest.md index 9b2ab972..00b143d5 100644 --- a/gusto_embedded/docs/models/getv1employeesemployeeidworkaddressesrequest.md +++ b/gusto_embedded/docs/models/getv1employeesemployeeidworkaddressesrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion]](../models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1employeesemployeeuuidpaystubsrequest.md b/gusto_embedded/docs/models/getv1employeesemployeeuuidpaystubsrequest.md index 19789eff..60dc2c30 100644 --- a/gusto_embedded/docs/models/getv1employeesemployeeuuidpaystubsrequest.md +++ b/gusto_embedded/docs/models/getv1employeesemployeeuuidpaystubsrequest.md @@ -6,4 +6,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion]](../models/getv1employeesemployeeuuidpaystubsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | \ No newline at end of file +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1employeesrequest.md b/gusto_embedded/docs/models/getv1employeesrequest.md index 96d55258..dfe81991 100644 --- a/gusto_embedded/docs/models/getv1employeesrequest.md +++ b/gusto_embedded/docs/models/getv1employeesrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `x_gusto_api_version` | [Optional[models.GetV1EmployeesHeaderXGustoAPIVersion]](../models/getv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `include` | List[[models.QueryParamInclude](../models/queryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options:
- all_compensations: Include all effective dated compensations for each job instead of only the current compensation
- custom_fields: Include employees' custom fields
| \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesHeaderXGustoAPIVersion]](../models/getv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `include` | List[[models.QueryParamInclude](../models/queryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response. Multiple options are comma separated. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..15d62271 --- /dev/null +++ b/gusto_embedded/docs/models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1homeaddresseshomeaddressuuidrequest.md b/gusto_embedded/docs/models/getv1homeaddresseshomeaddressuuidrequest.md index 273f19de..654451d4 100644 --- a/gusto_embedded/docs/models/getv1homeaddresseshomeaddressuuidrequest.md +++ b/gusto_embedded/docs/models/getv1homeaddresseshomeaddressuuidrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1paymentreceiptspayrollspayrolluuidheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1paymentreceiptspayrollspayrolluuidheaderxgustoapiversion.md new file mode 100644 index 00000000..32ef2264 --- /dev/null +++ b/gusto_embedded/docs/models/getv1paymentreceiptspayrollspayrolluuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1paymentreceiptspayrollspayrolluuidrequest.md b/gusto_embedded/docs/models/getv1paymentreceiptspayrollspayrolluuidrequest.md index 6b49eff2..67b2b441 100644 --- a/gusto_embedded/docs/models/getv1paymentreceiptspayrollspayrolluuidrequest.md +++ b/gusto_embedded/docs/models/getv1paymentreceiptspayrollspayrolluuidrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `payroll_uuid` | *str* | :heavy_check_mark: | The UUID of the payroll | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion]](../models/getv1paymentreceiptspayrollspayrolluuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1recurringreimbursementsheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1recurringreimbursementsheaderxgustoapiversion.md new file mode 100644 index 00000000..56fc9f9f --- /dev/null +++ b/gusto_embedded/docs/models/getv1recurringreimbursementsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1RecurringReimbursementsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1recurringreimbursementsrequest.md b/gusto_embedded/docs/models/getv1recurringreimbursementsrequest.md new file mode 100644 index 00000000..66725ada --- /dev/null +++ b/gusto_embedded/docs/models/getv1recurringreimbursementsrequest.md @@ -0,0 +1,9 @@ +# GetV1RecurringReimbursementsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.GetV1RecurringReimbursementsHeaderXGustoAPIVersion]](../models/getv1recurringreimbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `id` | *str* | :heavy_check_mark: | The UUID of the reimbursement | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1recurringreimbursementsresponsebody.md b/gusto_embedded/docs/models/getv1recurringreimbursementsresponsebody.md new file mode 100644 index 00000000..04829b0b --- /dev/null +++ b/gusto_embedded/docs/models/getv1recurringreimbursementsresponsebody.md @@ -0,0 +1,16 @@ +# GetV1RecurringReimbursementsResponseBody + +successful + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *str* | :heavy_check_mark: | N/A | +| `employee_uuid` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `amount` | *str* | :heavy_check_mark: | N/A | +| `version` | *str* | :heavy_check_mark: | N/A | +| `created_at` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `updated_at` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1salaryestimatesidheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1salaryestimatesidheaderxgustoapiversion.md new file mode 100644 index 00000000..d1f59c2f --- /dev/null +++ b/gusto_embedded/docs/models/getv1salaryestimatesidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1SalaryEstimatesIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1salaryestimatesidrequest.md b/gusto_embedded/docs/models/getv1salaryestimatesidrequest.md new file mode 100644 index 00000000..6f284f74 --- /dev/null +++ b/gusto_embedded/docs/models/getv1salaryestimatesidrequest.md @@ -0,0 +1,9 @@ +# GetV1SalaryEstimatesIDRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.GetV1SalaryEstimatesIDHeaderXGustoAPIVersion]](../models/getv1salaryestimatesidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the salary estimate | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1salaryestimatesoccupationsheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1salaryestimatesoccupationsheaderxgustoapiversion.md new file mode 100644 index 00000000..b08238a1 --- /dev/null +++ b/gusto_embedded/docs/models/getv1salaryestimatesoccupationsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1salaryestimatesoccupationsrequest.md b/gusto_embedded/docs/models/getv1salaryestimatesoccupationsrequest.md new file mode 100644 index 00000000..f3adabde --- /dev/null +++ b/gusto_embedded/docs/models/getv1salaryestimatesoccupationsrequest.md @@ -0,0 +1,9 @@ +# GetV1SalaryEstimatesOccupationsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion]](../models/getv1salaryestimatesoccupationsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `search` | *str* | :heavy_check_mark: | Search term for occupation (minimum 3 characters) | software | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1salaryestimatesoccupationssecurity.md b/gusto_embedded/docs/models/getv1salaryestimatesoccupationssecurity.md new file mode 100644 index 00000000..5429421d --- /dev/null +++ b/gusto_embedded/docs/models/getv1salaryestimatesoccupationssecurity.md @@ -0,0 +1,8 @@ +# GetV1SalaryEstimatesOccupationsSecurity + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `system_access_auth` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1webhookshealthcheckheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1webhookshealthcheckheaderxgustoapiversion.md new file mode 100644 index 00000000..b31b7f0b --- /dev/null +++ b/gusto_embedded/docs/models/getv1webhookshealthcheckheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1WebhooksHealthCheckHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1webhookshealthcheckrequest.md b/gusto_embedded/docs/models/getv1webhookshealthcheckrequest.md new file mode 100644 index 00000000..0cfc5bc5 --- /dev/null +++ b/gusto_embedded/docs/models/getv1webhookshealthcheckrequest.md @@ -0,0 +1,8 @@ +# GetV1WebhooksHealthCheckRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion]](../models/getv1webhookshealthcheckheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1webhookshealthchecksecurity.md b/gusto_embedded/docs/models/getv1webhookshealthchecksecurity.md new file mode 100644 index 00000000..1bad80f5 --- /dev/null +++ b/gusto_embedded/docs/models/getv1webhookshealthchecksecurity.md @@ -0,0 +1,8 @@ +# GetV1WebhooksHealthCheckSecurity + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `system_access_auth` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md b/gusto_embedded/docs/models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..45769422 --- /dev/null +++ b/gusto_embedded/docs/models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/getv1workaddressesworkaddressuuidrequest.md b/gusto_embedded/docs/models/getv1workaddressesworkaddressuuidrequest.md index bc62296e..7888f203 100644 --- a/gusto_embedded/docs/models/getv1workaddressesworkaddressuuidrequest.md +++ b/gusto_embedded/docs/models/getv1workaddressesworkaddressuuidrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/include.md b/gusto_embedded/docs/models/include.md index 40441b91..b553da44 100644 --- a/gusto_embedded/docs/models/include.md +++ b/gusto_embedded/docs/models/include.md @@ -3,8 +3,11 @@ ## Values -| Name | Value | -| ------------------- | ------------------- | -| `CUSTOM_FIELDS` | custom_fields | -| `ALL_COMPENSATIONS` | all_compensations | -| `COMPANY_NAME` | company_name | \ No newline at end of file +| Name | Value | +| ---------------------- | ---------------------- | +| `ALL_COMPENSATIONS` | all_compensations | +| `ALL_HOME_ADDRESSES` | all_home_addresses | +| `COMPANY_NAME` | company_name | +| `CURRENT_HOME_ADDRESS` | current_home_address | +| `CUSTOM_FIELDS` | custom_fields | +| `PORTAL_INVITATIONS` | portal_invitations | \ No newline at end of file diff --git a/gusto_embedded/docs/models/informationrequest.md b/gusto_embedded/docs/models/informationrequest.md index beaee49e..1434ac1b 100644 --- a/gusto_embedded/docs/models/informationrequest.md +++ b/gusto_embedded/docs/models/informationrequest.md @@ -9,6 +9,6 @@ Representation of an information request | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | | `uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of an information request | | `company_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the company to which the information requests belongs | -| `type` | [Optional[models.InformationRequestType]](../models/informationrequesttype.md) | :heavy_minus_sign: | The type of information request | +| `type` | [OptionalNullable[models.InformationRequestType]](../models/informationrequesttype.md) | :heavy_minus_sign: | The type of information request | | `status` | [Optional[models.InformationRequestStatus]](../models/informationrequeststatus.md) | :heavy_minus_sign: | The status of the information request | | `blocking_payroll` | *Optional[bool]* | :heavy_minus_sign: | If true, this information request is blocking payroll, and may require response or requires review from our Risk Ops team. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/integrationtype.md b/gusto_embedded/docs/models/integrationtype.md new file mode 100644 index 00000000..84e9b113 --- /dev/null +++ b/gusto_embedded/docs/models/integrationtype.md @@ -0,0 +1,11 @@ +# IntegrationType + +The `integration_type` used for the report, if `aggregation` was 'integration.' Otherwise, this will be null. + + +## Values + +| Name | Value | +| ------ | ------ | +| `XERO` | xero | +| `QBO` | qbo | \ No newline at end of file diff --git a/gusto_embedded/docs/models/job.md b/gusto_embedded/docs/models/job.md index 834f7f84..626f482f 100644 --- a/gusto_embedded/docs/models/job.md +++ b/gusto_embedded/docs/models/job.md @@ -19,4 +19,6 @@ The representation of a job in Gusto. | `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee owns at least 2% of the company. | | `state_wc_covered` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether this job is eligible for workers' compensation coverage in the state of Washington (WA). | | `state_wc_class_code` | *OptionalNullable[str]* | :heavy_minus_sign: | The risk class code for workers' compensation in Washington state. Please visit [Washington state's Risk Class page](https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/) to learn more. | -| `compensations` | List[[models.Compensation](../models/compensation.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `compensations` | List[[models.Compensation](../models/compensation.md)] | :heavy_minus_sign: | N/A | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | The uuid of the employee's work location. | +| `location` | [Optional[models.Location]](../models/location.md) | :heavy_minus_sign: | The representation of an address in Gusto. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/leavingfor.md b/gusto_embedded/docs/models/leavingfor.md index 5c06701d..fc5733bd 100644 --- a/gusto_embedded/docs/models/leavingfor.md +++ b/gusto_embedded/docs/models/leavingfor.md @@ -1,18 +1,24 @@ # LeavingFor -Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`. +The competitor the company is switching to. Required if `reason` is `'switching_provider'`. + +> 🚧 Switching to Gusto requires Customer Support +> If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. + ## Values | Name | Value | | ------------------------------- | ------------------------------- | -| `APD` | apd | -| `ADP_TOTAL_SOURCE` | adp_total_source | | `ACCOUNTANT` | accountant | +| `ADP` | adp | +| `ADP_TOTAL_SOURCE` | adp_total_source | | `BAMBOO_HR` | bamboo_hr | | `BANK_OR_FINANCIAL_INSTITUTION` | bank_or_financial_institution | | `CHECK` | check | +| `GUSTO_COM` | gusto_com | +| `HOMEBASE` | homebase | | `INSPERITY` | insperity | | `INTUIT_OR_QUICKBOOKS` | intuit_or_quickbooks | | `JUSTWORKS` | justworks | @@ -21,6 +27,7 @@ Which competitor the company is joining instead. Required if `reason` is `'switc | `ONPAY` | onpay | | `OTHER` | other | | `PATRIOT` | patriot | +| `PAYCHEX` | paychex | | `PAYCOM` | paycom | | `PAYLOCITY` | paylocity | | `RIPPLING` | rippling | diff --git a/gusto_embedded/docs/models/location.md b/gusto_embedded/docs/models/location.md index 485dff73..ec5b2c55 100644 --- a/gusto_embedded/docs/models/location.md +++ b/gusto_embedded/docs/models/location.md @@ -17,8 +17,9 @@ The representation of an address in Gusto. | `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | `zip` | *Optional[str]* | :heavy_minus_sign: | N/A | | `country` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `active` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | | `mailing_address` | *Optional[bool]* | :heavy_minus_sign: | Specifies if the location is the company's mailing address. Only included if the location belongs to a company. | | `filing_address` | *Optional[bool]* | :heavy_minus_sign: | Specifies if the location is the company's filing address. Only included if the location belongs to a company. | | `created_at` | *Optional[str]* | :heavy_minus_sign: | Datetime for when location is created | -| `updated_at` | *Optional[str]* | :heavy_minus_sign: | Datetime for when location is updated | \ No newline at end of file +| `updated_at` | *Optional[str]* | :heavy_minus_sign: | Datetime for when location is updated | +| `active` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | +| `inactive` | *Optional[bool]* | :heavy_minus_sign: | The status of the location. Inactive locations have been deleted, but may still have historical data associated with them. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/notfounderrorobject.md b/gusto_embedded/docs/models/notfounderrorobject.md new file mode 100644 index 00000000..1cbae829 --- /dev/null +++ b/gusto_embedded/docs/models/notfounderrorobject.md @@ -0,0 +1,12 @@ +# NotFoundErrorObject + +Not Found + +The requested resource does not exist. Make sure the provided ID/UUID is valid. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `errors` | List[[models.EntityErrorObject](../models/entityerrorobject.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/notification.md b/gusto_embedded/docs/models/notification.md index dfd02215..d8536c21 100644 --- a/gusto_embedded/docs/models/notification.md +++ b/gusto_embedded/docs/models/notification.md @@ -1,6 +1,6 @@ # Notification -Representation of a notification +Example response ## Fields @@ -8,14 +8,14 @@ Representation of a notification | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `uuid` | *str* | :heavy_check_mark: | Unique identifier of a notification. | -| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the company to which the notification belongs. | -| `title` | *Optional[str]* | :heavy_minus_sign: | The title of the notification. This highlights the actionable component of the notification. | -| `message` | *Optional[str]* | :heavy_minus_sign: | The message of the notification. This provides additional context for the user and recommends a specific action to resolve the notification. | -| `status` | [Optional[models.NotificationStatus]](../models/notificationstatus.md) | :heavy_minus_sign: | Represents the notification's status as managed by our system. It is updated based on observable system events and internal business logic, and does not reflect resolution steps taken outside our system. This field is read-only and cannot be modified via the API. | -| `category` | *Optional[str]* | :heavy_minus_sign: | The notification's category. | -| `actionable` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether a notification requires action or not. If false, the notification provides critical information only. | -| `can_block_payroll` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether a notification may block ability to run payroll. If true, we suggest that these notifications are prioritized to your end users. | -| `published_at` | *Optional[str]* | :heavy_minus_sign: | Timestamp of when the notification was published. | -| `due_at` | *Optional[str]* | :heavy_minus_sign: | Timestamp of when the notification is due. If the notification has no due date, this field will be null. | +| `company_uuid` | *str* | :heavy_check_mark: | Unique identifier of the company to which the notification belongs. | +| `title` | *str* | :heavy_check_mark: | The title of the notification. This highlights the actionable component of the notification. | +| `message` | *str* | :heavy_check_mark: | The message of the notification. This provides additional context for the user and recommends a specific action to resolve the notification. | +| `status` | [models.NotificationStatus](../models/notificationstatus.md) | :heavy_check_mark: | Represents the notification's status as managed by our system. It is updated based on observable system events and internal business logic, and does not reflect resolution steps taken outside our system. This field is read-only and cannot be modified via the API. | +| `category` | *str* | :heavy_check_mark: | The notification's category. | +| `actionable` | *bool* | :heavy_check_mark: | Indicates whether a notification requires action or not. If false, the notification provides critical information only. | +| `can_block_payroll` | *bool* | :heavy_check_mark: | Indicates whether a notification may block ability to run payroll. If true, we suggest that these notifications are prioritized to your end users. | +| `published_at` | *str* | :heavy_check_mark: | Timestamp of when the notification was published. | +| `due_at` | *Nullable[str]* | :heavy_check_mark: | Timestamp of when the notification is due. If the notification has no due date, this field will be null. | | `template_variables` | Dict[str, *str*] | :heavy_minus_sign: | An object containing template variables used to render the notification. The structure of this object depends on the notification category. Each category defines a fixed set of variable names (keys), which are always present. The values of these variables can vary depending on the specific notification instance. | -| `resources` | List[[models.Resources](../models/resources.md)] | :heavy_minus_sign: | An array of entities relevant to the notification | \ No newline at end of file +| `resources` | List[[models.Resources](../models/resources.md)] | :heavy_check_mark: | An array of entities relevant to the notification | \ No newline at end of file diff --git a/gusto_embedded/docs/models/notificationentitytype.md b/gusto_embedded/docs/models/notificationentitytype.md new file mode 100644 index 00000000..cbe4b65f --- /dev/null +++ b/gusto_embedded/docs/models/notificationentitytype.md @@ -0,0 +1,18 @@ +# NotificationEntityType + +The type of entity being described. + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `BANK_ACCOUNT` | BankAccount | +| `CONTRACTOR` | Contractor | +| `CONTRACTOR_PAYMENT` | ContractorPayment | +| `EMPLOYEE` | Employee | +| `PAYROLL` | Payroll | +| `PAY_SCHEDULE` | PaySchedule | +| `RECOVERY_CASE` | RecoveryCase | +| `SIGNATORY` | Signatory | +| `WIRE_IN_REQUEST` | Wire In Request | \ No newline at end of file diff --git a/gusto_embedded/docs/models/occupations.md b/gusto_embedded/docs/models/occupations.md new file mode 100644 index 00000000..d0399626 --- /dev/null +++ b/gusto_embedded/docs/models/occupations.md @@ -0,0 +1,13 @@ +# Occupations + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `code` | *str* | :heavy_check_mark: | Bureau of Labor Statistics (BLS) occupation code. | +| `name` | *Optional[str]* | :heavy_minus_sign: | Occupation name. | +| `description` | *Optional[str]* | :heavy_minus_sign: | Occupation description. | +| `experience_level` | [models.ExperienceLevel](../models/experiencelevel.md) | :heavy_check_mark: | Experience level for this occupation. | +| `time_percentage` | *str* | :heavy_check_mark: | Percentage of time spent in this occupation (as decimal string, 0-1). | +| `primary` | *Optional[bool]* | :heavy_minus_sign: | Whether this is the primary occupation. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/offcyclereason.md b/gusto_embedded/docs/models/offcyclereason.md index 44a3de6f..8ce1e299 100644 --- a/gusto_embedded/docs/models/offcyclereason.md +++ b/gusto_embedded/docs/models/offcyclereason.md @@ -9,5 +9,6 @@ An off cycle payroll reason. Select one from the following list. | ---------------------------------- | ---------------------------------- | | `BONUS` | Bonus | | `CORRECTION` | Correction | +| `ADHOC` | Adhoc | | `DISMISSED_EMPLOYEE` | Dismissed employee | | `TRANSITION_FROM_OLD_PAY_SCHEDULE` | Transition from old pay schedule | \ No newline at end of file diff --git a/gusto_embedded/docs/models/onboardingstep.md b/gusto_embedded/docs/models/onboardingstep.md index d909a6f2..114bf3c5 100644 --- a/gusto_embedded/docs/models/onboardingstep.md +++ b/gusto_embedded/docs/models/onboardingstep.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `title` | *Optional[str]* | :heavy_minus_sign: | The display name of the onboarding step | -| `id` | [Optional[models.ID]](../models/id.md) | :heavy_minus_sign: | The string identifier for each onboarding step | -| `required` | *Optional[bool]* | :heavy_minus_sign: | The boolean flag indicating whether the step is required or optional | -| `completed` | *Optional[bool]* | :heavy_minus_sign: | The boolean flag indicating whether the step is completed or not. | -| `skippable` | *Optional[bool]* | :heavy_minus_sign: | The boolean flag indicating whether the step can be skipped or not. | -| `requirements` | List[[models.Requirements](../models/requirements.md)] | :heavy_minus_sign: | A list of onboarding step that are required to be completed in order to proceed with the current onboarding step. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `title` | *Optional[str]* | :heavy_minus_sign: | The display name of the onboarding step | +| `id` | [Optional[models.ID]](../models/id.md) | :heavy_minus_sign: | The string identifier for each onboarding step | +| `required` | *Optional[bool]* | :heavy_minus_sign: | The boolean flag indicating whether the step is required or optional | +| `completed` | *Optional[bool]* | :heavy_minus_sign: | The boolean flag indicating whether the step is completed or not. | +| `completed_at` | *OptionalNullable[str]* | :heavy_minus_sign: | The ISO 8601 timestamp indicating when the onboarding step was completed. | +| `skippable` | *Optional[bool]* | :heavy_minus_sign: | The boolean flag indicating whether the step can be skipped or not. | +| `requirements` | List[[models.Requirements](../models/requirements.md)] | :heavy_minus_sign: | A list of onboarding steps that are required to be completed in order to proceed with the current onboarding step. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/paidholidays.md b/gusto_embedded/docs/models/paidholidays.md index 69cfac76..70b14bd8 100644 --- a/gusto_embedded/docs/models/paidholidays.md +++ b/gusto_embedded/docs/models/paidholidays.md @@ -1,6 +1,6 @@ # PaidHolidays -Representation of a company's paid holidays as descibed by their Holiday Pay Policy +Representation of a company's paid holidays as described by their Holiday Pay Policy ## Fields diff --git a/gusto_embedded/docs/models/paidtimeoff.md b/gusto_embedded/docs/models/paidtimeoff.md index 75e44127..b8deedb3 100644 --- a/gusto_embedded/docs/models/paidtimeoff.md +++ b/gusto_embedded/docs/models/paidtimeoff.md @@ -7,13 +7,13 @@ The representation of paid time off in Gusto. | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `name` | [Optional[models.Name]](../models/name.md) | :heavy_minus_sign: | The name of the paid time off type. | | -| `policy_name` | *Optional[str]* | :heavy_minus_sign: | The name of the time off policy. | | -| `policy_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the time off policy. | | -| `accrual_unit` | *Optional[str]* | :heavy_minus_sign: | The unit the PTO type is accrued in. | Hour | -| `accrual_rate` | *Optional[str]* | :heavy_minus_sign: | The number of accrual units accrued per accrual period. | | -| `accrual_method` | *Optional[str]* | :heavy_minus_sign: | The accrual method of the time off policy | unlimited | -| `accrual_period` | *Optional[str]* | :heavy_minus_sign: | The frequency at which the PTO type is accrued. | Year | -| `accrual_balance` | *Optional[str]* | :heavy_minus_sign: | The number of accrual units accrued. | | +| `name` | [OptionalNullable[models.Name]](../models/name.md) | :heavy_minus_sign: | The name of the paid time off type. | | +| `policy_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the time off policy. | | +| `policy_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the time off policy. | | +| `accrual_unit` | *OptionalNullable[str]* | :heavy_minus_sign: | The unit the PTO type is accrued in. | Hour | +| `accrual_rate` | *OptionalNullable[str]* | :heavy_minus_sign: | The number of accrual units accrued per accrual period. | | +| `accrual_method` | *OptionalNullable[str]* | :heavy_minus_sign: | The accrual method of the time off policy | unlimited | +| `accrual_period` | *OptionalNullable[str]* | :heavy_minus_sign: | The frequency at which the PTO type is accrued. | Year | +| `accrual_balance` | *OptionalNullable[str]* | :heavy_minus_sign: | The number of accrual units accrued. | | | `maximum_accrual_balance` | *OptionalNullable[str]* | :heavy_minus_sign: | The maximum number of accrual units allowed. A null value signifies no maximum. | | | `paid_at_termination` | *Optional[bool]* | :heavy_minus_sign: | Whether the accrual balance is paid to the employee upon termination. | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsdisbursements.md b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsdisbursements.md new file mode 100644 index 00000000..c1c15d6c --- /dev/null +++ b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsdisbursements.md @@ -0,0 +1,10 @@ +# PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_uuid` | *str* | :heavy_check_mark: | UUID of the employee | 1a2b3c4d-5e6f-7890-abcd-ef1234567890 | +| `payment_method` | [Optional[models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentMethod]](../models/patchv1companiescompanyidpayrollsidpartnerdisbursementspaymentmethod.md) | :heavy_minus_sign: | Payment method for the employee | | +| `payment_status` | [Optional[models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentStatus]](../models/patchv1companiescompanyidpayrollsidpartnerdisbursementspaymentstatus.md) | :heavy_minus_sign: | Status of the payment disbursement | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md new file mode 100644 index 00000000..3e3cb301 --- /dev/null +++ b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementspaymentmethod.md b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementspaymentmethod.md new file mode 100644 index 00000000..c94f11ca --- /dev/null +++ b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementspaymentmethod.md @@ -0,0 +1,11 @@ +# PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentMethod + +Payment method for the employee + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementspaymentstatus.md b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementspaymentstatus.md new file mode 100644 index 00000000..e7eaa240 --- /dev/null +++ b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementspaymentstatus.md @@ -0,0 +1,13 @@ +# PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentStatus + +Status of the payment disbursement + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `PENDING` | Pending | +| `PAID` | Paid | +| `NOT_PARTNER_MANAGED` | Not partner managed | +| `CONVERTED_TO_CHECK` | Converted to check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsrequest.md b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsrequest.md new file mode 100644 index 00000000..4bc1b06f --- /dev/null +++ b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsrequest.md @@ -0,0 +1,11 @@ +# PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `id` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `x_gusto_api_version` | [Optional[models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion]](../models/patchv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `request_body` | [Optional[models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBody]](../models/patchv1companiescompanyidpayrollsidpartnerdisbursementsrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsrequestbody.md b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsrequestbody.md new file mode 100644 index 00000000..deac9d19 --- /dev/null +++ b/gusto_embedded/docs/models/patchv1companiescompanyidpayrollsidpartnerdisbursementsrequestbody.md @@ -0,0 +1,8 @@ +# PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `disbursements` | List[[models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements](../models/patchv1companiescompanyidpayrollsidpartnerdisbursementsdisbursements.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsdisbursements.md b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsdisbursements.md new file mode 100644 index 00000000..5d099c38 --- /dev/null +++ b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsdisbursements.md @@ -0,0 +1,10 @@ +# PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contractor_payment_uuid` | *str* | :heavy_check_mark: | UUID of the contractor payment | 9f8e7d6c-5b4a-3928-1c2d-3e4f5a6b7c8d | +| `payment_method` | [Optional[models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentMethod]](../models/patchv1contractorpaymentgroupsidpartnerdisbursementspaymentmethod.md) | :heavy_minus_sign: | Payment method for the contractor | | +| `payment_status` | [Optional[models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentStatus]](../models/patchv1contractorpaymentgroupsidpartnerdisbursementspaymentstatus.md) | :heavy_minus_sign: | Status of the payment disbursement | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md new file mode 100644 index 00000000..1c5b19d3 --- /dev/null +++ b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementspaymentmethod.md b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementspaymentmethod.md new file mode 100644 index 00000000..4d44a1f2 --- /dev/null +++ b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementspaymentmethod.md @@ -0,0 +1,11 @@ +# PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentMethod + +Payment method for the contractor + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementspaymentstatus.md b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementspaymentstatus.md new file mode 100644 index 00000000..4b96413d --- /dev/null +++ b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementspaymentstatus.md @@ -0,0 +1,13 @@ +# PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentStatus + +Status of the payment disbursement + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `PENDING` | Pending | +| `PAID` | Paid | +| `NOT_PARTNER_MANAGED` | Not partner managed | +| `CONVERTED_TO_CHECK` | Converted to check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsrequest.md b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsrequest.md new file mode 100644 index 00000000..ab45df0c --- /dev/null +++ b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsrequest.md @@ -0,0 +1,10 @@ +# PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | +| `x_gusto_api_version` | [Optional[models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion]](../models/patchv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `request_body` | [Optional[models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBody]](../models/patchv1contractorpaymentgroupsidpartnerdisbursementsrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsrequestbody.md b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsrequestbody.md new file mode 100644 index 00000000..80cfa772 --- /dev/null +++ b/gusto_embedded/docs/models/patchv1contractorpaymentgroupsidpartnerdisbursementsrequestbody.md @@ -0,0 +1,8 @@ +# PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `disbursements` | List[[models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements](../models/patchv1contractorpaymentgroupsidpartnerdisbursementsdisbursements.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/paymentconfigs.md b/gusto_embedded/docs/models/paymentconfigs.md index 12bfcf26..d4a9cff4 100644 --- a/gusto_embedded/docs/models/paymentconfigs.md +++ b/gusto_embedded/docs/models/paymentconfigs.md @@ -5,9 +5,11 @@ Example response ## Fields -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | Company uuid | -| `partner_uuid` | *Optional[str]* | :heavy_minus_sign: | Partner uuid | -| `fast_payment_limit` | *Optional[str]* | :heavy_minus_sign: | Payment limit for 1-day or 2-day payroll | -| `payment_speed` | *Optional[str]* | :heavy_minus_sign: | Payment speed for 1-day, 2-day, 4-day | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | Company uuid | +| `partner_uuid` | *Optional[str]* | :heavy_minus_sign: | Partner uuid | +| `fast_payment_limit` | *OptionalNullable[str]* | :heavy_minus_sign: | Payment limit for 1-day or 2-day payroll | +| `payment_speed` | *Optional[str]* | :heavy_minus_sign: | Payment speed for 1-day, 2-day, 4-day | +| `partner_owned_disbursement` | *Optional[bool]* | :heavy_minus_sign: | Whether the company is configured to use the partner-owned disbursement payment rail | +| `earned_fast_ach_blockers` | List[[models.EarnedFastAchBlockers](../models/earnedfastachblockers.md)] | :heavy_minus_sign: | Blockers preventing the company from earning fast ACH payments | \ No newline at end of file diff --git a/gusto_embedded/docs/models/paymentuuid.md b/gusto_embedded/docs/models/paymenttype.md similarity index 65% rename from gusto_embedded/docs/models/paymentuuid.md rename to gusto_embedded/docs/models/paymenttype.md index cf666d3a..e67e9e1c 100644 --- a/gusto_embedded/docs/models/paymentuuid.md +++ b/gusto_embedded/docs/models/paymenttype.md @@ -1,6 +1,6 @@ -# PaymentUUID +# PaymentType -Unique identifier of the payment +Type of payment for the wire in ## Values diff --git a/gusto_embedded/docs/models/payroll.md b/gusto_embedded/docs/models/payroll.md index 3b6201cc..f53ba827 100644 --- a/gusto_embedded/docs/models/payroll.md +++ b/gusto_embedded/docs/models/payroll.md @@ -1,7 +1,5 @@ # Payroll -Example response - ## Fields @@ -10,8 +8,8 @@ Example response | `payroll_deadline` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | | `check_date` | *Optional[str]* | :heavy_minus_sign: | The date on which employees will be paid for the payroll. | | `processed` | *Optional[bool]* | :heavy_minus_sign: | Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline. | -| `processed_date` | *Optional[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | -| `calculated_at` | *Optional[str]* | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | +| `processed_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | +| `calculated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | | `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | | `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | | `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company for the payroll. | @@ -26,10 +24,11 @@ Example response | `pay_period` | [Optional[models.PayrollPayPeriodType]](../models/payrollpayperiodtype.md) | :heavy_minus_sign: | N/A | | `payroll_status_meta` | [Optional[models.PayrollPayrollStatusMetaType]](../models/payrollpayrollstatusmetatype.md) | :heavy_minus_sign: | Information about the payroll's status and expected dates | | `totals` | [Optional[models.PayrollTotalsType]](../models/payrolltotalstype.md) | :heavy_minus_sign: | The subtotals for the payroll. | -| `employee_compensations` | List[[models.PayrollEmployeeCompensationsType](../models/payrollemployeecompensationstype.md)] | :heavy_minus_sign: | N/A | | `company_taxes` | List[[models.PayrollCompanyTaxesType](../models/payrollcompanytaxestype.md)] | :heavy_minus_sign: | An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | +| `payroll_taxes` | List[[models.PayrollTaxesType](../models/payrolltaxestype.md)] | :heavy_minus_sign: | An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter. | | `payment_speed_changed` | [Optional[models.PayrollPaymentSpeedChangedType]](../models/payrollpaymentspeedchangedtype.md) | :heavy_minus_sign: | Only applicable when a payroll is moved to four day processing instead of fast ach. | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Datetime for when the resource was created. | | `submission_blockers` | List[[models.PayrollSubmissionBlockersType](../models/payrollsubmissionblockerstype.md)] | :heavy_minus_sign: | Only included for processed or calculated payrolls | | `credit_blockers` | List[[models.PayrollCreditBlockersType](../models/payrollcreditblockerstype.md)] | :heavy_minus_sign: | Only included for processed payrolls | -| `processing_request` | [OptionalNullable[models.PayrollProcessingRequest]](../models/payrollprocessingrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `processing_request` | [OptionalNullable[models.PayrollProcessingRequest]](../models/payrollprocessingrequest.md) | :heavy_minus_sign: | N/A | +| `partner_owned_disbursement` | *OptionalNullable[bool]* | :heavy_minus_sign: | Will money movement for the payroll be performed by the partner rather than by Gusto? | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollcheck.md b/gusto_embedded/docs/models/payrollcheck.md index 13f35f24..4899983f 100644 --- a/gusto_embedded/docs/models/payrollcheck.md +++ b/gusto_embedded/docs/models/payrollcheck.md @@ -9,7 +9,7 @@ Example response | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | A unique identifier of the payroll. | | `printing_format` | *Optional[str]* | :heavy_minus_sign: | The format the checks will be printed. | -| `starting_check_number` | *Optional[str]* | :heavy_minus_sign: | The starting check number for the checks being printed. | +| `starting_check_number` | *OptionalNullable[str]* | :heavy_minus_sign: | The starting check number for the checks being printed. | | `request_uuid` | *Optional[str]* | :heavy_minus_sign: | A unique identifier of the Generated Document request | | `status` | *Optional[str]* | :heavy_minus_sign: | Current status of the Generated Document | | `employee_check_number_mapping` | List[[models.EmployeeCheckNumberMapping](../models/employeechecknumbermapping.md)] | :heavy_minus_sign: | An array of mapping employee uuids to their check numbers | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollemployeecompensationstype.md b/gusto_embedded/docs/models/payrollemployeecompensationstype.md index 7ad71fd7..16827e6b 100644 --- a/gusto_embedded/docs/models/payrollemployeecompensationstype.md +++ b/gusto_embedded/docs/models/payrollemployeecompensationstype.md @@ -8,14 +8,16 @@ | `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | | `excluded` | *Optional[bool]* | :heavy_minus_sign: | This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false. | | `version` | *Optional[str]* | :heavy_minus_sign: | The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the employee. Requires `employees:read` scope. | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The preferred first name of the employee. Requires `employees:read` scope. | +| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the employee. Requires `employees:read` scope. | | `gross_pay` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls. | | `net_pay` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's net pay, equal to gross_pay - employee taxes - employee deductions or garnishments - cash tips. This value is only available for processed payrolls. | | `check_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls. | -| `payment_method` | [OptionalNullable[models.PayrollEmployeeCompensationsTypePaymentMethod]](../models/payrollemployeecompensationstypepaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. | +| `payment_method` | [OptionalNullable[models.PayrollEmployeeCompensationsTypePaymentMethod]](../models/payrollemployeecompensationstypepaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. | | `memo` | *OptionalNullable[str]* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | | `fixed_compensations` | List[[models.FixedCompensations](../models/fixedcompensations.md)] | :heavy_minus_sign: | An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned. | | `hourly_compensations` | List[[models.HourlyCompensations](../models/hourlycompensations.md)] | :heavy_minus_sign: | An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned. | | `paid_time_off` | List[[models.PayrollEmployeeCompensationsTypePaidTimeOff](../models/payrollemployeecompensationstypepaidtimeoff.md)] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. | -| `benefits` | List[[models.Benefits](../models/benefits.md)] | :heavy_minus_sign: | An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present. | -| `deductions` | List[[models.Deductions](../models/deductions.md)] | :heavy_minus_sign: | An array of employee deductions for the pay period. Deductions are only included for processed payroll when the include parameter is present. | -| `taxes` | List[[models.Taxes](../models/taxes.md)] | :heavy_minus_sign: | An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | \ No newline at end of file +| `deductions` | List[[models.Deductions](../models/deductions.md)] | :heavy_minus_sign: | N/A | +| `reimbursements` | List[[models.ReimbursementsModel](../models/reimbursementsmodel.md)] | :heavy_minus_sign: | An array of reimbursements for the employee. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollemployeecompensationstypepaymentmethod.md b/gusto_embedded/docs/models/payrollemployeecompensationstypepaymentmethod.md index 8bcc6b5e..c9f57963 100644 --- a/gusto_embedded/docs/models/payrollemployeecompensationstypepaymentmethod.md +++ b/gusto_embedded/docs/models/payrollemployeecompensationstypepaymentmethod.md @@ -1,11 +1,12 @@ # PayrollEmployeeCompensationsTypePaymentMethod -The employee's compensation payment method. +The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. ## Values | Name | Value | | ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | | `CHECK` | Check | -| `DIRECT_DEPOSIT` | Direct Deposit | \ No newline at end of file +| `HISTORICAL` | Historical | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollpartnerdisbursements.md b/gusto_embedded/docs/models/payrollpartnerdisbursements.md new file mode 100644 index 00000000..9e65514e --- /dev/null +++ b/gusto_embedded/docs/models/payrollpartnerdisbursements.md @@ -0,0 +1,11 @@ +# PayrollPartnerDisbursements + +Partner disbursements for a payroll + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll | +| `disbursements` | List[[models.PayrollPartnerDisbursementsDisbursements](../models/payrollpartnerdisbursementsdisbursements.md)] | :heavy_minus_sign: | List of disbursements for the payroll | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollpartnerdisbursementsdisbursements.md b/gusto_embedded/docs/models/payrollpartnerdisbursementsdisbursements.md new file mode 100644 index 00000000..996b2d58 --- /dev/null +++ b/gusto_embedded/docs/models/payrollpartnerdisbursementsdisbursements.md @@ -0,0 +1,10 @@ +# PayrollPartnerDisbursementsDisbursements + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee | +| `payment_method` | [Optional[models.PayrollPartnerDisbursementsPaymentMethod]](../models/payrollpartnerdisbursementspaymentmethod.md) | :heavy_minus_sign: | The payment method for the disbursement | +| `payment_status` | [Optional[models.PayrollPartnerDisbursementsPaymentStatus]](../models/payrollpartnerdisbursementspaymentstatus.md) | :heavy_minus_sign: | The status of the payment | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollpartnerdisbursementspaymentmethod.md b/gusto_embedded/docs/models/payrollpartnerdisbursementspaymentmethod.md new file mode 100644 index 00000000..7b0a67d3 --- /dev/null +++ b/gusto_embedded/docs/models/payrollpartnerdisbursementspaymentmethod.md @@ -0,0 +1,11 @@ +# PayrollPartnerDisbursementsPaymentMethod + +The payment method for the disbursement + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollpartnerdisbursementspaymentstatus.md b/gusto_embedded/docs/models/payrollpartnerdisbursementspaymentstatus.md new file mode 100644 index 00000000..33dc5f29 --- /dev/null +++ b/gusto_embedded/docs/models/payrollpartnerdisbursementspaymentstatus.md @@ -0,0 +1,13 @@ +# PayrollPartnerDisbursementsPaymentStatus + +The status of the payment + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `PENDING` | Pending | +| `PAID` | Paid | +| `NOT_PARTNER_MANAGED` | Not partner managed | +| `CONVERTED_TO_CHECK` | Converted to check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollprepared.md b/gusto_embedded/docs/models/payrollprepared.md index d44ea691..3eea4e2a 100644 --- a/gusto_embedded/docs/models/payrollprepared.md +++ b/gusto_embedded/docs/models/payrollprepared.md @@ -1,7 +1,5 @@ # PayrollPrepared -An off-cycle payroll - ## Fields @@ -10,8 +8,8 @@ An off-cycle payroll | `payroll_deadline` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | | `check_date` | *Optional[str]* | :heavy_minus_sign: | The date on which employees will be paid for the payroll. | | `processed` | *Optional[bool]* | :heavy_minus_sign: | Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline. | -| `processed_date` | *Optional[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | -| `calculated_at` | *Optional[str]* | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | +| `processed_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | +| `calculated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | | `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | | `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | | `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company for the payroll. | @@ -29,4 +27,5 @@ An off-cycle payroll | `payment_speed_changed` | [Optional[models.PayrollPaymentSpeedChangedType]](../models/payrollpaymentspeedchangedtype.md) | :heavy_minus_sign: | Only applicable when a payroll is moved to four day processing instead of fast ach. | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Datetime for when the resource was created. | | `fixed_compensation_types` | List[[models.PayrollFixedCompensationTypesType](../models/payrollfixedcompensationtypestype.md)] | :heavy_minus_sign: | N/A | -| `processing_request` | [OptionalNullable[models.PayrollProcessingRequest]](../models/payrollprocessingrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `processing_request` | [OptionalNullable[models.PayrollProcessingRequest]](../models/payrollprocessingrequest.md) | :heavy_minus_sign: | N/A | +| `partner_owned_disbursement` | *OptionalNullable[bool]* | :heavy_minus_sign: | Will money movement for the payroll be performed by the partner rather than by Gusto? | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollpreparesortby.md b/gusto_embedded/docs/models/payrollpreparesortby.md new file mode 100644 index 00000000..6f5e9867 --- /dev/null +++ b/gusto_embedded/docs/models/payrollpreparesortby.md @@ -0,0 +1,9 @@ +# PayrollPrepareSortBy + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `FIRST_NAME` | first_name | +| `LAST_NAME` | last_name | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollreceipt.md b/gusto_embedded/docs/models/payrollreceipt.md index 2d3ae5b2..b87d6efd 100644 --- a/gusto_embedded/docs/models/payrollreceipt.md +++ b/gusto_embedded/docs/models/payrollreceipt.md @@ -1,7 +1,5 @@ # PayrollReceipt -Example response - ## Fields @@ -18,6 +16,6 @@ Example response | `right_to_refund` | *Optional[str]* | :heavy_minus_sign: | N/A | | `liability_of_licensee` | *Optional[str]* | :heavy_minus_sign: | N/A | | `totals` | [Optional[models.Totals]](../models/totals.md) | :heavy_minus_sign: | The subtotals for the payroll. | -| `taxes` | List[[models.PayrollReceiptTaxes](../models/payrollreceipttaxes.md)] | :heavy_minus_sign: | An array of totaled employer and employee taxes for the pay period. | -| `employee_compensations` | List[[models.EmployeeCompensations](../models/employeecompensations.md)] | :heavy_minus_sign: | An array of employee compensations and withholdings for this payroll | +| `taxes` | List[[models.Taxes](../models/taxes.md)] | :heavy_minus_sign: | An array of totaled employer and employee taxes for the pay period. | +| `employee_compensations` | List[[models.PayrollReceiptEmployeeCompensations](../models/payrollreceiptemployeecompensations.md)] | :heavy_minus_sign: | An array of employee compensations and withholdings for this payroll | | `licensee` | [Optional[models.Licensee]](../models/licensee.md) | :heavy_minus_sign: | The licensed payroll processor | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollreceiptemployeecompensations.md b/gusto_embedded/docs/models/payrollreceiptemployeecompensations.md new file mode 100644 index 00000000..c3e01ec9 --- /dev/null +++ b/gusto_embedded/docs/models/payrollreceiptemployeecompensations.md @@ -0,0 +1,16 @@ +# PayrollReceiptEmployeeCompensations + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | +| `employee_first_name` | *Optional[str]* | :heavy_minus_sign: | The first name of the employee. | +| `employee_last_name` | *Optional[str]* | :heavy_minus_sign: | The last name of the employee. | +| `payment_method` | [Optional[models.PayrollReceiptPaymentMethod]](../models/payrollreceiptpaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. | +| `net_pay` | *Optional[str]* | :heavy_minus_sign: | The employee's net pay. Net pay paid by check is available for reference but is not included in the `["totals"]["net_pay_debit"]` amount. | +| `total_tax` | *Optional[str]* | :heavy_minus_sign: | The total of employer and employee taxes for the pay period. | +| `total_garnishments` | *Optional[str]* | :heavy_minus_sign: | The total garnishments for the pay period. | +| `child_support_garnishment` | *Optional[str]* | :heavy_minus_sign: | The total child support garnishment for the pay period. | +| `total_reimbursement` | *Optional[str]* | :heavy_minus_sign: | The total reimbursement for the pay period. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollreceiptpaymentmethod.md b/gusto_embedded/docs/models/payrollreceiptpaymentmethod.md new file mode 100644 index 00000000..8740c61d --- /dev/null +++ b/gusto_embedded/docs/models/payrollreceiptpaymentmethod.md @@ -0,0 +1,11 @@ +# PayrollReceiptPaymentMethod + +The employee's compensation payment method. + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollminimal.md b/gusto_embedded/docs/models/payrollshow.md similarity index 84% rename from gusto_embedded/docs/models/payrollminimal.md rename to gusto_embedded/docs/models/payrollshow.md index 81c61162..50f57376 100644 --- a/gusto_embedded/docs/models/payrollminimal.md +++ b/gusto_embedded/docs/models/payrollshow.md @@ -1,6 +1,4 @@ -# PayrollMinimal - -Example response +# PayrollShow ## Fields @@ -9,12 +7,12 @@ Example response | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `payroll_deadline` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met. | | `check_date` | *Optional[str]* | :heavy_minus_sign: | The date on which employees will be paid for the payroll. | -| `processed` | *bool* | :heavy_check_mark: | Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline. | -| `processed_date` | *Optional[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | -| `calculated_at` | *Optional[str]* | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | -| `uuid` | *str* | :heavy_check_mark: | The UUID of the payroll. | -| `payroll_uuid` | *str* | :heavy_check_mark: | The UUID of the payroll. | -| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company for the payroll. | +| `processed` | *Optional[bool]* | :heavy_minus_sign: | Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline. | +| `processed_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date at which the payroll was processed. Null if the payroll isn't processed yet. | +| `calculated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation. | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the payroll. | +| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company for the payroll. | | `off_cycle` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the payroll is an off-cycle payroll | | `off_cycle_reason` | [OptionalNullable[models.OffCycleReasonType]](../models/offcyclereasontype.md) | :heavy_minus_sign: | The off-cycle reason. Only included for off-cycle payrolls. | | `auto_pilot` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the payroll is an auto pilot payroll | @@ -26,8 +24,12 @@ Example response | `pay_period` | [Optional[models.PayrollPayPeriodType]](../models/payrollpayperiodtype.md) | :heavy_minus_sign: | N/A | | `payroll_status_meta` | [Optional[models.PayrollPayrollStatusMetaType]](../models/payrollpayrollstatusmetatype.md) | :heavy_minus_sign: | Information about the payroll's status and expected dates | | `totals` | [Optional[models.PayrollTotalsType]](../models/payrolltotalstype.md) | :heavy_minus_sign: | The subtotals for the payroll. | +| `company_taxes` | List[[models.PayrollCompanyTaxesType](../models/payrollcompanytaxestype.md)] | :heavy_minus_sign: | An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter. | +| `payroll_taxes` | List[[models.PayrollTaxesType](../models/payrolltaxestype.md)] | :heavy_minus_sign: | An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter. | | `payment_speed_changed` | [Optional[models.PayrollPaymentSpeedChangedType]](../models/payrollpaymentspeedchangedtype.md) | :heavy_minus_sign: | Only applicable when a payroll is moved to four day processing instead of fast ach. | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Datetime for when the resource was created. | | `submission_blockers` | List[[models.PayrollSubmissionBlockersType](../models/payrollsubmissionblockerstype.md)] | :heavy_minus_sign: | Only included for processed or calculated payrolls | | `credit_blockers` | List[[models.PayrollCreditBlockersType](../models/payrollcreditblockerstype.md)] | :heavy_minus_sign: | Only included for processed payrolls | -| `reversal_payroll_uuids` | List[*str*] | :heavy_minus_sign: | Array of reversal payroll UUIDs, if applicable. | \ No newline at end of file +| `processing_request` | [OptionalNullable[models.PayrollProcessingRequest]](../models/payrollprocessingrequest.md) | :heavy_minus_sign: | N/A | +| `partner_owned_disbursement` | *OptionalNullable[bool]* | :heavy_minus_sign: | Will money movement for the payroll be performed by the partner rather than by Gusto? | +| `employee_compensations` | List[[models.EmployeeCompensations](../models/employeecompensations.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollshowamounttype.md b/gusto_embedded/docs/models/payrollshowamounttype.md new file mode 100644 index 00000000..bb3e1575 --- /dev/null +++ b/gusto_embedded/docs/models/payrollshowamounttype.md @@ -0,0 +1,9 @@ +# PayrollShowAmountType + + +## Values + +| Name | Value | +| --------- | --------- | +| `FIXED` | fixed | +| `PERCENT` | percent | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollshowbenefits.md b/gusto_embedded/docs/models/payrollshowbenefits.md new file mode 100644 index 00000000..87225208 --- /dev/null +++ b/gusto_embedded/docs/models/payrollshowbenefits.md @@ -0,0 +1,11 @@ +# PayrollShowBenefits + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `employee_deduction` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `company_contribution` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `imputed` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollshowdeductions.md b/gusto_embedded/docs/models/payrollshowdeductions.md new file mode 100644 index 00000000..bffed4ac --- /dev/null +++ b/gusto_embedded/docs/models/payrollshowdeductions.md @@ -0,0 +1,11 @@ +# PayrollShowDeductions + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `amount` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `amount_type` | [Optional[models.PayrollShowAmountType]](../models/payrollshowamounttype.md) | :heavy_minus_sign: | N/A | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollshowfixedcompensations.md b/gusto_embedded/docs/models/payrollshowfixedcompensations.md new file mode 100644 index 00000000..2adaf86a --- /dev/null +++ b/gusto_embedded/docs/models/payrollshowfixedcompensations.md @@ -0,0 +1,10 @@ +# PayrollShowFixedCompensations + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the compensation. This also serves as the unique, immutable identifier for this compensation. | +| `amount` | *Optional[str]* | :heavy_minus_sign: | The amount of the compensation for the pay period. | +| `job_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the job for the compensation. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollshowhourlycompensations.md b/gusto_embedded/docs/models/payrollshowhourlycompensations.md new file mode 100644 index 00000000..0ac2b0f8 --- /dev/null +++ b/gusto_embedded/docs/models/payrollshowhourlycompensations.md @@ -0,0 +1,13 @@ +# PayrollShowHourlyCompensations + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the compensation. This also serves as the unique, immutable identifier for this compensation. | +| `hours` | *Optional[str]* | :heavy_minus_sign: | The number of hours to be compensated for this pay period. | +| `amount` | *Optional[str]* | :heavy_minus_sign: | The amount of the compensation. This field is only available after the payroll is calculated and cannot be used for updating hourly compensations. | +| `job_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the job for the compensation. | +| `compensation_multiplier` | *Optional[float]* | :heavy_minus_sign: | The amount multiplied by the base rate to calculate total compensation per hour worked. | +| `flsa_status` | *Optional[str]* | :heavy_minus_sign: | The FLSA Status of the employee's primary job compensation | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollshowpaidtimeoff.md b/gusto_embedded/docs/models/payrollshowpaidtimeoff.md new file mode 100644 index 00000000..2a87dafa --- /dev/null +++ b/gusto_embedded/docs/models/payrollshowpaidtimeoff.md @@ -0,0 +1,10 @@ +# PayrollShowPaidTimeOff + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the PTO. This also serves as the unique, immutable identifier for the PTO. | +| `hours` | *Optional[str]* | :heavy_minus_sign: | The hours of this PTO taken during the pay period. | +| `final_payout_unused_hours_input` | *Optional[str]* | :heavy_minus_sign: | The outstanding hours paid upon termination. This field is only applicable for termination payrolls. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollshowpaymentmethod.md b/gusto_embedded/docs/models/payrollshowpaymentmethod.md new file mode 100644 index 00000000..f505933b --- /dev/null +++ b/gusto_embedded/docs/models/payrollshowpaymentmethod.md @@ -0,0 +1,12 @@ +# PayrollShowPaymentMethod + +The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto. + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | +| `HISTORICAL` | Historical | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollshowreimbursements.md b/gusto_embedded/docs/models/payrollshowreimbursements.md new file mode 100644 index 00000000..44b9a7ef --- /dev/null +++ b/gusto_embedded/docs/models/payrollshowreimbursements.md @@ -0,0 +1,11 @@ +# PayrollShowReimbursements + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `amount` | *str* | :heavy_check_mark: | The dollar amount of the reimbursement for the pay period. | +| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the reimbursement. Null for unnamed reimbursements. | +| `uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls. | +| `recurring` | *Optional[bool]* | :heavy_minus_sign: | Whether the reimbursement is recurring. This field is only available for unprocessed payrolls. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollshowtaxes.md b/gusto_embedded/docs/models/payrollshowtaxes.md new file mode 100644 index 00000000..d84c5b63 --- /dev/null +++ b/gusto_embedded/docs/models/payrollshowtaxes.md @@ -0,0 +1,10 @@ +# PayrollShowTaxes + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `employer` | *bool* | :heavy_check_mark: | N/A | +| `amount` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrolltaxestype.md b/gusto_embedded/docs/models/payrolltaxestype.md new file mode 100644 index 00000000..53dcca3e --- /dev/null +++ b/gusto_embedded/docs/models/payrolltaxestype.md @@ -0,0 +1,10 @@ +# PayrollTaxesType + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The tax name | +| `employer` | *Optional[bool]* | :heavy_minus_sign: | Whether this tax is an employer or employee tax | +| `amount` | *Optional[float]* | :heavy_minus_sign: | The total tax for the payroll | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollsrequestbody.md b/gusto_embedded/docs/models/payrollupdate.md similarity index 94% rename from gusto_embedded/docs/models/putv1companiescompanyidpayrollsrequestbody.md rename to gusto_embedded/docs/models/payrollupdate.md index e89b2855..c2214d52 100644 --- a/gusto_embedded/docs/models/putv1companiescompanyidpayrollsrequestbody.md +++ b/gusto_embedded/docs/models/payrollupdate.md @@ -1,11 +1,11 @@ -# PutV1CompaniesCompanyIDPayrollsRequestBody +# PayrollUpdate ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_compensations` | List[[models.PutV1CompaniesCompanyIDPayrollsEmployeeCompensations](../models/putv1companiescompanyidpayrollsemployeecompensations.md)] | :heavy_check_mark: | N/A | -| `withholding_pay_period` | [Optional[models.PutV1CompaniesCompanyIDPayrollsWithholdingPayPeriod]](../models/putv1companiescompanyidpayrollswithholdingpayperiod.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. | +| `employee_compensations` | List[[models.PayrollUpdateEmployeeCompensations](../models/payrollupdateemployeecompensations.md)] | :heavy_check_mark: | N/A | +| `withholding_pay_period` | [Optional[models.WithholdingPayPeriod]](../models/withholdingpayperiod.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. | | `skip_regular_deductions` | *Optional[bool]* | :heavy_minus_sign: | Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls. | | `fixed_withholding_rate` | *Optional[bool]* | :heavy_minus_sign: | Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollupdateamounttype.md b/gusto_embedded/docs/models/payrollupdateamounttype.md new file mode 100644 index 00000000..dee07340 --- /dev/null +++ b/gusto_embedded/docs/models/payrollupdateamounttype.md @@ -0,0 +1,11 @@ +# PayrollUpdateAmountType + +The amount type of the deduction for the pay period. + + +## Values + +| Name | Value | +| --------- | --------- | +| `FIXED` | fixed | +| `PERCENT` | percent | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollupdatedeductions.md b/gusto_embedded/docs/models/payrollupdatedeductions.md new file mode 100644 index 00000000..18b49824 --- /dev/null +++ b/gusto_embedded/docs/models/payrollupdatedeductions.md @@ -0,0 +1,13 @@ +# PayrollUpdateDeductions + +An array of deductions for the employee. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the deduction. | +| `amount` | *Optional[float]* | :heavy_minus_sign: | The amount of the deduction for the pay period. | +| `amount_type` | [Optional[models.PayrollUpdateAmountType]](../models/payrollupdateamounttype.md) | :heavy_minus_sign: | The amount type of the deduction for the pay period. | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payrollupdateemployeecompensations.md b/gusto_embedded/docs/models/payrollupdateemployeecompensations.md new file mode 100644 index 00000000..7333c021 --- /dev/null +++ b/gusto_embedded/docs/models/payrollupdateemployeecompensations.md @@ -0,0 +1,16 @@ +# PayrollUpdateEmployeeCompensations + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | +| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | +| `excluded` | *Optional[bool]* | :heavy_minus_sign: | This employee will be excluded from payroll calculation and will not be paid for the payroll. | +| `payment_method` | [Optional[models.PayrollUpdatePaymentMethod]](../models/payrollupdatepaymentmethod.md) | :heavy_minus_sign: | The employee's compensation payment method. Invalid values will be ignored. | +| `memo` | *Optional[str]* | :heavy_minus_sign: | Custom text that will be printed as a personal note to the employee on a paystub. | +| `fixed_compensations` | List[[models.PayrollUpdateFixedCompensations](../models/payrollupdatefixedcompensations.md)] | :heavy_minus_sign: | N/A | +| `hourly_compensations` | List[[models.PayrollUpdateHourlyCompensations](../models/payrollupdatehourlycompensations.md)] | :heavy_minus_sign: | N/A | +| `deductions` | List[[models.PayrollUpdateDeductions](../models/payrollupdatedeductions.md)] | :heavy_minus_sign: | N/A | +| `paid_time_off` | List[[models.PayrollUpdatePaidTimeOff](../models/payrollupdatepaidtimeoff.md)] | :heavy_minus_sign: | An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid. | \ No newline at end of file diff --git a/gusto_app_int/docs/models/putv1companiescompanyidpayrollsfixedcompensations.md b/gusto_embedded/docs/models/payrollupdatefixedcompensations.md similarity index 97% rename from gusto_app_int/docs/models/putv1companiescompanyidpayrollsfixedcompensations.md rename to gusto_embedded/docs/models/payrollupdatefixedcompensations.md index d420dda8..a8cc7cea 100644 --- a/gusto_app_int/docs/models/putv1companiescompanyidpayrollsfixedcompensations.md +++ b/gusto_embedded/docs/models/payrollupdatefixedcompensations.md @@ -1,4 +1,4 @@ -# PutV1CompaniesCompanyIDPayrollsFixedCompensations +# PayrollUpdateFixedCompensations An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. diff --git a/gusto_app_int/docs/models/putv1companiescompanyidpayrollshourlycompensations.md b/gusto_embedded/docs/models/payrollupdatehourlycompensations.md similarity index 97% rename from gusto_app_int/docs/models/putv1companiescompanyidpayrollshourlycompensations.md rename to gusto_embedded/docs/models/payrollupdatehourlycompensations.md index eb2bef39..57677194 100644 --- a/gusto_app_int/docs/models/putv1companiescompanyidpayrollshourlycompensations.md +++ b/gusto_embedded/docs/models/payrollupdatehourlycompensations.md @@ -1,4 +1,4 @@ -# PutV1CompaniesCompanyIDPayrollsHourlyCompensations +# PayrollUpdateHourlyCompensations An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollspaidtimeoff.md b/gusto_embedded/docs/models/payrollupdatepaidtimeoff.md similarity index 98% rename from gusto_embedded/docs/models/putv1companiescompanyidpayrollspaidtimeoff.md rename to gusto_embedded/docs/models/payrollupdatepaidtimeoff.md index c6bd2e16..b4dcf306 100644 --- a/gusto_embedded/docs/models/putv1companiescompanyidpayrollspaidtimeoff.md +++ b/gusto_embedded/docs/models/payrollupdatepaidtimeoff.md @@ -1,4 +1,4 @@ -# PutV1CompaniesCompanyIDPayrollsPaidTimeOff +# PayrollUpdatePaidTimeOff ## Fields diff --git a/gusto_app_int/docs/models/putv1companiescompanyidpayrollspaymentmethod.md b/gusto_embedded/docs/models/payrollupdatepaymentmethod.md similarity index 84% rename from gusto_app_int/docs/models/putv1companiescompanyidpayrollspaymentmethod.md rename to gusto_embedded/docs/models/payrollupdatepaymentmethod.md index 8fd1175b..88b6b109 100644 --- a/gusto_app_int/docs/models/putv1companiescompanyidpayrollspaymentmethod.md +++ b/gusto_embedded/docs/models/payrollupdatepaymentmethod.md @@ -1,4 +1,4 @@ -# PutV1CompaniesCompanyIDPayrollsPaymentMethod +# PayrollUpdatePaymentMethod The employee's compensation payment method. Invalid values will be ignored. diff --git a/gusto_embedded/docs/models/payscheduleassignmentemployee.md b/gusto_embedded/docs/models/payscheduleassignmentemployee.md index 3a45e295..e301a66a 100644 --- a/gusto_embedded/docs/models/payscheduleassignmentemployee.md +++ b/gusto_embedded/docs/models/payscheduleassignmentemployee.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | | `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the employee. | -| `pay_schedule_uuid` | *Optional[str]* | :heavy_minus_sign: | The employee's pay schedule UUID. | \ No newline at end of file +| `pay_schedule_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee's pay schedule UUID. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payschedulelist.md b/gusto_embedded/docs/models/payschedulelist.md index aa5e42eb..2eb0c618 100644 --- a/gusto_embedded/docs/models/payschedulelist.md +++ b/gusto_embedded/docs/models/payschedulelist.md @@ -5,16 +5,16 @@ The representation of a pay schedule. ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *str* | :heavy_check_mark: | The unique identifier of the pay schedule in Gusto. | -| `frequency` | [Optional[models.PayScheduleFrequency]](../models/payschedulefrequency.md) | :heavy_minus_sign: | The frequency that employees on this pay schedule are paid with Gusto. | -| `anchor_pay_date` | *Optional[str]* | :heavy_minus_sign: | The first date that employees on this pay schedule are paid with Gusto. | -| `anchor_end_of_pay_period` | *Optional[str]* | :heavy_minus_sign: | The last date of the first pay period. This can be the same date as the anchor pay date. | -| `day_1` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the first day of the month that employees are paid. This field is only relevant for pay schedules with the “Twice per month” and “Monthly” frequencies. It will be null for pay schedules with other frequencies. | -| `day_2` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the second day of the month that employees are paid. This field is the second pay date for pay schedules with the "Twice per month" frequency. For semi-monthly pay schedules, this field should be set to 31. For months shorter than 31 days, we will set the second pay date to the last day of the month. It will be null for pay schedules with other frequencies. | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | This field will be hourly when the pay schedule is for hourly employees, salaried when the pay schedule is for salaried employees, the department name if pay schedule is by department, and null when the pay schedule is for all employees. | -| `custom_name` | *Optional[str]* | :heavy_minus_sign: | A custom name for a pay schedule, defaults to the pay frequency description. | -| `auto_pilot` | *Optional[bool]* | :heavy_minus_sign: | With Autopilot® enabled, payroll will run automatically one day before your payroll deadlines. | -| `active` | *Optional[bool]* | :heavy_minus_sign: | Whether this pay schedule is associated with any employees. A pay schedule is inactive when it's unassigned. | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The unique identifier of the pay schedule in Gusto. | | +| `frequency` | [Optional[models.PayScheduleFrequency]](../models/payschedulefrequency.md) | :heavy_minus_sign: | The frequency that employees on this pay schedule are paid with Gusto. | | +| `anchor_pay_date` | *Optional[str]* | :heavy_minus_sign: | The first date that employees on this pay schedule are paid with Gusto. | | +| `anchor_end_of_pay_period` | *Optional[str]* | :heavy_minus_sign: | The last date of the first pay period. This can be the same date as the anchor pay date. | | +| `day_1` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the first day of the month that employees are paid. This field is only relevant for pay schedules with the “Twice per month” and “Monthly” frequencies. It will be null for pay schedules with other frequencies. | | +| `day_2` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the second day of the month that employees are paid. This field is the second pay date for pay schedules with the "Twice per month" frequency. For semi-monthly pay schedules, this field should be set to 31. For months shorter than 31 days, we will set the second pay date to the last day of the month. It will be null for pay schedules with other frequencies. | | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | This field will be hourly when the pay schedule is for hourly employees, salaried when the pay schedule is for salaried employees, the department name if pay schedule is by department, and null when the pay schedule is for all employees. | | +| `custom_name` | *Optional[str]* | :heavy_minus_sign: | A custom name for a pay schedule, defaults to the pay frequency description. | | +| `auto_pilot` | *Optional[bool]* | :heavy_minus_sign: | With Autopilot® enabled, payroll will run automatically one day before your payroll deadlines. | | +| `active` | *Optional[bool]* | :heavy_minus_sign: | Whether this pay schedule is associated with any employees. A pay schedule is inactive when it's unassigned. | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/payscheduleobject.md b/gusto_embedded/docs/models/payscheduleobject.md index e76e5fcf..31401765 100644 --- a/gusto_embedded/docs/models/payscheduleobject.md +++ b/gusto_embedded/docs/models/payscheduleobject.md @@ -5,16 +5,16 @@ The representation of a pay schedule. ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *str* | :heavy_check_mark: | The unique identifier of the pay schedule in Gusto. | -| `frequency` | [Optional[models.PayScheduleFrequency]](../models/payschedulefrequency.md) | :heavy_minus_sign: | The frequency that employees on this pay schedule are paid with Gusto. | -| `anchor_pay_date` | *Optional[str]* | :heavy_minus_sign: | The first date that employees on this pay schedule are paid with Gusto. | -| `anchor_end_of_pay_period` | *Optional[str]* | :heavy_minus_sign: | The last date of the first pay period. This can be the same date as the anchor pay date. | -| `day_1` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the first day of the month that employees are paid. This field is only relevant for pay schedules with the “Twice per month” and “Monthly” frequencies. It will be null for pay schedules with other frequencies. | -| `day_2` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the second day of the month that employees are paid. This field is the second pay date for pay schedules with the "Twice per month" frequency. For semi-monthly pay schedules, this field should be set to 31. For months shorter than 31 days, we will set the second pay date to the last day of the month. It will be null for pay schedules with other frequencies. | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | This field will be hourly when the pay schedule is for hourly employees, salaried when the pay schedule is for salaried employees, the department name if pay schedule is by department, and null when the pay schedule is for all employees. | -| `custom_name` | *Optional[str]* | :heavy_minus_sign: | A custom name for a pay schedule, defaults to the pay frequency description. | -| `auto_pilot` | *Optional[bool]* | :heavy_minus_sign: | With Autopilot® enabled, payroll will run automatically one day before your payroll deadlines. | -| `active` | *Optional[bool]* | :heavy_minus_sign: | Whether this pay schedule is associated with any employees. A pay schedule is inactive when it's unassigned. | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The unique identifier of the pay schedule in Gusto. | | +| `frequency` | [Optional[models.PayScheduleFrequency]](../models/payschedulefrequency.md) | :heavy_minus_sign: | The frequency that employees on this pay schedule are paid with Gusto. | | +| `anchor_pay_date` | *Optional[str]* | :heavy_minus_sign: | The first date that employees on this pay schedule are paid with Gusto. | | +| `anchor_end_of_pay_period` | *Optional[str]* | :heavy_minus_sign: | The last date of the first pay period. This can be the same date as the anchor pay date. | | +| `day_1` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the first day of the month that employees are paid. This field is only relevant for pay schedules with the “Twice per month” and “Monthly” frequencies. It will be null for pay schedules with other frequencies. | | +| `day_2` | *OptionalNullable[int]* | :heavy_minus_sign: | An integer between 1 and 31 indicating the second day of the month that employees are paid. This field is the second pay date for pay schedules with the "Twice per month" frequency. For semi-monthly pay schedules, this field should be set to 31. For months shorter than 31 days, we will set the second pay date to the last day of the month. It will be null for pay schedules with other frequencies. | | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | This field will be hourly when the pay schedule is for hourly employees, salaried when the pay schedule is for salaried employees, the department name if pay schedule is by department, and null when the pay schedule is for all employees. | | +| `custom_name` | *Optional[str]* | :heavy_minus_sign: | A custom name for a pay schedule, defaults to the pay frequency description. | | +| `auto_pilot` | *Optional[bool]* | :heavy_minus_sign: | With Autopilot® enabled, payroll will run automatically one day before your payroll deadlines. | | +| `active` | *Optional[bool]* | :heavy_minus_sign: | Whether this pay schedule is associated with any employees. A pay schedule is inactive when it's unassigned. | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md b/gusto_embedded/docs/models/postcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md new file mode 100644 index 00000000..10a0e50c --- /dev/null +++ b/gusto_embedded/docs/models/postcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postcompaniescompanyuuidsuspensionsrequest.md b/gusto_embedded/docs/models/postcompaniescompanyuuidsuspensionsrequest.md index 5be69811..907aa28f 100644 --- a/gusto_embedded/docs/models/postcompaniescompanyuuidsuspensionsrequest.md +++ b/gusto_embedded/docs/models/postcompaniescompanyuuidsuspensionsrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion]](../models/postcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PostCompaniesCompanyUUIDSuspensionsRequestBody](../models/postcompaniescompanyuuidsuspensionsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postcompaniescompanyuuidsuspensionsrequestbody.md b/gusto_embedded/docs/models/postcompaniescompanyuuidsuspensionsrequestbody.md index de33bb36..d396ff27 100644 --- a/gusto_embedded/docs/models/postcompaniescompanyuuidsuspensionsrequestbody.md +++ b/gusto_embedded/docs/models/postcompaniescompanyuuidsuspensionsrequestbody.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `file_quarterly_forms` | *bool* | :heavy_check_mark: | Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. | -| `file_yearly_forms` | *bool* | :heavy_check_mark: | Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. | -| `reconcile_tax_method` | [models.PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod](../models/postcompaniescompanyuuidsuspensionsreconciletaxmethod.md) | :heavy_check_mark: | How Gusto will handle taxes already collected. | -| `comments` | *Optional[str]* | :heavy_minus_sign: | User-supplied comments describing why they are suspending their account. | -| `reason` | [models.Reason](../models/reason.md) | :heavy_check_mark: | Explanation for why the company is suspending their account.

> 🚧 FEIN or entity type changes require Customer Support
>
> If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time. | -| `leaving_for` | [Optional[models.LeavingFor]](../models/leavingfor.md) | :heavy_minus_sign: | Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `file_quarterly_forms` | *bool* | :heavy_check_mark: | Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. | +| `file_yearly_forms` | *bool* | :heavy_check_mark: | Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. | +| `reconcile_tax_method` | [models.PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod](../models/postcompaniescompanyuuidsuspensionsreconciletaxmethod.md) | :heavy_check_mark: | How Gusto will handle taxes already collected. | +| `comments` | *Optional[str]* | :heavy_minus_sign: | User-supplied comments describing why they are suspending their account. Required if the user is leaving for another provider and selects "other" instead of a defined provider. | +| `reason` | [models.Reason](../models/reason.md) | :heavy_check_mark: | Explanation for why the company is suspending their account.

> 🚧 FEIN or entity type changes require Customer Support
> If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time.
| +| `leaving_for` | [Optional[models.LeavingFor]](../models/leavingfor.md) | :heavy_minus_sign: | The competitor the company is switching to. Required if `reason` is `'switching_provider'`.

> 🚧 Switching to Gusto requires Customer Support
> If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case.
| \ No newline at end of file diff --git a/gusto_embedded/docs/models/postcompaniespayrollskipcompanyuuidresponsebody.md b/gusto_embedded/docs/models/postcompaniespayrollskipcompanyuuidresponsebody.md index 5e23b20c..46543fd4 100644 --- a/gusto_embedded/docs/models/postcompaniespayrollskipcompanyuuidresponsebody.md +++ b/gusto_embedded/docs/models/postcompaniespayrollskipcompanyuuidresponsebody.md @@ -5,10 +5,10 @@ Unprocessable Entity ## Supported Types -### `models.UnprocessableEntityErrorObjectError` +### `models.UnprocessableEntityErrorObject` ```python -value: models.UnprocessableEntityErrorObjectError = /* values here */ +value: models.UnprocessableEntityErrorObject = /* values here */ ``` ### `models.PayrollBlockersError` diff --git a/gusto_embedded/docs/models/postpayrollsgrossuppayrolluuidresponsebody.md b/gusto_embedded/docs/models/postpayrollsgrossuppayrolluuidresponsebody.md index 933b3302..74f0c905 100644 --- a/gusto_embedded/docs/models/postpayrollsgrossuppayrolluuidresponsebody.md +++ b/gusto_embedded/docs/models/postpayrollsgrossuppayrolluuidresponsebody.md @@ -5,10 +5,10 @@ Unprocessable Entity ## Supported Types -### `models.UnprocessableEntityErrorObjectError` +### `models.UnprocessableEntityErrorObject` ```python -value: models.UnprocessableEntityErrorObjectError = /* values here */ +value: models.UnprocessableEntityErrorObject = /* values here */ ``` ### `models.PayrollBlockersError` diff --git a/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md b/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md new file mode 100644 index 00000000..7faf7695 --- /dev/null +++ b/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md @@ -0,0 +1,13 @@ +# PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation + +The breakdown of the report. Use 'default' for no split. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `DEFAULT` | default | +| `JOB` | job | +| `DEPARTMENT` | department | +| `INTEGRATION` | integration | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md b/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md new file mode 100644 index 00000000..b66d3574 --- /dev/null +++ b/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md @@ -0,0 +1,11 @@ +# PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType + +The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'. + + +## Values + +| Name | Value | +| ------ | ------ | +| `XERO` | xero | +| `QBO` | qbo | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequest.md b/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequest.md new file mode 100644 index 00000000..84e3cb3a --- /dev/null +++ b/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequest.md @@ -0,0 +1,10 @@ +# PostPayrollsPayrollUUIDReportsGeneralLedgerRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `payroll_uuid` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `request_body` | [models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody](../models/postpayrollspayrolluuidreportsgeneralledgerrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequestbody.md b/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequestbody.md new file mode 100644 index 00000000..4685f5ef --- /dev/null +++ b/gusto_embedded/docs/models/postpayrollspayrolluuidreportsgeneralledgerrequestbody.md @@ -0,0 +1,9 @@ +# PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `aggregation` | [models.PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation](../models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md) | :heavy_check_mark: | The breakdown of the report. Use 'default' for no split. | +| `integration_type` | [OptionalNullable[models.PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType]](../models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md) | :heavy_minus_sign: | The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsheaderxgustoapiversion.md b/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsheaderxgustoapiversion.md new file mode 100644 index 00000000..85a61db4 --- /dev/null +++ b/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsrequest.md b/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsrequest.md index d5a3918a..6b0b69ae 100644 --- a/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsrequest.md +++ b/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsrequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `request_body` | [models.PostV1CompaniesCompanyIDBankAccountsRequestBody](../models/postv1companiescompanyidbankaccountsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion]](../models/postv1companiescompanyidbankaccountsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `company_bank_account_request` | [models.CompanyBankAccountRequest](../models/companybankaccountrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsrequestbody.md b/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsrequestbody.md deleted file mode 100644 index df23458f..00000000 --- a/gusto_embedded/docs/models/postv1companiescompanyidbankaccountsrequestbody.md +++ /dev/null @@ -1,10 +0,0 @@ -# PostV1CompaniesCompanyIDBankAccountsRequestBody - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `routing_number` | *Optional[str]* | :heavy_minus_sign: | The bank routing number | -| `account_number` | *Optional[str]* | :heavy_minus_sign: | The bank account number | -| `account_type` | [Optional[models.PostV1CompaniesCompanyIDBankAccountsAccountType]](../models/postv1companiescompanyidbankaccountsaccounttype.md) | :heavy_minus_sign: | The bank account type | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md new file mode 100644 index 00000000..96125130 --- /dev/null +++ b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md index 786ab057..0f492724 100644 --- a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md +++ b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md @@ -3,11 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | The contractor receiving the payment | | -| `payment_method` | [Optional[models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod]](../models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md) | :heavy_minus_sign: | N/A | | -| `wage` | *Optional[float]* | :heavy_minus_sign: | If the contractor is on a fixed wage, this is the fixed wage payment for the contractor, regardless of hours worked | 5000 | -| `hours` | *Optional[float]* | :heavy_minus_sign: | If the contractor is on an hourly wage, this is the number of hours that the contractor worked for the payment | 40 | -| `bonus` | *Optional[float]* | :heavy_minus_sign: | If the contractor is on an hourly wage, this is the bonus the contractor earned | 500 | -| `reimbursement` | *Optional[float]* | :heavy_minus_sign: | Reimbursed wages for the contractor | 20 | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | UUID of the contractor | +| `payment_method` | [Optional[models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod]](../models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md) | :heavy_minus_sign: | Payment method | +| `wage` | *Optional[float]* | :heavy_minus_sign: | Wage amount | +| `reimbursement` | *Optional[float]* | :heavy_minus_sign: | Reimbursement amount | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.md b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.md new file mode 100644 index 00000000..a6cded78 --- /dev/null +++ b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md index 6a11793e..6c4e4825 100644 --- a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md +++ b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewpaymentmethod.md @@ -1,10 +1,11 @@ # PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod +Payment method + ## Values -| Name | Value | -| -------------------- | -------------------- | -| `DIRECT_DEPOSIT` | Direct Deposit | -| `CHECK` | Check | -| `HISTORICAL_PAYMENT` | Historical Payment | \ No newline at end of file +| Name | Value | +| ---------------- | ---------------- | +| `DIRECT_DEPOSIT` | Direct Deposit | +| `CHECK` | Check | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md index 76b7a8d3..44069774 100644 --- a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md +++ b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion]](../models/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody](../models/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md index a34b8933..5dcc3a2d 100644 --- a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md +++ b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupspreviewrequestbody.md @@ -3,8 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `check_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | The payment check date | 2020-01-01 | -| `creation_token` | *Optional[str]* | :heavy_minus_sign: | Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. | 1d532d13-8f61-4a57-ad3c-b5fac1c6e05e | -| `contractor_payments` | List[[models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments](../models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `contractor_payments` | List[[models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments](../models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md)] | :heavy_check_mark: | N/A | +| `check_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date when payments should be processed | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupsrequest.md b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupsrequest.md index 5ad280aa..e796762f 100644 --- a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupsrequest.md +++ b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupsrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion]](../models/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody](../models/postv1companiescompanyidcontractorpaymentgroupsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupsrequestbody.md b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupsrequestbody.md index 97957d3b..c3f3381d 100644 --- a/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupsrequestbody.md +++ b/gusto_embedded/docs/models/postv1companiescompanyidcontractorpaymentgroupsrequestbody.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `check_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | The payment check date | 2020-01-01 | -| `creation_token` | *Optional[str]* | :heavy_minus_sign: | Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. | 1d532d13-8f61-4a57-ad3c-b5fac1c6e05e | +| `creation_token` | *Optional[str]* | :heavy_minus_sign: | Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. | 1d532d13-8f61-4a57-ad3c-b5fac1c6e05e | | `contractor_payments` | List[[models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments](../models/postv1companiescompanyidcontractorpaymentgroupscontractorpayments.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidpayrollsheaderxgustoapiversion.md b/gusto_embedded/docs/models/postv1companiescompanyidpayrollsheaderxgustoapiversion.md new file mode 100644 index 00000000..f000c972 --- /dev/null +++ b/gusto_embedded/docs/models/postv1companiescompanyidpayrollsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidpayrollsrequest.md b/gusto_embedded/docs/models/postv1companiescompanyidpayrollsrequest.md index 761a4c84..8662d021 100644 --- a/gusto_embedded/docs/models/postv1companiescompanyidpayrollsrequest.md +++ b/gusto_embedded/docs/models/postv1companiescompanyidpayrollsrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../models/postv1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `request_body` | [models.PostV1CompaniesCompanyIDPayrollsRequestBody](../models/postv1companiescompanyidpayrollsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `request_body` | [Optional[models.PostV1CompaniesCompanyIDPayrollsRequestBody]](../models/postv1companiescompanyidpayrollsrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1companiescompanyidpayrollsrequestbody.md b/gusto_embedded/docs/models/postv1companiescompanyidpayrollsrequestbody.md index 309c9e8a..6b0485d0 100644 --- a/gusto_embedded/docs/models/postv1companiescompanyidpayrollsrequestbody.md +++ b/gusto_embedded/docs/models/postv1companiescompanyidpayrollsrequestbody.md @@ -7,11 +7,11 @@ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `off_cycle` | *bool* | :heavy_check_mark: | Whether it is an off cycle payroll. | | `off_cycle_reason` | [models.OffCycleReason](../models/offcyclereason.md) | :heavy_check_mark: | An off cycle payroll reason. Select one from the following list. | -| `start_date` | *str* | :heavy_check_mark: | Pay period start date. | -| `end_date` | *str* | :heavy_check_mark: | Pay period end date. | +| `start_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | Pay period start date. | +| `end_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | Pay period end date. | | `pay_schedule_uuid` | *Optional[str]* | :heavy_minus_sign: | A pay schedule is required for transition from old pay schedule payroll to identify the matching transition pay period. | | `employee_uuids` | List[*str*] | :heavy_minus_sign: | A list of employee uuids to include on the payroll. | -| `check_date` | *Optional[str]* | :heavy_minus_sign: | Payment date. | -| `withholding_pay_period` | [Optional[models.WithholdingPayPeriod]](../models/withholdingpayperiod.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. | +| `check_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Payment date. | +| `withholding_pay_period` | [Optional[models.PostV1CompaniesCompanyIDPayrollsWithholdingPayPeriod]](../models/postv1companiescompanyidpayrollswithholdingpayperiod.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. | | `skip_regular_deductions` | *Optional[bool]* | :heavy_minus_sign: | Block regular deductions and contributions for this payroll. | | `fixed_withholding_rate` | *Optional[bool]* | :heavy_minus_sign: | Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollswithholdingpayperiod.md b/gusto_embedded/docs/models/postv1companiescompanyidpayrollswithholdingpayperiod.md similarity index 73% rename from gusto_embedded/docs/models/putv1companiescompanyidpayrollswithholdingpayperiod.md rename to gusto_embedded/docs/models/postv1companiescompanyidpayrollswithholdingpayperiod.md index b958ed95..7cfbc252 100644 --- a/gusto_embedded/docs/models/putv1companiescompanyidpayrollswithholdingpayperiod.md +++ b/gusto_embedded/docs/models/postv1companiescompanyidpayrollswithholdingpayperiod.md @@ -1,6 +1,6 @@ -# PutV1CompaniesCompanyIDPayrollsWithholdingPayPeriod +# PostV1CompaniesCompanyIDPayrollsWithholdingPayPeriod -The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. +The payment schedule tax rate the payroll is based on. ## Values diff --git a/gusto_embedded/docs/models/postv1companyflowsrequestbody.md b/gusto_embedded/docs/models/postv1companyflowsrequestbody.md index d4ba5d31..fc1a968e 100644 --- a/gusto_embedded/docs/models/postv1companyflowsrequestbody.md +++ b/gusto_embedded/docs/models/postv1companyflowsrequestbody.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `flow_type` | *str* | :heavy_check_mark: | flow type | -| `entity_uuid` | *Optional[str]* | :heavy_minus_sign: | UUID of the target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details. | -| `entity_type` | [Optional[models.PostV1CompanyFlowsEntityType]](../models/postv1companyflowsentitytype.md) | :heavy_minus_sign: | the type of target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `flow_type` | *str* | :heavy_check_mark: | flow type | +| `entity_uuid` | *Optional[str]* | :heavy_minus_sign: | UUID of the target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details. | +| `entity_type` | [Optional[models.PostV1CompanyFlowsEntityType]](../models/postv1companyflowsentitytype.md) | :heavy_minus_sign: | the type of target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details. | +| `options` | Dict[str, *Any*] | :heavy_minus_sign: | Optional configuration object that varies based on the flow_type. This can contain arbitrary key-value pairs specific to the flow being generated (e.g., { "provider": "guideline" }). | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidemployeebenefitsvalue2.md b/gusto_embedded/docs/models/postv1employeesemployeeidemployeebenefitsvalue2.md index adaff992..eeaa8dfe 100644 --- a/gusto_embedded/docs/models/postv1employeesemployeeidemployeebenefitsvalue2.md +++ b/gusto_embedded/docs/models/postv1employeesemployeeidemployeebenefitsvalue2.md @@ -5,7 +5,7 @@ A single tier of a tiered matching scheme. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | -| `threshold` | *Optional[str]* | :heavy_minus_sign: | The percentage threshold at which this tier ends (inclusive).

For example, a value of "5" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll.

If this is the first tier, a value of "5" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | +| `threshold` | *Optional[str]* | :heavy_minus_sign: | Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to.

Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards.

For example:

If the first tier has a threshold of "3", and rate of "100", the company will match 100% of employee contributions from 0% up to and including 3% of payroll.

If the next tier has a threshold of "5" and a rate of "50", the company will match 50% of contributions from above 3% up to and including 5% of payroll. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md b/gusto_embedded/docs/models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md new file mode 100644 index 00000000..bd7c5eed --- /dev/null +++ b/gusto_embedded/docs/models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidhomeaddressesrequest.md b/gusto_embedded/docs/models/postv1employeesemployeeidhomeaddressesrequest.md index 8d204900..ac3e4b62 100644 --- a/gusto_embedded/docs/models/postv1employeesemployeeidhomeaddressesrequest.md +++ b/gusto_embedded/docs/models/postv1employeesemployeeidhomeaddressesrequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion]](../models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PostV1EmployeesEmployeeIDHomeAddressesRequestBody](../models/postv1employeesemployeeidhomeaddressesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidhomeaddressesrequestbody.md b/gusto_embedded/docs/models/postv1employeesemployeeidhomeaddressesrequestbody.md index 7097ca9a..1adffefe 100644 --- a/gusto_embedded/docs/models/postv1employeesemployeeidhomeaddressesrequestbody.md +++ b/gusto_embedded/docs/models/postv1employeesemployeeidhomeaddressesrequestbody.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | 300 3rd Street | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | San Francisco | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | CA | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | 94107 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | 2022-01-31 | +| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md b/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md new file mode 100644 index 00000000..f99e3ea7 --- /dev/null +++ b/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsrequest.md b/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsrequest.md new file mode 100644 index 00000000..85a0e1ae --- /dev/null +++ b/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsrequest.md @@ -0,0 +1,10 @@ +# PostV1EmployeesEmployeeIDRecurringReimbursementsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion]](../models/postv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `request_body` | [models.PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBody](../models/postv1employeesemployeeidrecurringreimbursementsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsrequestbody.md b/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsrequestbody.md new file mode 100644 index 00000000..d76f7681 --- /dev/null +++ b/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsrequestbody.md @@ -0,0 +1,9 @@ +# PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `description` | *str* | :heavy_check_mark: | The description of the reimbursement | +| `amount` | *float* | :heavy_check_mark: | The dollar amount of the reimbursement | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsresponsebody.md b/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsresponsebody.md new file mode 100644 index 00000000..90a388a7 --- /dev/null +++ b/gusto_embedded/docs/models/postv1employeesemployeeidrecurringreimbursementsresponsebody.md @@ -0,0 +1,16 @@ +# PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBody + +successful + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *str* | :heavy_check_mark: | N/A | +| `employee_uuid` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `amount` | *str* | :heavy_check_mark: | N/A | +| `version` | *str* | :heavy_check_mark: | N/A | +| `created_at` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `updated_at` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesexperiencelevel.md b/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesexperiencelevel.md new file mode 100644 index 00000000..3c9dc91d --- /dev/null +++ b/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesexperiencelevel.md @@ -0,0 +1,14 @@ +# PostV1EmployeesEmployeeIDSalaryEstimatesExperienceLevel + +Experience level for this occupation + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `NOVICE` | novice | +| `INTERMEDIATE` | intermediate | +| `AVERAGE` | average | +| `SKILLED` | skilled | +| `EXPERT` | expert | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesheaderxgustoapiversion.md b/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesheaderxgustoapiversion.md new file mode 100644 index 00000000..a91ce302 --- /dev/null +++ b/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesoccupations.md b/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesoccupations.md new file mode 100644 index 00000000..ecfc7948 --- /dev/null +++ b/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesoccupations.md @@ -0,0 +1,11 @@ +# PostV1EmployeesEmployeeIDSalaryEstimatesOccupations + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `code` | *str* | :heavy_check_mark: | Bureau of Labor Statistics (BLS) occupation code | 151252 | +| `experience_level` | [models.PostV1EmployeesEmployeeIDSalaryEstimatesExperienceLevel](../models/postv1employeesemployeeidsalaryestimatesexperiencelevel.md) | :heavy_check_mark: | Experience level for this occupation | skilled | +| `time_percentage` | *str* | :heavy_check_mark: | Percentage of time spent in this occupation (as decimal, e.g., 1.0 = 100%) | 1 | +| `primary` | *Optional[bool]* | :heavy_minus_sign: | Whether this is the primary occupation | true | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesrequest.md b/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesrequest.md new file mode 100644 index 00000000..09e171d6 --- /dev/null +++ b/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesrequest.md @@ -0,0 +1,10 @@ +# PostV1EmployeesEmployeeIDSalaryEstimatesRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion]](../models/postv1employeesemployeeidsalaryestimatesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `request_body` | [models.PostV1EmployeesEmployeeIDSalaryEstimatesRequestBody](../models/postv1employeesemployeeidsalaryestimatesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesrequestbody.md b/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesrequestbody.md new file mode 100644 index 00000000..104bd2ae --- /dev/null +++ b/gusto_embedded/docs/models/postv1employeesemployeeidsalaryestimatesrequestbody.md @@ -0,0 +1,10 @@ +# PostV1EmployeesEmployeeIDSalaryEstimatesRequestBody + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `annual_net_revenue` | *OptionalNullable[float]* | :heavy_minus_sign: | The annual net revenue of the business (must be greater than 0) | 500000 | +| `zip_code` | *str* | :heavy_check_mark: | The ZIP code for location-based salary calculations | 94107 | +| `occupations` | List[[models.PostV1EmployeesEmployeeIDSalaryEstimatesOccupations](../models/postv1employeesemployeeidsalaryestimatesoccupations.md)] | :heavy_check_mark: | Array of occupations. Time percentages must sum to 100%. | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md b/gusto_embedded/docs/models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md new file mode 100644 index 00000000..21ad54ad --- /dev/null +++ b/gusto_embedded/docs/models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidworkaddressesrequest.md b/gusto_embedded/docs/models/postv1employeesemployeeidworkaddressesrequest.md index 5bf0b4d9..e7464da0 100644 --- a/gusto_embedded/docs/models/postv1employeesemployeeidworkaddressesrequest.md +++ b/gusto_embedded/docs/models/postv1employeesemployeeidworkaddressesrequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion]](../models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PostV1EmployeesEmployeeIDWorkAddressesRequestBody](../models/postv1employeesemployeeidworkaddressesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesemployeeidworkaddressesrequestbody.md b/gusto_embedded/docs/models/postv1employeesemployeeidworkaddressesrequestbody.md index 82ceb283..39b2b771 100644 --- a/gusto_embedded/docs/models/postv1employeesemployeeidworkaddressesrequestbody.md +++ b/gusto_embedded/docs/models/postv1employeesemployeeidworkaddressesrequestbody.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date the employee began working at the company location | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | 6a119be7-b4b0-4e27-aaa0-89d5f2524635 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date the employee began working at the company location | 2023-05-15 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1employeesrequestbody.md b/gusto_embedded/docs/models/postv1employeesrequestbody.md index 263ed396..67485b20 100644 --- a/gusto_embedded/docs/models/postv1employeesrequestbody.md +++ b/gusto_embedded/docs/models/postv1employeesrequestbody.md @@ -9,6 +9,7 @@ | `middle_initial` | *Optional[str]* | :heavy_minus_sign: | N/A | | `last_name` | *str* | :heavy_check_mark: | N/A | | `email` | *Optional[str]* | :heavy_minus_sign: | The employee's personal email address. | +| `work_email` | *Optional[str]* | :heavy_minus_sign: | The employee's work email address. | | `date_of_birth` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | | `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | | `preferred_first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | diff --git a/gusto_embedded/docs/models/postv1salaryestimatesuuidacceptheaderxgustoapiversion.md b/gusto_embedded/docs/models/postv1salaryestimatesuuidacceptheaderxgustoapiversion.md new file mode 100644 index 00000000..acc57535 --- /dev/null +++ b/gusto_embedded/docs/models/postv1salaryestimatesuuidacceptheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1salaryestimatesuuidacceptrequest.md b/gusto_embedded/docs/models/postv1salaryestimatesuuidacceptrequest.md new file mode 100644 index 00000000..eab27ebc --- /dev/null +++ b/gusto_embedded/docs/models/postv1salaryestimatesuuidacceptrequest.md @@ -0,0 +1,10 @@ +# PostV1SalaryEstimatesUUIDAcceptRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion]](../models/postv1salaryestimatesuuidacceptheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the salary estimate | +| `request_body` | [models.PostV1SalaryEstimatesUUIDAcceptRequestBody](../models/postv1salaryestimatesuuidacceptrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/postv1salaryestimatesuuidacceptrequestbody.md b/gusto_embedded/docs/models/postv1salaryestimatesuuidacceptrequestbody.md new file mode 100644 index 00000000..5d05c12e --- /dev/null +++ b/gusto_embedded/docs/models/postv1salaryestimatesuuidacceptrequestbody.md @@ -0,0 +1,8 @@ +# PostV1SalaryEstimatesUUIDAcceptRequestBody + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `employee_job_uuid` | *str* | :heavy_check_mark: | The UUID of the employee job to associate with this salary estimate | 7f5d3d93-6d6f-48c0-9f4e-cd12c2d3e4b2 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/processingstatuses.md b/gusto_embedded/docs/models/processingstatuses.md index 9363c1c4..ae4a9f0f 100644 --- a/gusto_embedded/docs/models/processingstatuses.md +++ b/gusto_embedded/docs/models/processingstatuses.md @@ -5,5 +5,5 @@ | Name | Value | | ------------- | ------------- | -| `UNPROCESSED` | unprocessed | -| `PROCESSED` | processed | \ No newline at end of file +| `PROCESSED` | processed | +| `UNPROCESSED` | unprocessed | \ No newline at end of file diff --git a/gusto_embedded/docs/models/puttimeoffpoliciestimeoffpolicyuuidrequestbody.md b/gusto_embedded/docs/models/puttimeoffpoliciestimeoffpolicyuuidrequestbody.md index 1b0b26c2..8842a5fc 100644 --- a/gusto_embedded/docs/models/puttimeoffpoliciestimeoffpolicyuuidrequestbody.md +++ b/gusto_embedded/docs/models/puttimeoffpoliciestimeoffpolicyuuidrequestbody.md @@ -15,4 +15,5 @@ Can update any attributes of the time off policy except policy_type, is_active, | `accrual_waiting_period_days` | *Optional[int]* | :heavy_minus_sign: | Number of days before an employee on the policy will begin accruing time off hours. If accrual_method is per_anniversary_year, per_calendar_year, or unlimited, then accrual_waiting_period_days should be 0. | | `carryover_limit_hours` | *Optional[str]* | :heavy_minus_sign: | The max number of hours an employee can carryover from one year to the next. If accrual_method is unlimited, then carryover_limit_hours must be blank. | | `max_accrual_hours_per_year` | *Optional[str]* | :heavy_minus_sign: | The max number of hours an employee can accrue in a year. If accrual_method is unlimited, then max_accrual_hours_per_year must be blank. | -| `max_hours` | *Optional[str]* | :heavy_minus_sign: | The max number of hours an employee can accrue. If accrual_method is unlimited, then max_hours must be blank. | \ No newline at end of file +| `max_hours` | *Optional[str]* | :heavy_minus_sign: | The max number of hours an employee can accrue. If accrual_method is unlimited, then max_hours must be blank. | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/api-fundamentals#optimistic-version-control) for information on how to use this field. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md b/gusto_embedded/docs/models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md new file mode 100644 index 00000000..8586ec45 --- /dev/null +++ b/gusto_embedded/docs/models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidcalculateresponsebody.md b/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidcalculateresponsebody.md index 32d7a60d..a5d7ad03 100644 --- a/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidcalculateresponsebody.md +++ b/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidcalculateresponsebody.md @@ -5,10 +5,10 @@ Unprocessable Entity ## Supported Types -### `models.UnprocessableEntityErrorObjectError` +### `models.UnprocessableEntityErrorObject` ```python -value: models.UnprocessableEntityErrorObjectError = /* values here */ +value: models.UnprocessableEntityErrorObject = /* values here */ ``` ### `models.PayrollBlockersError` diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequest.md b/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequest.md index 601ba90d..4388cc72 100644 --- a/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequest.md +++ b/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequest.md @@ -7,4 +7,8 @@ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `sort_by` | [Optional[models.PayrollPrepareSortBy]](../models/payrollpreparesortby.md) | :heavy_minus_sign: | Sort employee compenstations by name. Options: first_name, last_name | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `request_body` | [Optional[models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody]](../models/putv1companiescompanyidpayrollspayrollidpreparerequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequestbody.md b/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequestbody.md new file mode 100644 index 00000000..8c19c85e --- /dev/null +++ b/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidpreparerequestbody.md @@ -0,0 +1,8 @@ +# PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `employee_uuids` | List[*str*] | :heavy_minus_sign: | An array of employee UUIDs. If passed, only those employees payroll items will be prepared. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidsubmitresponsebody.md b/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidsubmitresponsebody.md index 8e17e719..5c37fdf3 100644 --- a/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidsubmitresponsebody.md +++ b/gusto_embedded/docs/models/putv1companiescompanyidpayrollspayrollidsubmitresponsebody.md @@ -5,10 +5,10 @@ Unprocessable Entity ## Supported Types -### `models.UnprocessableEntityErrorObjectError` +### `models.UnprocessableEntityErrorObject` ```python -value: models.UnprocessableEntityErrorObjectError = /* values here */ +value: models.UnprocessableEntityErrorObject = /* values here */ ``` ### `models.PayrollBlockersError` diff --git a/gusto_embedded/docs/models/putv1companiescompanyidpayrollsrequest.md b/gusto_embedded/docs/models/putv1companiescompanyidpayrollsrequest.md index 0007d44b..27519a91 100644 --- a/gusto_embedded/docs/models/putv1companiescompanyidpayrollsrequest.md +++ b/gusto_embedded/docs/models/putv1companiescompanyidpayrollsrequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `request_body` | [models.PutV1CompaniesCompanyIDPayrollsRequestBody](../models/putv1companiescompanyidpayrollsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `payroll_update` | [models.PayrollUpdate](../models/payrollupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md b/gusto_embedded/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md new file mode 100644 index 00000000..f0d803e0 --- /dev/null +++ b/gusto_embedded/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequest.md @@ -0,0 +1,10 @@ +# PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_benefit_id` | *str* | :heavy_check_mark: | The UUID of the company benefit | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `request_body` | [models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody](../models/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md b/gusto_embedded/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md new file mode 100644 index 00000000..dc6dbb22 --- /dev/null +++ b/gusto_embedded/docs/models/putv1companybenefitscompanybenefitidcontributionexclusionsrequestbody.md @@ -0,0 +1,8 @@ +# PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `contribution_exclusions` | List[[models.ContributionExclusion](../models/contributionexclusion.md)] | :heavy_check_mark: | The list of contribution exclusions to update | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1contractordocumentsignrequest.md b/gusto_embedded/docs/models/putv1contractordocumentsignrequest.md index 601c218b..3591349f 100644 --- a/gusto_embedded/docs/models/putv1contractordocumentsignrequest.md +++ b/gusto_embedded/docs/models/putv1contractordocumentsignrequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `document_uuid` | *str* | :heavy_check_mark: | The ID or UUID of the document | +| `document_uuid` | *str* | :heavy_check_mark: | The UUID of the document | | `x_gusto_client_ip` | *Optional[str]* | :heavy_minus_sign: | Optional header to supply the IP address. This can be used to supply the IP address for signature endpoints instead of the signed_by_ip_address parameter. | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PutV1ContractorDocumentSignRequestBody](../models/putv1contractordocumentsignrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.md b/gusto_embedded/docs/models/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.md new file mode 100644 index 00000000..f64d4205 --- /dev/null +++ b/gusto_embedded/docs/models/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1contractorpaymentgroupscontractorpaymentgroupidfundrequest.md b/gusto_embedded/docs/models/putv1contractorpaymentgroupscontractorpaymentgroupidfundrequest.md index 005b7a7b..747183a5 100644 --- a/gusto_embedded/docs/models/putv1contractorpaymentgroupscontractorpaymentgroupidfundrequest.md +++ b/gusto_embedded/docs/models/putv1contractorpaymentgroupscontractorpaymentgroupidfundrequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contractor_payment_group_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file +| `x_gusto_api_version` | [Optional[models.PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion]](../models/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1contractorscontractoridpaymentmethodrequestbody.md b/gusto_embedded/docs/models/putv1contractorscontractoridpaymentmethodrequestbody.md index 13e1d99f..626a4c91 100644 --- a/gusto_embedded/docs/models/putv1contractorscontractoridpaymentmethodrequestbody.md +++ b/gusto_embedded/docs/models/putv1contractorscontractoridpaymentmethodrequestbody.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `type` | [models.PutV1ContractorsContractorIDPaymentMethodType](../models/putv1contractorscontractoridpaymentmethodtype.md) | :heavy_check_mark: | The payment method type. If type is Direct Deposit, the contractor is required to have a bank account.
see [Bank account endpoint](./post-v1-contractors-contractor_uuid-bank_accounts) | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `type` | [models.PutV1ContractorsContractorIDPaymentMethodType](../models/putv1contractorscontractoridpaymentmethodtype.md) | :heavy_check_mark: | The payment method type. If type is Direct Deposit, the contractor is required to have a bank account.
see [Bank account endpoint](./post-v1-contractors-contractor_uuid-bank_accounts) | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1contractorscontractoruuidaddressrequestbody.md b/gusto_embedded/docs/models/putv1contractorscontractoruuidaddressrequestbody.md index 9e02b762..f1534baa 100644 --- a/gusto_embedded/docs/models/putv1contractorscontractoruuidaddressrequestbody.md +++ b/gusto_embedded/docs/models/putv1contractorscontractoruuidaddressrequestbody.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `street_2` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1contractorscontractoruuidrequestbody.md b/gusto_embedded/docs/models/putv1contractorscontractoruuidrequestbody.md index 03bb755d..2583504e 100644 --- a/gusto_embedded/docs/models/putv1contractorscontractoruuidrequestbody.md +++ b/gusto_embedded/docs/models/putv1contractorscontractoruuidrequestbody.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | | `type` | [Optional[models.PutV1ContractorsContractorUUIDType]](../models/putv1contractorscontractoruuidtype.md) | :heavy_minus_sign: | The contractor type. | | | `wage_type` | [Optional[models.PutV1ContractorsContractorUUIDWageType]](../models/putv1contractorscontractoruuidwagetype.md) | :heavy_minus_sign: | The contractor’s wage type.
| | | `start_date` | *Optional[str]* | :heavy_minus_sign: | The day when the contractor will start working for the company.
| 2020-01-11 | diff --git a/gusto_embedded/docs/models/putv1employeebenefitsemployeebenefitidvalue2.md b/gusto_embedded/docs/models/putv1employeebenefitsemployeebenefitidvalue2.md index bdc0c650..ef9bac0b 100644 --- a/gusto_embedded/docs/models/putv1employeebenefitsemployeebenefitidvalue2.md +++ b/gusto_embedded/docs/models/putv1employeebenefitsemployeebenefitidvalue2.md @@ -5,7 +5,7 @@ A single tier of a tiered matching scheme. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | -| `threshold` | *Optional[str]* | :heavy_minus_sign: | The percentage threshold at which this tier ends (inclusive).

For example, a value of "5" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll.

If this is the first tier, a value of "5" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | +| `threshold` | *Optional[str]* | :heavy_minus_sign: | Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to.

Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards.

For example:

If the first tier has a threshold of "3", and rate of "100", the company will match 100% of employee contributions from 0% up to and including 3% of payroll.

If the next tier has a threshold of "5" and a rate of "50", the company will match 50% of contributions from above 3% up to and including 5% of payroll. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1employeesemployeeidonboardingstatusonboardingstatus.md b/gusto_embedded/docs/models/putv1employeesemployeeidonboardingstatusonboardingstatus.md index 7a003ef8..b627420a 100644 --- a/gusto_embedded/docs/models/putv1employeesemployeeidonboardingstatusonboardingstatus.md +++ b/gusto_embedded/docs/models/putv1employeesemployeeidonboardingstatusonboardingstatus.md @@ -5,8 +5,13 @@ Onboarding status value ## Values -| Name | Value | -| ----------------------------- | ----------------------------- | -| `SELF_ONBOARDING_INVITED` | self_onboarding_invited | -| `ADMIN_ONBOARDING_INCOMPLETE` | admin_onboarding_incomplete | -| `ONBOARDING_COMPLETED` | onboarding_completed | \ No newline at end of file +| Name | Value | +| --------------------------------------- | --------------------------------------- | +| `ADMIN_ONBOARDING_INCOMPLETE` | admin_onboarding_incomplete | +| `SELF_ONBOARDING_PENDING_INVITE` | self_onboarding_pending_invite | +| `SELF_ONBOARDING_INVITED` | self_onboarding_invited | +| `SELF_ONBOARDING_INVITED_STARTED` | self_onboarding_invited_started | +| `SELF_ONBOARDING_INVITED_OVERDUE` | self_onboarding_invited_overdue | +| `SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE` | self_onboarding_completed_by_employee | +| `SELF_ONBOARDING_AWAITING_ADMIN_REVIEW` | self_onboarding_awaiting_admin_review | +| `ONBOARDING_COMPLETED` | onboarding_completed | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodrequestbody.md b/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodrequestbody.md index 3f04f852..8168f883 100644 --- a/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodrequestbody.md +++ b/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodrequestbody.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. | -| `type` | [models.PutV1EmployeesEmployeeIDPaymentMethodType](../models/putv1employeesemployeeidpaymentmethodtype.md) | :heavy_check_mark: | The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required. | -| `split_by` | [Optional[models.PutV1EmployeesEmployeeIDPaymentMethodSplitBy]](../models/putv1employeesemployeeidpaymentmethodsplitby.md) | :heavy_minus_sign: | Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. | -| `splits` | List[[models.Splits](../models/splits.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. | +| `type` | [models.PutV1EmployeesEmployeeIDPaymentMethodType](../models/putv1employeesemployeeidpaymentmethodtype.md) | :heavy_check_mark: | The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required. | +| `split_by` | [Optional[models.PutV1EmployeesEmployeeIDPaymentMethodSplitBy]](../models/putv1employeesemployeeidpaymentmethodsplitby.md) | :heavy_minus_sign: | Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last `split` amount must be `null` to capture the remainder. | +| `splits` | List[[models.PutV1EmployeesEmployeeIDPaymentMethodSplits](../models/putv1employeesemployeeidpaymentmethodsplits.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodsplitby.md b/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodsplitby.md index bf23e64e..a8ced048 100644 --- a/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodsplitby.md +++ b/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodsplitby.md @@ -1,6 +1,6 @@ # PutV1EmployeesEmployeeIDPaymentMethodSplitBy -Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. +Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last `split` amount must be `null` to capture the remainder. ## Values diff --git a/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodsplits.md b/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodsplits.md new file mode 100644 index 00000000..d505d277 --- /dev/null +++ b/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodsplits.md @@ -0,0 +1,11 @@ +# PutV1EmployeesEmployeeIDPaymentMethodSplits + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | The bank account ID
| +| `name` | *Optional[str]* | :heavy_minus_sign: | The bank account name | +| `priority` | *Optional[int]* | :heavy_minus_sign: | The order of priority for each payment split, with priority 1 being the first bank account paid. Priority must be unique and sequential. | +| `split_amount` | *OptionalNullable[int]* | :heavy_minus_sign: | The cents amount allocated for each payment split | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodtype.md b/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodtype.md index f4cd28f6..2738d904 100644 --- a/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodtype.md +++ b/gusto_embedded/docs/models/putv1employeesemployeeidpaymentmethodtype.md @@ -1,6 +1,6 @@ # PutV1EmployeesEmployeeIDPaymentMethodType -The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required. +The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required. ## Values diff --git a/gusto_embedded/docs/models/putv1employeesemployeeidrehirerequestbody.md b/gusto_embedded/docs/models/putv1employeesemployeeidrehirerequestbody.md index 88ee8a60..777bb82d 100644 --- a/gusto_embedded/docs/models/putv1employeesemployeeidrehirerequestbody.md +++ b/gusto_embedded/docs/models/putv1employeesemployeeidrehirerequestbody.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `effective_date` | *str* | :heavy_check_mark: | The day when the employee returns to work. | -| `file_new_hire_report` | *bool* | :heavy_check_mark: | The boolean flag indicating whether Gusto will file a new hire report for the employee. | -| `work_location_uuid` | *str* | :heavy_check_mark: | The uuid of the employee's work location. | -| `employment_status` | [Optional[models.PutV1EmployeesEmployeeIDRehireEmploymentStatus]](../models/putv1employeesemployeeidrehireemploymentstatus.md) | :heavy_minus_sign: | The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. | -| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `effective_date` | *str* | :heavy_check_mark: | The day when the employee returns to work. | | +| `file_new_hire_report` | *bool* | :heavy_check_mark: | The boolean flag indicating whether Gusto will file a new hire report for the employee. | | +| `work_location_uuid` | *str* | :heavy_check_mark: | The uuid of the employee's work location. | | +| `employment_status` | [Optional[models.PutV1EmployeesEmployeeIDRehireEmploymentStatus]](../models/putv1employeesemployeeidrehireemploymentstatus.md) | :heavy_minus_sign: | The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. | | +| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesheaderxgustoapiversion.md b/gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesheaderxgustoapiversion.md new file mode 100644 index 00000000..d620d15f --- /dev/null +++ b/gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesrequest.md b/gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesrequest.md index 42b640d7..74db46f9 100644 --- a/gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesrequest.md +++ b/gusto_embedded/docs/models/putv1employeesemployeeidstatetaxesrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion]](../models/putv1employeesemployeeidstatetaxesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `employee_uuid` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `request_body` | [models.PutV1EmployeesEmployeeIDStateTaxesRequestBody](../models/putv1employeesemployeeidstatetaxesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `employee_state_taxes_request` | [models.EmployeeStateTaxesRequest](../models/employeestatetaxesrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1employeesheaderxgustoapiversion.md b/gusto_embedded/docs/models/putv1employeesheaderxgustoapiversion.md new file mode 100644 index 00000000..63293c04 --- /dev/null +++ b/gusto_embedded/docs/models/putv1employeesheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1EmployeesHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1employeesrequest.md b/gusto_embedded/docs/models/putv1employeesrequest.md index cc8eea80..9bbc71f7 100644 --- a/gusto_embedded/docs/models/putv1employeesrequest.md +++ b/gusto_embedded/docs/models/putv1employeesrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `x_gusto_api_version` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `request_body` | [models.PutV1EmployeesRequestBody](../models/putv1employeesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PutV1EmployeesHeaderXGustoAPIVersion]](../models/putv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `request_body` | [models.PutV1EmployeesRequestBody](../models/putv1employeesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1employeesrequestbody.md b/gusto_embedded/docs/models/putv1employeesrequestbody.md index af25bb23..a0cc6631 100644 --- a/gusto_embedded/docs/models/putv1employeesrequestbody.md +++ b/gusto_embedded/docs/models/putv1employeesrequestbody.md @@ -3,14 +3,15 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `last_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `email` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `date_of_birth` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | Weezy | +| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | F | +| `last_name` | *Optional[str]* | :heavy_minus_sign: | N/A | Baby | +| `email` | *Optional[str]* | :heavy_minus_sign: | N/A | tunechi@cashmoneyrecords.com | +| `work_email` | *Optional[str]* | :heavy_minus_sign: | N/A | new.partner.work@example.com | +| `date_of_birth` | *Optional[str]* | :heavy_minus_sign: | N/A | 1991-01-31 | +| `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | 824920233 | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1historicalemployeesrequestbody.md b/gusto_embedded/docs/models/putv1historicalemployeesrequestbody.md index c7141089..d6b5629f 100644 --- a/gusto_embedded/docs/models/putv1historicalemployeesrequestbody.md +++ b/gusto_embedded/docs/models/putv1historicalemployeesrequestbody.md @@ -5,18 +5,18 @@ Update a historical employee. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `first_name` | *str* | :heavy_check_mark: | N/A | -| `middle_initial` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `last_name` | *str* | :heavy_check_mark: | N/A | -| `preferred_first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `date_of_birth` | *str* | :heavy_check_mark: | N/A | -| `ssn` | *str* | :heavy_check_mark: | N/A | -| `work_address` | [models.PutV1HistoricalEmployeesWorkAddress](../models/putv1historicalemployeesworkaddress.md) | :heavy_check_mark: | N/A | -| `home_address` | [models.PutV1HistoricalEmployeesHomeAddress](../models/putv1historicalemployeeshomeaddress.md) | :heavy_check_mark: | N/A | -| `termination` | [models.PutV1HistoricalEmployeesTermination](../models/putv1historicalemployeestermination.md) | :heavy_check_mark: | N/A | -| `email` | *Optional[str]* | :heavy_minus_sign: | Optional. If provided, the email address will be saved to the employee. | -| `job` | [models.PutV1HistoricalEmployeesJob](../models/putv1historicalemployeesjob.md) | :heavy_check_mark: | N/A | -| `employee_state_taxes` | [Optional[models.PutV1HistoricalEmployeesEmployeeStateTaxes]](../models/putv1historicalemployeesemployeestatetaxes.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `first_name` | *str* | :heavy_check_mark: | N/A | | +| `middle_initial` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `last_name` | *str* | :heavy_check_mark: | N/A | | +| `preferred_first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `date_of_birth` | *str* | :heavy_check_mark: | N/A | | +| `ssn` | *str* | :heavy_check_mark: | N/A | | +| `work_address` | [models.PutV1HistoricalEmployeesWorkAddress](../models/putv1historicalemployeesworkaddress.md) | :heavy_check_mark: | N/A | | +| `home_address` | [models.PutV1HistoricalEmployeesHomeAddress](../models/putv1historicalemployeeshomeaddress.md) | :heavy_check_mark: | N/A | | +| `termination` | [models.PutV1HistoricalEmployeesTermination](../models/putv1historicalemployeestermination.md) | :heavy_check_mark: | N/A | | +| `email` | *Optional[str]* | :heavy_minus_sign: | Optional. If provided, the email address will be saved to the employee. | | +| `job` | [models.PutV1HistoricalEmployeesJob](../models/putv1historicalemployeesjob.md) | :heavy_check_mark: | N/A | | +| `employee_state_taxes` | [Optional[models.PutV1HistoricalEmployeesEmployeeStateTaxes]](../models/putv1historicalemployeesemployeestatetaxes.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md b/gusto_embedded/docs/models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..7b88ddec --- /dev/null +++ b/gusto_embedded/docs/models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1homeaddresseshomeaddressuuidrequest.md b/gusto_embedded/docs/models/putv1homeaddresseshomeaddressuuidrequest.md index 038b110d..6cfadabb 100644 --- a/gusto_embedded/docs/models/putv1homeaddresseshomeaddressuuidrequest.md +++ b/gusto_embedded/docs/models/putv1homeaddresseshomeaddressuuidrequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PutV1HomeAddressesHomeAddressUUIDRequestBody](../models/putv1homeaddresseshomeaddressuuidrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1homeaddresseshomeaddressuuidrequestbody.md b/gusto_embedded/docs/models/putv1homeaddresseshomeaddressuuidrequestbody.md index c728a4de..0031f588 100644 --- a/gusto_embedded/docs/models/putv1homeaddresseshomeaddressuuidrequestbody.md +++ b/gusto_embedded/docs/models/putv1homeaddresseshomeaddressuuidrequestbody.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | | +| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1locationslocationidrequestbody.md b/gusto_embedded/docs/models/putv1locationslocationidrequestbody.md index d126005a..a0f7f0c1 100644 --- a/gusto_embedded/docs/models/putv1locationslocationidrequestbody.md +++ b/gusto_embedded/docs/models/putv1locationslocationidrequestbody.md @@ -3,15 +3,15 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `phone_number` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `country` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mailing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's mailing address. A company has a single mailing address, so this designation will override any previous selection. | -| `filing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's filing address. A company has a single filing address, so this designation will override any previous selection. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `phone_number` | *Optional[str]* | :heavy_minus_sign: | N/A | 8009360383 | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | 300 3rd Street | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | Apartment 318 | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | San Francisco | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | 94107 | +| `country` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `mailing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's mailing address. A company has a single mailing address, so this designation will override any previous selection. | | +| `filing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's filing address. A company has a single filing address, so this designation will override any previous selection. | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1recurringreimbursementsheaderxgustoapiversion.md b/gusto_embedded/docs/models/putv1recurringreimbursementsheaderxgustoapiversion.md new file mode 100644 index 00000000..2a47c69c --- /dev/null +++ b/gusto_embedded/docs/models/putv1recurringreimbursementsheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1RecurringReimbursementsHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1recurringreimbursementsrequest.md b/gusto_embedded/docs/models/putv1recurringreimbursementsrequest.md new file mode 100644 index 00000000..d210ecb2 --- /dev/null +++ b/gusto_embedded/docs/models/putv1recurringreimbursementsrequest.md @@ -0,0 +1,10 @@ +# PutV1RecurringReimbursementsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PutV1RecurringReimbursementsHeaderXGustoAPIVersion]](../models/putv1recurringreimbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `id` | *str* | :heavy_check_mark: | The UUID of the reimbursement | +| `request_body` | [models.PutV1RecurringReimbursementsRequestBody](../models/putv1recurringreimbursementsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1recurringreimbursementsrequestbody.md b/gusto_embedded/docs/models/putv1recurringreimbursementsrequestbody.md new file mode 100644 index 00000000..4bca17ca --- /dev/null +++ b/gusto_embedded/docs/models/putv1recurringreimbursementsrequestbody.md @@ -0,0 +1,10 @@ +# PutV1RecurringReimbursementsRequestBody + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `description` | *Optional[str]* | :heavy_minus_sign: | The description of the reimbursement | | +| `amount` | *Optional[float]* | :heavy_minus_sign: | The dollar amount of the reimbursement | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1recurringreimbursementsresponsebody.md b/gusto_embedded/docs/models/putv1recurringreimbursementsresponsebody.md new file mode 100644 index 00000000..62edd603 --- /dev/null +++ b/gusto_embedded/docs/models/putv1recurringreimbursementsresponsebody.md @@ -0,0 +1,16 @@ +# PutV1RecurringReimbursementsResponseBody + +successful + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *str* | :heavy_check_mark: | N/A | +| `employee_uuid` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `amount` | *str* | :heavy_check_mark: | N/A | +| `version` | *str* | :heavy_check_mark: | N/A | +| `created_at` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `updated_at` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1salaryestimatesidexperiencelevel.md b/gusto_embedded/docs/models/putv1salaryestimatesidexperiencelevel.md new file mode 100644 index 00000000..00158056 --- /dev/null +++ b/gusto_embedded/docs/models/putv1salaryestimatesidexperiencelevel.md @@ -0,0 +1,14 @@ +# PutV1SalaryEstimatesIDExperienceLevel + +Experience level for this occupation + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `NOVICE` | novice | +| `INTERMEDIATE` | intermediate | +| `AVERAGE` | average | +| `SKILLED` | skilled | +| `EXPERT` | expert | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1salaryestimatesidheaderxgustoapiversion.md b/gusto_embedded/docs/models/putv1salaryestimatesidheaderxgustoapiversion.md new file mode 100644 index 00000000..c362b845 --- /dev/null +++ b/gusto_embedded/docs/models/putv1salaryestimatesidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1SalaryEstimatesIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1salaryestimatesidoccupations.md b/gusto_embedded/docs/models/putv1salaryestimatesidoccupations.md new file mode 100644 index 00000000..a4045293 --- /dev/null +++ b/gusto_embedded/docs/models/putv1salaryestimatesidoccupations.md @@ -0,0 +1,11 @@ +# PutV1SalaryEstimatesIDOccupations + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `code` | *str* | :heavy_check_mark: | Bureau of Labor Statistics (BLS) occupation code | 151252 | +| `experience_level` | [models.PutV1SalaryEstimatesIDExperienceLevel](../models/putv1salaryestimatesidexperiencelevel.md) | :heavy_check_mark: | Experience level for this occupation | expert | +| `time_percentage` | *str* | :heavy_check_mark: | Percentage of time spent in this occupation (as decimal, e.g., 0.5 = 50%) | 0.6 | +| `primary` | *Optional[bool]* | :heavy_minus_sign: | Whether this is the primary occupation | true | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1salaryestimatesidrequest.md b/gusto_embedded/docs/models/putv1salaryestimatesidrequest.md new file mode 100644 index 00000000..5155eebf --- /dev/null +++ b/gusto_embedded/docs/models/putv1salaryestimatesidrequest.md @@ -0,0 +1,10 @@ +# PutV1SalaryEstimatesIDRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `x_gusto_api_version` | [Optional[models.PutV1SalaryEstimatesIDHeaderXGustoAPIVersion]](../models/putv1salaryestimatesidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the salary estimate | +| `request_body` | [models.PutV1SalaryEstimatesIDRequestBody](../models/putv1salaryestimatesidrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1salaryestimatesidrequestbody.md b/gusto_embedded/docs/models/putv1salaryestimatesidrequestbody.md new file mode 100644 index 00000000..4708cbab --- /dev/null +++ b/gusto_embedded/docs/models/putv1salaryestimatesidrequestbody.md @@ -0,0 +1,10 @@ +# PutV1SalaryEstimatesIDRequestBody + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `annual_net_revenue` | *OptionalNullable[float]* | :heavy_minus_sign: | The annual net revenue of the business (must be greater than 0) | 600000 | +| `zip_code` | *str* | :heavy_check_mark: | The ZIP code for location-based salary calculations | 94107 | +| `occupations` | List[[models.PutV1SalaryEstimatesIDOccupations](../models/putv1salaryestimatesidoccupations.md)] | :heavy_check_mark: | Array of occupations. Time percentages must sum to 100%. | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1terminationsemployeeidrequestbody.md b/gusto_embedded/docs/models/putv1terminationsemployeeidrequestbody.md index 08eeedeb..c52b27b5 100644 --- a/gusto_embedded/docs/models/putv1terminationsemployeeidrequestbody.md +++ b/gusto_embedded/docs/models/putv1terminationsemployeeidrequestbody.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `effective_date` | *str* | :heavy_check_mark: | The employee's last day of work. | -| `run_termination_payroll` | *Optional[bool]* | :heavy_minus_sign: | If true, the employee should receive their final wages via an off-cycle payroll. If false, they should receive their final wages on their current pay schedule. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `effective_date` | *str* | :heavy_check_mark: | The employee's last day of work. | | +| `run_termination_payroll` | *Optional[bool]* | :heavy_minus_sign: | If true, the employee should receive their final wages via an off-cycle payroll. If false, they should receive their final wages on their current pay schedule. | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md b/gusto_embedded/docs/models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md new file mode 100644 index 00000000..0b000fe8 --- /dev/null +++ b/gusto_embedded/docs/models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md @@ -0,0 +1,10 @@ +# PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + +Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + + +## Values + +| Name | Value | +| ------------------------------------------------ | ------------------------------------------------ | +| `TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01` | 2024-04-01 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1workaddressesworkaddressuuidrequest.md b/gusto_embedded/docs/models/putv1workaddressesworkaddressuuidrequest.md index 1a69d9c2..e25a4a88 100644 --- a/gusto_embedded/docs/models/putv1workaddressesworkaddressuuidrequest.md +++ b/gusto_embedded/docs/models/putv1workaddressesworkaddressuuidrequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `request_body` | [models.PutV1WorkAddressesWorkAddressUUIDRequestBody](../models/putv1workaddressesworkaddressuuidrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/putv1workaddressesworkaddressuuidrequestbody.md b/gusto_embedded/docs/models/putv1workaddressesworkaddressuuidrequestbody.md index 27bb04d5..4a46901c 100644 --- a/gusto_embedded/docs/models/putv1workaddressesworkaddressuuidrequestbody.md +++ b/gusto_embedded/docs/models/putv1workaddressesworkaddressuuidrequestbody.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | 6a119be7-b4b0-4e27-aaa0-89d5f2524635 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | 2023-05-15 | \ No newline at end of file diff --git a/gusto_embedded/docs/models/queryparaminclude.md b/gusto_embedded/docs/models/queryparaminclude.md index 08b8feec..433bf334 100644 --- a/gusto_embedded/docs/models/queryparaminclude.md +++ b/gusto_embedded/docs/models/queryparaminclude.md @@ -3,8 +3,11 @@ ## Values -| Name | Value | -| ------------------- | ------------------- | -| `CUSTOM_FIELDS` | custom_fields | -| `ALL_COMPENSATIONS` | all_compensations | -| `COMPANY_NAME` | company_name | \ No newline at end of file +| Name | Value | +| ---------------------- | ---------------------- | +| `ALL_COMPENSATIONS` | all_compensations | +| `ALL_HOME_ADDRESSES` | all_home_addresses | +| `COMPANY_NAME` | company_name | +| `CURRENT_HOME_ADDRESS` | current_home_address | +| `CUSTOM_FIELDS` | custom_fields | +| `PORTAL_INVITATIONS` | portal_invitations | \ No newline at end of file diff --git a/gusto_embedded/docs/models/queryparamsortorder.md b/gusto_embedded/docs/models/queryparamsortorder.md new file mode 100644 index 00000000..ecf66e69 --- /dev/null +++ b/gusto_embedded/docs/models/queryparamsortorder.md @@ -0,0 +1,11 @@ +# QueryParamSortOrder + +A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. + + +## Values + +| Name | Value | +| ------ | ------ | +| `ASC` | asc | +| `DESC` | desc | \ No newline at end of file diff --git a/gusto_embedded/docs/models/queryparamstatus.md b/gusto_embedded/docs/models/queryparamstatus.md new file mode 100644 index 00000000..28dacaa5 --- /dev/null +++ b/gusto_embedded/docs/models/queryparamstatus.md @@ -0,0 +1,10 @@ +# QueryParamStatus + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `OPEN` | open | +| `EXPIRED` | expired | +| `RESOLVED` | resolved | \ No newline at end of file diff --git a/gusto_embedded/docs/models/ratetype.md b/gusto_embedded/docs/models/ratetype.md index 5fc80144..3a8ab5b1 100644 --- a/gusto_embedded/docs/models/ratetype.md +++ b/gusto_embedded/docs/models/ratetype.md @@ -1,8 +1,8 @@ # RateType [for `workers_compensation_rate`] The type of rate being collected. Either: - - `percent`: A percentage formatted as a decimal, e.g. `0.01` for 1% - - `currency_per_hour`: A dollar amount per hour, e.g. `3.24` for $3.24/hr + - `percent`: A percentage formatted as a decimal, e.g. `0.01` for 1% + - `currency_per_hour`: A dollar amount per hour, e.g. `3.24` for $3.24/hr diff --git a/gusto_embedded/docs/models/reason.md b/gusto_embedded/docs/models/reason.md index e569f3a3..ac049ff7 100644 --- a/gusto_embedded/docs/models/reason.md +++ b/gusto_embedded/docs/models/reason.md @@ -3,10 +3,10 @@ Explanation for why the company is suspending their account. > 🚧 FEIN or entity type changes require Customer Support -> > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time. + ## Values | Name | Value | diff --git a/gusto_embedded/docs/models/reimbursementsmodel.md b/gusto_embedded/docs/models/reimbursementsmodel.md new file mode 100644 index 00000000..0862cdd3 --- /dev/null +++ b/gusto_embedded/docs/models/reimbursementsmodel.md @@ -0,0 +1,11 @@ +# ReimbursementsModel + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `amount` | *str* | :heavy_check_mark: | The dollar amount of the reimbursement for the pay period. | +| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the reimbursement. Null for unnamed reimbursements. | +| `uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls. | +| `recurring` | *Optional[bool]* | :heavy_minus_sign: | Whether the reimbursement is recurring. This field is only available for unprocessed payrolls. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/resources.md b/gusto_embedded/docs/models/resources.md index dc92afd8..3e2c2c3d 100644 --- a/gusto_embedded/docs/models/resources.md +++ b/gusto_embedded/docs/models/resources.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `entity_type` | *str* | :heavy_check_mark: | The type of entity being described, could be “Contractor”, “Employee”, “BankAccount”, “Payroll”, “ContractorPayment”, “RecoveryCase”, or “Signatory” | +| `entity_type` | [models.NotificationEntityType](../models/notificationentitytype.md) | :heavy_check_mark: | The type of entity being described. | | `entity_uuid` | *str* | :heavy_check_mark: | Unique identifier of the entity | | `reference_type` | *Optional[str]* | :heavy_minus_sign: | Optional. The type of a resource that is related to the one described by entity_type and entity_uuid. For instance, if the entity_type is “BankAccount”, the reference_type could be the “Employee” or “Contractor” to whom the bank account belongs. | | `reference_uuid` | *Optional[str]* | :heavy_minus_sign: | Optional. Unique identifier of the reference. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/salaryestimate.md b/gusto_embedded/docs/models/salaryestimate.md new file mode 100644 index 00000000..68acf93e --- /dev/null +++ b/gusto_embedded/docs/models/salaryestimate.md @@ -0,0 +1,19 @@ +# SalaryEstimate + +A salary estimate calculation for an S-Corp owner based on occupation, experience level, location, and business revenue. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the salary estimate. | +| `employee_uuid` | *Nullable[str]* | :heavy_check_mark: | The UUID of the employee this salary estimate is for. | +| `employee_job_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the employee job this salary estimate is associated with (once accepted). | +| `annual_net_revenue` | *Nullable[str]* | :heavy_check_mark: | The annual net revenue of the business used for salary calculations. | +| `zip_code` | *Nullable[str]* | :heavy_check_mark: | The ZIP code used for location-based salary calculations. | +| `result` | *OptionalNullable[int]* | :heavy_minus_sign: | The calculated reasonable salary estimate in cents. Null if not yet calculated. | +| `accepted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The timestamp when this salary estimate was accepted and finalized. | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The timestamp when this salary estimate was created. | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The timestamp when this salary estimate was last updated. | +| `occupations` | List[[models.Occupations](../models/occupations.md)] | :heavy_check_mark: | Array of occupations with their experience levels and time allocations. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/showemployees.md b/gusto_embedded/docs/models/showemployees.md new file mode 100644 index 00000000..1c5e39a4 --- /dev/null +++ b/gusto_embedded/docs/models/showemployees.md @@ -0,0 +1,47 @@ +# ShowEmployees + +The representation of an employee in Gusto. + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the employee in Gusto. | | +| `first_name` | *str* | :heavy_check_mark: | N/A | | +| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `last_name` | *str* | :heavy_check_mark: | N/A | | +| `email` | *OptionalNullable[str]* | :heavy_minus_sign: | The personal email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | | +| `company_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company the employee is employed by. | | +| `manager_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the employee's manager. | | +| `version` | *Optional[str]* | :heavy_minus_sign: | The current version of the employee. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | | +| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee's department in the company. | | +| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is terminated. | | +| `two_percent_shareholder` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | +| `work_email` | *OptionalNullable[str]* | :heavy_minus_sign: | The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing). | | +| `onboarded` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee has completed onboarding. | | +| `onboarding_status` | [OptionalNullable[models.OnboardingStatus]](../models/onboardingstatus.md) | :heavy_minus_sign: | The current onboarding status of the employee | | +| `onboarding_documents_config` | [Optional[models.OnboardingDocumentsConfig]](../models/onboardingdocumentsconfig.md) | :heavy_minus_sign: | Configuration for an employee onboarding documents during onboarding | | +| `jobs` | List[[models.Job](../models/job.md)] | :heavy_minus_sign: | N/A | | +| `eligible_paid_time_off` | List[[models.PaidTimeOff](../models/paidtimeoff.md)] | :heavy_minus_sign: | N/A | | +| `terminations` | List[[models.Termination](../models/termination.md)] | :heavy_minus_sign: | N/A | | +| `garnishments` | List[[models.Garnishment](../models/garnishment.md)] | :heavy_minus_sign: | N/A | | +| `custom_fields` | List[[models.EmployeeCustomField](../models/employeecustomfield.md)] | :heavy_minus_sign: | Custom fields are only included for the employee if the include param has the custom_fields value set | | +| `date_of_birth` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `has_ssn` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the employee has an SSN in Gusto. | | +| `ssn` | *Optional[str]* | :heavy_minus_sign: | Deprecated. This field always returns an empty string. | | +| `phone` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `payment_method` | [Optional[models.PaymentMethod]](../models/paymentmethod.md) | :heavy_minus_sign: | The employee's payment method | | +| `current_employment_status` | [OptionalNullable[models.CurrentEmploymentStatus]](../models/currentemploymentstatus.md) | :heavy_minus_sign: | The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less. | | +| `historical` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `employee_code` | *Optional[str]* | :heavy_minus_sign: | The short format code of the employee | | +| `department_uuid` | *OptionalNullable[str]* | :heavy_minus_sign: | The UUID of the department the employee is under | | +| `title` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `hired_at` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date when the employee was hired to the company | | +| `hidden_ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `flsa_status` | [Optional[models.FlsaStatusType]](../models/flsastatustype.md) | :heavy_minus_sign: | The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company. | | +| `applicable_tax_ids` | List[*float*] | :heavy_minus_sign: | N/A | | +| `current_home_address` | [Optional[models.EmployeeHomeAddress]](../models/employeehomeaddress.md) | :heavy_minus_sign: | N/A | {
"street_1": "412 Kiera Stravenue",
"street_2": "Suite 391",
"city": "San Francisco",
"state": "CA",
"zip": "94107",
"country": "USA",
"active": true,
"uiud": "sample-uuid-123231"
} | +| `all_home_addresses` | List[[models.EmployeeHomeAddress](../models/employeehomeaddress.md)] | :heavy_minus_sign: | N/A | | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/gusto_embedded/docs/models/sortby.md b/gusto_embedded/docs/models/sortby.md new file mode 100644 index 00000000..2bee5703 --- /dev/null +++ b/gusto_embedded/docs/models/sortby.md @@ -0,0 +1,11 @@ +# SortBy + +Field to sort employee compensations by + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `FIRST_NAME` | first_name | +| `LAST_NAME` | last_name | \ No newline at end of file diff --git a/gusto_embedded/docs/models/splitby.md b/gusto_embedded/docs/models/splitby.md index 4e139518..9290118f 100644 --- a/gusto_embedded/docs/models/splitby.md +++ b/gusto_embedded/docs/models/splitby.md @@ -1,11 +1,11 @@ # SplitBy -Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. +How the payment is split. This field is applicable when `payment_method` is "Direct Deposit". ## Values | Name | Value | | ------------ | ------------ | -| `AMOUNT` | Amount | -| `PERCENTAGE` | Percentage | \ No newline at end of file +| `PERCENTAGE` | Percentage | +| `AMOUNT` | Amount | \ No newline at end of file diff --git a/gusto_embedded/docs/models/splits.md b/gusto_embedded/docs/models/splits.md index 349c9d8d..643775dc 100644 --- a/gusto_embedded/docs/models/splits.md +++ b/gusto_embedded/docs/models/splits.md @@ -3,9 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `uuid` | *Optional[str]* | :heavy_minus_sign: | The bank account ID
| -| `name` | *Optional[str]* | :heavy_minus_sign: | The bank account name | -| `priority` | *Optional[int]* | :heavy_minus_sign: | The order of priority for each payment split, with priority 1 being the first bank account paid. Priority must be unique and sequential. | -| `split_amount` | *OptionalNullable[int]* | :heavy_minus_sign: | The cents amount allocated for each payment split | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `bank_account_uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `hidden_account_number` | *Optional[str]* | :heavy_minus_sign: | An obfuscated version of the account number which can be used for display purposes. | +| `encrypted_account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Ciphertext containing the full bank account number, which must be decrypted using a key provided by Gusto. Only visible with the `contractor_payment_methods:read:account_number` scope. | +| `routing_number` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `priority` | *Optional[int]* | :heavy_minus_sign: | The order of priority for each payment split, with priority 1 being the first bank account paid. Priority must be unique and sequential. | +| `split_amount` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `account_type` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/gusto_embedded/docs/models/supportedbenefit.md b/gusto_embedded/docs/models/supportedbenefit.md index 53d1f7bc..8b0d7925 100644 --- a/gusto_embedded/docs/models/supportedbenefit.md +++ b/gusto_embedded/docs/models/supportedbenefit.md @@ -16,4 +16,5 @@ Example response | `healthcare` | *Optional[bool]* | :heavy_minus_sign: | Whether the benefit is healthcare related. | | `retirement` | *Optional[bool]* | :heavy_minus_sign: | Whether the benefit is associated with retirement planning. | | `yearly_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether the benefit has a government mandated yearly limit. If the benefit has a government mandated yearly limit, employees cannot be added to more than one benefit of this type. | -| `category` | *Optional[str]* | :heavy_minus_sign: | Category where the benefit belongs to. | \ No newline at end of file +| `category` | *Optional[str]* | :heavy_minus_sign: | Category where the benefit belongs to. | +| `writable_by_application` | *Optional[bool]* | :heavy_minus_sign: | Whether this benefit can be written (created, updated, or destroyed). Returns true if the benefit type is permitted for the application, false otherwise. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/taxes.md b/gusto_embedded/docs/models/taxes.md index b3f72d38..9536d013 100644 --- a/gusto_embedded/docs/models/taxes.md +++ b/gusto_embedded/docs/models/taxes.md @@ -3,8 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *str* | :heavy_check_mark: | N/A | -| `employer` | *bool* | :heavy_check_mark: | N/A | -| `amount` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | The amount paid for this tax. | +| `amount` | *Optional[str]* | :heavy_minus_sign: | The total amount paid by both employer and employee for this tax. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/taxrefunds.md b/gusto_embedded/docs/models/taxrefunds.md index 2b5cecae..71691818 100644 --- a/gusto_embedded/docs/models/taxrefunds.md +++ b/gusto_embedded/docs/models/taxrefunds.md @@ -1,9 +1,5 @@ # TaxRefunds -Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid -by Gusto, depending on the value in `reconcile_tax_method`. - - ## Fields diff --git a/gusto_embedded/docs/models/taxrequirementmetadata.md b/gusto_embedded/docs/models/taxrequirementmetadata.md index 6599f7bc..6464e895 100644 --- a/gusto_embedded/docs/models/taxrequirementmetadata.md +++ b/gusto_embedded/docs/models/taxrequirementmetadata.md @@ -9,7 +9,7 @@ | `options` | List[[models.TaxRequirementMetadataOptions](../models/taxrequirementmetadataoptions.md)] | :heavy_minus_sign: | [for `select` or `radio`] An array of objects describing the possible values. | | `risk_class_code` | *Optional[str]* | :heavy_minus_sign: | [for `workers_compensation_rate`] The industry risk class code for the rate being requested | | `risk_class_description` | *Optional[str]* | :heavy_minus_sign: | [for `workers_compensation_rate`] A description of the industry risk class for the rate being requested | -| `rate_type` | [Optional[models.RateType]](../models/ratetype.md) | :heavy_minus_sign: | [for `workers_compensation_rate`] The type of rate being collected. Either:
- `percent`: A percentage formatted as a decimal, e.g. `0.01` for 1%
- `currency_per_hour`: A dollar amount per hour, e.g. `3.24` for $3.24/hr
| +| `rate_type` | [Optional[models.RateType]](../models/ratetype.md) | :heavy_minus_sign: | [for `workers_compensation_rate`] The type of rate being collected. Either:
- `percent`: A percentage formatted as a decimal, e.g. `0.01` for 1%
- `currency_per_hour`: A dollar amount per hour, e.g. `3.24` for $3.24/hr
| | `mask` | *OptionalNullable[str]* | :heavy_minus_sign: | [for `account_number`] A pattern describing the format of the account number

The mask is a sequence of characters representing the requirements of the actual account number. Each character in the mask represents a single character in the account number as follows:
- `#`: a digit (`\d`)
- `@`: a upper or lower case letter (`[a-zA-Z]`)
- `^`: an uppercase letter (`[A-Z]`)
- `%`: a digit or uppercase letter (`[0-9A-Z]`)
- any other character represents the literal character

Examples:
- mask: `WHT-######` represents `WHT-` followed by 5 digits, e.g. `WHT-33421`
- mask: `%####-^^` supports values of `75544-AB` and `Z7654-HK`
| | `prefix` | *OptionalNullable[str]* | :heavy_minus_sign: | [for `account_number`] A value that precedes the value to be collected - useful for display, but should not be submitted as part of the value. E.g. some tax agencies use an account number that is a company's federal ein plus two digits. In that case the mask would be `##` and the prefix `XXXXX1234`. | | `validation` | [Optional[models.Validation]](../models/validation.md) | :heavy_minus_sign: | [for `tax_rate`] Describes the validation required for the tax rate | \ No newline at end of file diff --git a/gusto_embedded/docs/models/taxrequirementmetadataoptions.md b/gusto_embedded/docs/models/taxrequirementmetadataoptions.md index af466120..9350f243 100644 --- a/gusto_embedded/docs/models/taxrequirementmetadataoptions.md +++ b/gusto_embedded/docs/models/taxrequirementmetadataoptions.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `label` | *str* | :heavy_check_mark: | A customer facing label for the answer | | `value` | [models.TaxRequirementMetadataValue](../models/taxrequirementmetadatavalue.md) | :heavy_check_mark: | The actual value to be submitted | -| `short_label` | *Optional[str]* | :heavy_minus_sign: | A less verbose label that may sometimes be available | \ No newline at end of file +| `short_label` | *OptionalNullable[str]* | :heavy_minus_sign: | A less verbose label that may sometimes be available | \ No newline at end of file diff --git a/gusto_embedded/docs/models/taxrequirementvalue.md b/gusto_embedded/docs/models/taxrequirementvalue.md index 0aebbe68..5058bb7c 100644 --- a/gusto_embedded/docs/models/taxrequirementvalue.md +++ b/gusto_embedded/docs/models/taxrequirementvalue.md @@ -5,15 +5,21 @@ The "answer" ## Supported Types +### `bool` + +```python +value: bool = /* values here */ +``` + ### `str` ```python value: str = /* values here */ ``` -### `bool` +### `float` ```python -value: bool = /* values here */ +value: float = /* values here */ ``` diff --git a/gusto_embedded/docs/models/tiers.md b/gusto_embedded/docs/models/tiers.md index 3575eb76..17ea953c 100644 --- a/gusto_embedded/docs/models/tiers.md +++ b/gusto_embedded/docs/models/tiers.md @@ -5,8 +5,8 @@ A single tier of a tiered matching scheme. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | -| `threshold` | *Optional[str]* | :heavy_minus_sign: | The percentage threshold at which this tier ends (inclusive).

For example, a value of "5" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll.

If this is the first tier, a value of "5" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. | -| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | +| `threshold` | *Optional[str]* | :heavy_minus_sign: | Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to.

Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards.

For example:

If the first tier has a threshold of "3", and `rate` of "100", the company will match 100% of employee contributions from 0% up to and including 3% of payroll.

If the next tier has a threshold of "5" and a rate of "50", the company will match 50% of contributions from above 3% up to and including 5% of payroll. | +| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/timeoffpolicy.md b/gusto_embedded/docs/models/timeoffpolicy.md index a769179c..76fe894a 100644 --- a/gusto_embedded/docs/models/timeoffpolicy.md +++ b/gusto_embedded/docs/models/timeoffpolicy.md @@ -12,10 +12,10 @@ Representation of a Time Off Policy | `name` | *str* | :heavy_check_mark: | Name of the time off policy | | `policy_type` | [models.PolicyType](../models/policytype.md) | :heavy_check_mark: | Type of the time off policy | | `accrual_method` | *str* | :heavy_check_mark: | Policy time off accrual method | -| `accrual_rate` | *Optional[str]* | :heavy_minus_sign: | The rate at which the time off hours will accrue for an employee on the policy. Represented as a float, e.g. "40.0". | -| `accrual_rate_unit` | *Optional[str]* | :heavy_minus_sign: | The number of hours an employee has to work or be paid for to accrue the number of hours set in the accrual rate. Only used for hourly policies (per_hour_paid, per_hour_paid_no_overtime, per_hour_work, per_hour_worked_no_overtime). Represented as a float, e.g. "40.0". | +| `accrual_rate` | *OptionalNullable[str]* | :heavy_minus_sign: | The rate at which the time off hours will accrue for an employee on the policy. Represented as a float, e.g. "40.0". | +| `accrual_rate_unit` | *OptionalNullable[str]* | :heavy_minus_sign: | The number of hours an employee has to work or be paid for to accrue the number of hours set in the accrual rate. Only used for hourly policies (per_hour_paid, per_hour_paid_no_overtime, per_hour_work, per_hour_worked_no_overtime). Represented as a float, e.g. "40.0". | | `paid_out_on_termination` | *Optional[bool]* | :heavy_minus_sign: | Boolean representing if an employee's accrued time off hours will be paid out on termination | -| `accrual_waiting_period_days` | *Optional[int]* | :heavy_minus_sign: | Number of days before an employee on the policy will begin accruing time off hours | +| `accrual_waiting_period_days` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of days before an employee on the policy will begin accruing time off hours | | `carryover_limit_hours` | *Optional[str]* | :heavy_minus_sign: | The max number of hours an employee can carryover from one year to the next | | `max_accrual_hours_per_year` | *Optional[str]* | :heavy_minus_sign: | The max number of hours an employee can accrue in a year | | `max_hours` | *Optional[str]* | :heavy_minus_sign: | The max number of hours an employee can accrue | diff --git a/gusto_embedded/docs/models/timeoffpolicyemployees.md b/gusto_embedded/docs/models/timeoffpolicyemployees.md index 9242483a..b0fe1cd9 100644 --- a/gusto_embedded/docs/models/timeoffpolicyemployees.md +++ b/gusto_embedded/docs/models/timeoffpolicyemployees.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `uuid` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `balance` | *Optional[str]* | :heavy_minus_sign: | Employee's current time off balance. Represented as a float, e.g. "40.0". | \ No newline at end of file diff --git a/gusto_embedded/docs/models/unprocessableentityerrorobjecterror.md b/gusto_embedded/docs/models/unprocessableentityerrorobject.md similarity index 96% rename from gusto_embedded/docs/models/unprocessableentityerrorobjecterror.md rename to gusto_embedded/docs/models/unprocessableentityerrorobject.md index 0cd71b10..f431e6da 100644 --- a/gusto_embedded/docs/models/unprocessableentityerrorobjecterror.md +++ b/gusto_embedded/docs/models/unprocessableentityerrorobject.md @@ -1,4 +1,4 @@ -# UnprocessableEntityErrorObjectError +# UnprocessableEntityErrorObject Unprocessable Entity diff --git a/gusto_embedded/docs/models/valuetiers.md b/gusto_embedded/docs/models/valuetiers.md index 7d60efc0..832a34ce 100644 --- a/gusto_embedded/docs/models/valuetiers.md +++ b/gusto_embedded/docs/models/valuetiers.md @@ -5,8 +5,8 @@ A single tier of a tiered matching scheme. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | -| `threshold` | *Optional[str]* | :heavy_minus_sign: | The percentage threshold at which this tier ends (inclusive).

For example, a value of "5" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll.

If this is the first tier, a value of "5" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. | -| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `rate` | *Optional[str]* | :heavy_minus_sign: | The percentage of employee deduction within this tier the company contribution will match. | +| `threshold` | *Optional[str]* | :heavy_minus_sign: | Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to.

Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards.

For example:

If the first tier has a threshold of "3", and `rate` of "100", the company will match 100% of employee contributions from 0% up to and including 3% of payroll.

If the next tier has a threshold of "5" and a rate of "50", the company will match 50% of contributions from above 3% up to and including 5% of payroll. | +| `threshold_delta` | *Optional[str]* | :heavy_minus_sign: | The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold. | \ No newline at end of file diff --git a/gusto_embedded/docs/models/webhookshealthcheckstatus.md b/gusto_embedded/docs/models/webhookshealthcheckstatus.md new file mode 100644 index 00000000..0fa9746d --- /dev/null +++ b/gusto_embedded/docs/models/webhookshealthcheckstatus.md @@ -0,0 +1,11 @@ +# WebhooksHealthCheckStatus + +The representation of a webhooks health check response + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `status` | [Optional[models.WebhooksHealthCheckStatusStatus]](../models/webhookshealthcheckstatusstatus.md) | :heavy_minus_sign: | Latest health status of the webhooks system | +| `last_checked_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO8601 timestamp of the last successful health check with millisecond precision | \ No newline at end of file diff --git a/gusto_embedded/docs/models/webhookshealthcheckstatusstatus.md b/gusto_embedded/docs/models/webhookshealthcheckstatusstatus.md new file mode 100644 index 00000000..8f67d90b --- /dev/null +++ b/gusto_embedded/docs/models/webhookshealthcheckstatusstatus.md @@ -0,0 +1,12 @@ +# WebhooksHealthCheckStatusStatus + +Latest health status of the webhooks system + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `HEALTHY` | healthy | +| `UNHEALTHY` | unhealthy | +| `UNKNOWN` | unknown | \ No newline at end of file diff --git a/gusto_embedded/docs/models/wireinrequest.md b/gusto_embedded/docs/models/wireinrequest.md index 32c6ad79..9e50f1df 100644 --- a/gusto_embedded/docs/models/wireinrequest.md +++ b/gusto_embedded/docs/models/wireinrequest.md @@ -15,12 +15,12 @@ Representation of a wire in request | `recipient_address` | *Optional[str]* | :heavy_minus_sign: | Address of the recipient of the wire in | | `recipient_account_number` | *Optional[str]* | :heavy_minus_sign: | Recipient bank account number | | `recipient_routing_number` | *Optional[str]* | :heavy_minus_sign: | Recipient bank routing number | -| `additional_notes` | *Optional[str]* | :heavy_minus_sign: | Notes for the wire in request | +| `additional_notes` | *OptionalNullable[str]* | :heavy_minus_sign: | Notes for the wire in request | | `bank_name` | *Optional[str]* | :heavy_minus_sign: | Name of the bank initiating the wire in | | `date_sent` | *Optional[str]* | :heavy_minus_sign: | Date the wire in was sent | | `unique_tracking_code` | *Optional[str]* | :heavy_minus_sign: | Include in note with bank to track payment | -| `payment_type` | *Optional[str]* | :heavy_minus_sign: | Type of payment for the wire in | -| `payment_uuid` | [Optional[models.PaymentUUID]](../models/paymentuuid.md) | :heavy_minus_sign: | Unique identifier of the payment | +| `payment_type` | [Optional[models.PaymentType]](../models/paymenttype.md) | :heavy_minus_sign: | Type of payment for the wire in | +| `payment_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the payment | | `amount_sent` | *Optional[str]* | :heavy_minus_sign: | Amount sent through wire in | | `requested_amount` | *Optional[str]* | :heavy_minus_sign: | Requested amount for the payment | | `wire_in_deadline` | *Optional[str]* | :heavy_minus_sign: | Deadline to submit the wire in | \ No newline at end of file diff --git a/gusto_embedded/docs/models/wireinrequeststatus.md b/gusto_embedded/docs/models/wireinrequeststatus.md index c5c219ca..5ed7d34c 100644 --- a/gusto_embedded/docs/models/wireinrequeststatus.md +++ b/gusto_embedded/docs/models/wireinrequeststatus.md @@ -10,5 +10,4 @@ Status of the wire in | `AWAITING_FUNDS` | awaiting_funds | | `PENDING_REVIEW` | pending_review | | `APPROVED` | approved | -| `RFI` | rfi | | `CANCELED` | canceled | \ No newline at end of file diff --git a/gusto_embedded/docs/models/withholdingpayperiod.md b/gusto_embedded/docs/models/withholdingpayperiod.md index a8f6d9db..6340d69e 100644 --- a/gusto_embedded/docs/models/withholdingpayperiod.md +++ b/gusto_embedded/docs/models/withholdingpayperiod.md @@ -1,6 +1,6 @@ # WithholdingPayPeriod -The payment schedule tax rate the payroll is based on. +The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. ## Values diff --git a/gusto_embedded/docs/sdks/achtransactions/README.md b/gusto_embedded/docs/sdks/achtransactions/README.md index 6ad2ba37..9de1b7e1 100644 --- a/gusto_embedded/docs/sdks/achtransactions/README.md +++ b/gusto_embedded/docs/sdks/achtransactions/README.md @@ -15,7 +15,9 @@ scope: `ach_transactions:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -24,7 +26,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.ach_transactions.get_all(company_uuid="") + res = gusto.ach_transactions.get_all(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/bankaccounts/README.md b/gusto_embedded/docs/sdks/bankaccounts/README.md index 3527d1f6..2dae2afa 100644 --- a/gusto_embedded/docs/sdks/bankaccounts/README.md +++ b/gusto_embedded/docs/sdks/bankaccounts/README.md @@ -5,28 +5,22 @@ ### Available Operations -* [create](#create) - Create a company bank account * [get](#get) - Get all company bank accounts +* [create](#create) - Create a company bank account * [verify](#verify) - Verify a company bank account * [create_from_plaid_token](#create_from_plaid_token) - Create a bank account from a plaid processor token +* [delete_v1_companies_company_id_bank_accounts_bank_account_id](#delete_v1_companies_company_id_bank_accounts_bank_account_id) - Delete a company bank account -## create - -This endpoint creates a new company bank account. - -Upon being created, two verification deposits are automatically sent to the bank account, and the bank account's verification_status is 'awaiting_deposits'. +## get -When the deposits are successfully transferred, the verification_status changes to 'ready_for_verification', at which point the verify endpoint can be used to verify the bank account. -After successful verification, the bank account's verification_status is 'verified'. +Returns company bank accounts. Currently, we only support a single default bank account per company. -scope: `company_bank_accounts:write` +scope: `company_bank_accounts:read` -> 🚧 Warning -> -> If a default bank account exists, it will be disabled and the new bank account will replace it as the company's default funding method. ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -37,7 +31,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.bank_accounts.create(company_id="", routing_number="115092013", account_number="9775014007", account_type=gusto_embedded.PostV1CompaniesCompanyIDBankAccountsAccountType.CHECKING) + res = gusto.bank_accounts.get(company_id="", x_gusto_api_version=gusto_embedded.GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -49,32 +43,41 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `routing_number` | *Optional[str]* | :heavy_minus_sign: | The bank routing number | -| `account_number` | *Optional[str]* | :heavy_minus_sign: | The bank account number | -| `account_type` | [Optional[models.PostV1CompaniesCompanyIDBankAccountsAccountType]](../../models/postv1companiescompanyidbankaccountsaccounttype.md) | :heavy_minus_sign: | The bank account type | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidbankaccountsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.CompanyBankAccount](../../models/companybankaccount.md)** +**[List[models.CompanyBankAccount]](../../models/.md)** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | -## get +## create -Returns company bank accounts. Currently, we only support a single default bank account per company. +This endpoint creates a new company bank account. + +Upon being created, two verification deposits are automatically sent to the bank account, and the bank account's verification_status is 'awaiting_deposits'. + +When the deposits are successfully transferred, the verification_status changes to 'ready_for_verification', at which point the verify endpoint can be used to verify the bank account. +After successful verification, the bank account's verification_status is 'verified'. + +scope: `company_bank_accounts:write` + +>🚧 Warning +> +> If a default bank account exists, it will be disabled and the new bank account will replace it as the company's default funding method. -scope: `company_bank_accounts:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -83,7 +86,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.bank_accounts.get(company_id="") + res = gusto.bank_accounts.create(company_id="", routing_number="", account_number="", account_type=gusto_embedded.CompanyBankAccountRequestAccountType.SAVINGS, x_gusto_api_version=gusto_embedded.PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -95,18 +98,22 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `routing_number` | *str* | :heavy_check_mark: | The bank routing number | +| `account_number` | *str* | :heavy_check_mark: | The bank account number | +| `account_type` | [models.CompanyBankAccountRequestAccountType](../../models/companybankaccountrequestaccounttype.md) | :heavy_check_mark: | The bank account type | +| `x_gusto_api_version` | [Optional[models.PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion]](../../models/postv1companiescompanyidbankaccountsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[List[models.CompanyBankAccount]](../../models/.md)** +**[models.CompanyBankAccount](../../models/companybankaccount.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## verify @@ -129,7 +136,9 @@ scope: `company_bank_accounts:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -138,7 +147,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.bank_accounts.verify(bank_account_uuid="", company_id="", deposit_1=0.02, deposit_2=0.42) + res = gusto.bank_accounts.verify(bank_account_uuid="", company_id="", deposit_1=0.02, deposit_2=0.42, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -162,10 +171,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## create_from_plaid_token @@ -182,6 +191,7 @@ scope: `plaid_processor:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -192,7 +202,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.bank_accounts.create_from_plaid_token(owner_type=gusto_embedded.OwnerType.COMPANY, owner_id="ef279fbd-0fc6-4cf1-a977-6939d621c429", processor_token="processor-sandbox-0asd1-a92nc") + res = gusto.bank_accounts.create_from_plaid_token(owner_type=gusto_embedded.OwnerType.COMPANY, owner_id="ef279fbd-0fc6-4cf1-a977-6939d621c429", processor_token="processor-sandbox-0asd1-a92nc", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -215,7 +225,51 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## delete_v1_companies_company_id_bank_accounts_bank_account_id + +This endpoint disables a company bank account. + +A bank account cannot be disabled if it is used for any unprocessed payments. + +scope: `company_bank_accounts:write` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + gusto.bank_accounts.delete_v1_companies_company_id_bank_accounts_bank_account_id(company_id="", bank_account_id="", x_gusto_api_version=gusto_embedded.DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `bank_account_id` | *str* | :heavy_check_mark: | The UUID of the company bank account | +| `x_gusto_api_version` | [Optional[models.DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion]](../../models/deletev1companiescompanyidbankaccountsbankaccountidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/companies/README.md b/gusto_embedded/docs/sdks/companies/README.md index 0c994604..a406ced0 100644 --- a/gusto_embedded/docs/sdks/companies/README.md +++ b/gusto_embedded/docs/sdks/companies/README.md @@ -34,6 +34,7 @@ IMPORTANT: the returned access and refresh tokens are reserved for this company ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -54,7 +55,7 @@ with Gusto() as gusto: "trade_name": "Frank’s Ocean", "ein": "123456789", "contractor_only": False, - }) + }, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -77,10 +78,10 @@ with Gusto() as gusto: ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get @@ -93,7 +94,9 @@ scope: `companies:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -102,7 +105,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.get(company_id="") + res = gusto.companies.get(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -135,7 +138,9 @@ scope: `companies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -144,7 +149,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.update(company_id="", contractor_only=False) + res = gusto.companies.update(company_id="", contractor_only=False, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -166,10 +171,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## migrate @@ -181,7 +186,9 @@ scope: `partner_managed_companies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -190,7 +197,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.migrate(company_uuid="", email="Benjamin_Kihn44@yahoo.com", ip_address="198.52.136.51", external_user_id="") + res = gusto.companies.migrate(company_uuid="", email="Janice18@gmail.com", ip_address="75.249.55.210", external_user_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -214,10 +221,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## accept_terms_of_service @@ -228,7 +235,9 @@ scope: `terms_of_services:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -237,7 +246,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.accept_terms_of_service(company_uuid="", email="jsmith99@gmail.com", ip_address="192.168.1.2", external_user_id="2005648946132") + res = gusto.companies.accept_terms_of_service(company_uuid="", email="jsmith99@gmail.com", ip_address="192.168.1.2", external_user_id="2005648946132", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -261,10 +270,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## retrieve_terms_of_service @@ -274,7 +283,9 @@ scope: `terms_of_services:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -283,7 +294,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.retrieve_terms_of_service(company_uuid="", email="jsmith99@gmail.com") + res = gusto.companies.retrieve_terms_of_service(company_uuid="", email="jsmith99@gmail.com", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -305,10 +316,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## create_admin @@ -319,7 +330,9 @@ scope: `company_admin:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -328,7 +341,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.create_admin(company_id="", first_name="John", last_name="Smith", email="jsmith99@gmail.com") + res = gusto.companies.create_admin(company_id="", first_name="John", last_name="Smith", email="jsmith99@gmail.com", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -352,10 +365,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## list_admins @@ -365,7 +378,9 @@ scope: `company_admin:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -374,7 +389,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.list_admins(company_id="") + res = gusto.companies.list_admins(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -410,7 +425,9 @@ scope: `company_onboarding_status:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -419,7 +436,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.get_onboarding_status(company_uuid="", additional_steps="external_payroll") + res = gusto.companies.get_onboarding_status(company_uuid="", additional_steps="external_payroll", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -465,7 +482,9 @@ scope: `companies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -474,7 +493,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.finish_onboarding(company_uuid="") + res = gusto.companies.finish_onboarding(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -495,10 +514,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_custom_fields @@ -508,7 +527,9 @@ scope: `companies:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -517,7 +538,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.get_custom_fields(company_id="") + res = gusto.companies.get_custom_fields(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/companyattachments/README.md b/gusto_embedded/docs/sdks/companyattachments/README.md index c4da13cf..36893005 100644 --- a/gusto_embedded/docs/sdks/companyattachments/README.md +++ b/gusto_embedded/docs/sdks/companyattachments/README.md @@ -17,7 +17,9 @@ scope: `company_attachments:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -26,7 +28,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_attachments.get_details(company_id="", company_attachment_uuid="") + res = gusto.company_attachments.get_details(company_id="", company_attachment_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -60,7 +62,9 @@ scope: `company_attachments:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -69,7 +73,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_attachments.get_list(company_id="") + res = gusto.company_attachments.get_list(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -104,6 +108,7 @@ scope: `company_attachments:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -117,7 +122,7 @@ with Gusto( res = gusto.company_attachments.create(company_id="", document={ "file_name": "example.file", "content": open("example.file", "rb"), - }, category=gusto_embedded.PostV1CompaniesAttachmentCategory.GEP_NOTICE) + }, category=gusto_embedded.PostV1CompaniesAttachmentCategory.GEP_NOTICE, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -140,7 +145,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/companyattachmentsdk/README.md b/gusto_embedded/docs/sdks/companyattachmentsdk/README.md index a4d4536d..059f15bd 100644 --- a/gusto_embedded/docs/sdks/companyattachmentsdk/README.md +++ b/gusto_embedded/docs/sdks/companyattachmentsdk/README.md @@ -16,7 +16,9 @@ scope: `company_attachments:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -25,7 +27,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_attachment.get_download_url(company_id="", company_attachment_uuid="") + res = gusto.company_attachment.get_download_url(company_id="", company_attachment_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/companybenefits/README.md b/gusto_embedded/docs/sdks/companybenefits/README.md index 13f3dfca..4b709c75 100644 --- a/gusto_embedded/docs/sdks/companybenefits/README.md +++ b/gusto_embedded/docs/sdks/companybenefits/README.md @@ -16,6 +16,8 @@ * [get_employee_benefits](#get_employee_benefits) - Get all employee benefits for a company benefit * [update_employee_benefits](#update_employee_benefits) - Bulk update employee benefits for a company benefit * [get_requirements](#get_requirements) - Get benefit fields requirements by ID +* [get_v1_company_benefits_company_benefit_id_contribution_exclusions](#get_v1_company_benefits_company_benefit_id_contribution_exclusions) - Get contribution exclusions for a company benefit +* [put_v1_company_benefits_company_benefit_id_contribution_exclusions](#put_v1_company_benefits_company_benefit_id_contribution_exclusions) - Update contribution exclusions for a company benefit ## create @@ -23,11 +25,15 @@ Company benefits represent the benefits that a company is offering to employees. Note that company benefits can be deactivated only when no employees are enrolled. +When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only create company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -36,7 +42,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_benefits.create(company_id="", description="yuck vice between gee ugh ha") + res = gusto.company_benefits.create(company_id="", description="hm pfft surge beyond", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, active=True) # Handle response print(res) @@ -62,10 +68,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## list @@ -79,7 +85,9 @@ scope: `company_benefits:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -88,7 +96,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_benefits.list(company_id="") + res = gusto.company_benefits.list(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -127,7 +135,9 @@ scope: `company_benefits:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -136,7 +146,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_benefits.get(company_benefit_id="") + res = gusto.company_benefits.get(company_benefit_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -168,11 +178,15 @@ Company benefits represent the benefits that a company is offering to employees. Note that company benefits can be deactivated only when no employees are enrolled. +When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only update company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -181,7 +195,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_benefits.update(company_benefit_id="", version="98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", active=False) + res = gusto.company_benefits.update(company_benefit_id="", version="98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, active=False) # Handle response print(res) @@ -205,10 +219,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete @@ -217,11 +231,15 @@ The following must be true in order to delete a company benefit - There are no payroll items associated with the company benefit - The benefit is not managed by a Partner or by Gusto (type must be 'External') +When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only delete company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -230,7 +248,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.company_benefits.delete(company_benefit_id="") + gusto.company_benefits.delete(company_benefit_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -261,7 +279,9 @@ scope: `benefits:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -270,7 +290,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_benefits.get_all() + res = gusto.company_benefits.get_all(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -304,7 +324,9 @@ scope: `benefits:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -313,7 +335,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_benefits.get_supported(benefit_id="") + res = gusto.company_benefits.get_supported(benefit_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -348,7 +370,9 @@ scope: `company_benefits:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -357,7 +381,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_benefits.get_summary(company_benefit_id="", start_date="2022-01-01", end_date="2022-12-31") + res = gusto.company_benefits.get_summary(company_benefit_id="", start_date="2022-01-01", end_date="2022-12-31", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -397,7 +421,9 @@ scope: `employee_benefits:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -406,7 +432,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_benefits.get_employee_benefits(company_benefit_id="") + res = gusto.company_benefits.get_employee_benefits(company_benefit_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -441,11 +467,15 @@ Create or update(if the employee is already enrolled in the company benefit prev Benefits containing PHI are only visible to applications with the `employee_benefits:read:phi` scope. +When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create or update employee benefits for benefit types that are permitted for the application. + scope: `employee_benefits:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -457,9 +487,10 @@ with Gusto( res = gusto.company_benefits.update_employee_benefits(company_benefit_id="", employee_benefits=[ { "version": "09j3d29jqdpj92109j9j2d90dq", + "employee_deduction": "250.00", "employee_uuid": "8f9f3f68-8fd3-499d-ade7-4a052e56494e", }, - ]) + ], x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -481,10 +512,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_requirements @@ -494,7 +525,9 @@ scope: `benefits:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -503,7 +536,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_benefits.get_requirements(benefit_id="") + res = gusto.company_benefits.get_requirements(benefit_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -526,4 +559,114 @@ with Gusto( | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| models.APIError | 4XX, 5XX | \*/\* | + +## get_v1_company_benefits_company_benefit_id_contribution_exclusions + +Returns all contributions for a given company benefit and whether they are excluded or not. + +Currently this endpoint only works for 401-k and Roth 401-k benefit types. + +scope: `company_benefits:read` + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.company_benefits.get_v1_company_benefits_company_benefit_id_contribution_exclusions(company_benefit_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_benefit_id` | *str* | :heavy_check_mark: | The UUID of the company benefit | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.ContributionExclusion]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| models.APIError | 4XX, 5XX | \*/\* | + +## put_v1_company_benefits_company_benefit_id_contribution_exclusions + +Updates contribution exclusions for a given company benefit. + +Currently this endpoint only works for 401-k and Roth 401-k benefit types. + +scope: `company_benefits:write` + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.company_benefits.put_v1_company_benefits_company_benefit_id_contribution_exclusions(company_benefit_id="", contribution_exclusions=[ + { + "contribution_uuid": "082dfd3e-5b55-11f0-bb42-ab7136ba04e2", + "contribution_type": "Bonus", + "excluded": True, + }, + { + "contribution_uuid": "082e034c-5b55-11f0-bb42-ab7136ba04e2", + "contribution_type": "Commission", + "excluded": False, + }, + { + "contribution_uuid": "082e1f6c-5b55-11f0-bb42-ab7136ba04e2", + "contribution_type": "Regular", + "excluded": True, + }, + ], x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_benefit_id` | *str* | :heavy_check_mark: | The UUID of the company benefit | +| `contribution_exclusions` | List[[models.ContributionExclusion](../../models/contributionexclusion.md)] | :heavy_check_mark: | The list of contribution exclusions to update | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.ContributionExclusion]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/companyforms/README.md b/gusto_embedded/docs/sdks/companyforms/README.md index 5f0e2bb8..2daea6fc 100644 --- a/gusto_embedded/docs/sdks/companyforms/README.md +++ b/gusto_embedded/docs/sdks/companyforms/README.md @@ -18,7 +18,9 @@ scope: `company_forms:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -27,7 +29,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_forms.get_all(company_id="") + res = gusto.company_forms.get_all(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -39,6 +41,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `sort_by` | [Optional[models.CompanyFormsSortBy]](../../models/companyformssortby.md) | :heavy_minus_sign: | Sort company forms. Options: name, year, quarter, draft, document_content_type | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -60,7 +63,9 @@ scope: `company_forms:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -69,7 +74,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_forms.get(form_id="") + res = gusto.company_forms.get(form_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -102,7 +107,9 @@ scope: `company_forms:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -111,7 +118,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_forms.get_pdf(form_id="") + res = gusto.company_forms.get_pdf(form_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -144,7 +151,9 @@ scope: `company_forms:sign` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -153,7 +162,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.company_forms.sign(form_id="", signature_text="Jane Smith", agree=True, signed_by_ip_address="192.168.0.1") + res = gusto.company_forms.sign(form_id="", signature_text="Jane Smith", agree=True, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, signed_by_ip_address="192.168.0.1") # Handle response print(res) @@ -178,7 +187,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/contractordocuments/README.md b/gusto_embedded/docs/sdks/contractordocuments/README.md index 5bcda7a6..0e67ca2b 100644 --- a/gusto_embedded/docs/sdks/contractordocuments/README.md +++ b/gusto_embedded/docs/sdks/contractordocuments/README.md @@ -18,7 +18,9 @@ scope: `contractor_documents:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -27,7 +29,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_documents.get_all(contractor_uuid="") + res = gusto.contractor_documents.get_all(contractor_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -60,7 +62,9 @@ scope: `contractor_documents:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -69,7 +73,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_documents.get(document_uuid="") + res = gusto.contractor_documents.get(document_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -80,7 +84,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `document_uuid` | *str* | :heavy_check_mark: | The ID or UUID of the document | +| `document_uuid` | *str* | :heavy_check_mark: | The UUID of the document | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -102,7 +106,9 @@ scope: `contractor_documents:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -111,7 +117,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_documents.get_pdf(document_uuid="") + res = gusto.contractor_documents.get_pdf(document_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -122,7 +128,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `document_uuid` | *str* | :heavy_check_mark: | The ID or UUID of the document | +| `document_uuid` | *str* | :heavy_check_mark: | The UUID of the document | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -144,7 +150,9 @@ scope: `contractor_documents:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -153,11 +161,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_documents.sign(document_uuid="", fields=[ - {}, - {}, - {}, - ], agree=True) + res = gusto.contractor_documents.sign(document_uuid="", fields=[], agree=False, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -168,7 +172,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `document_uuid` | *str* | :heavy_check_mark: | The ID or UUID of the document | +| `document_uuid` | *str* | :heavy_check_mark: | The UUID of the document | | `fields` | List[[models.PutV1ContractorDocumentSignFields](../../models/putv1contractordocumentsignfields.md)] | :heavy_check_mark: | List of fields and the values they will be set to. | | `agree` | *bool* | :heavy_check_mark: | Whether you agree to sign electronically | | `x_gusto_client_ip` | *Optional[str]* | :heavy_minus_sign: | Optional header to supply the IP address. This can be used to supply the IP address for signature endpoints instead of the signed_by_ip_address parameter. | @@ -182,7 +186,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/contractorforms/README.md b/gusto_embedded/docs/sdks/contractorforms/README.md index 888d8eea..b0e4da56 100644 --- a/gusto_embedded/docs/sdks/contractorforms/README.md +++ b/gusto_embedded/docs/sdks/contractorforms/README.md @@ -18,7 +18,9 @@ scope: `contractor_forms:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -27,7 +29,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_forms.list(contractor_uuid="") + res = gusto.contractor_forms.list(contractor_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -60,7 +62,9 @@ scope: `contractor_forms:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -69,7 +73,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_forms.get(contractor_uuid="", form_id="") + res = gusto.contractor_forms.get(contractor_uuid="", form_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -103,7 +107,9 @@ scope: `contractor_forms:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -112,7 +118,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_forms.get_pdf(contractor_uuid="", form_id="") + res = gusto.contractor_forms.get_pdf(contractor_uuid="", form_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -150,7 +156,9 @@ scope: `contractors:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -159,7 +167,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_forms.generate1099(contractor_id="") + res = gusto.contractor_forms.generate1099(contractor_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -181,7 +189,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md b/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md index ed9fa2c4..81e77a38 100644 --- a/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md +++ b/gusto_embedded/docs/sdks/contractorpaymentgroups/README.md @@ -5,23 +5,27 @@ ### Available Operations -* [create](#create) - Create a contractor payment group * [get_list](#get_list) - Get contractor payment groups for a company +* [create](#create) - Create a contractor payment group * [preview](#preview) - Preview a contractor payment group -* [get](#get) - Fetch a contractor payment group +* [get](#get) - Get a contractor payment group * [delete](#delete) - Cancel a contractor payment group * [fund](#fund) - Fund a contractor payment group [DEMO] +* [get_v1_contractor_payment_groups_id_partner_disbursements](#get_v1_contractor_payment_groups_id_partner_disbursements) - Get partner disbursements for a contractor payment group +* [patch_v1_contractor_payment_groups_id_partner_disbursements](#patch_v1_contractor_payment_groups_id_partner_disbursements) - Update partner disbursements for a contractor payment group -## create +## get_list -Pay a group of contractors. Information needed depends on the contractor's wage type (hourly vs fixed) +Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. + + scope: `payrolls:read` -scope: `payrolls:run` ### Example Usage + ```python -from datetime import date +import gusto_embedded from gusto_embedded import Gusto import os @@ -30,14 +34,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payment_groups.create(company_id="", check_date=date.fromisoformat("2020-01-01"), contractor_payments=[ - { - "wage": 5000, - "hours": 40, - "bonus": 500, - "reimbursement": 20, - }, - ], creation_token="1d532d13-8f61-4a57-ad3c-b5fac1c6e05e") + res = gusto.contractor_payment_groups.get_list(company_id="", start_date="2020-01-01", end_date="2020-12-31", x_gusto_api_version=gusto_embedded.GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -49,32 +46,37 @@ with Gusto( | Parameter | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | -| `check_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | The payment check date | 2020-01-01 | -| `contractor_payments` | List[[models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments](../../models/postv1companiescompanyidcontractorpaymentgroupscontractorpayments.md)] | :heavy_check_mark: | N/A | | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | -| `creation_token` | *Optional[str]* | :heavy_minus_sign: | Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. | 1d532d13-8f61-4a57-ad3c-b5fac1c6e05e | +| `start_date` | *Optional[str]* | :heavy_minus_sign: | The time period for which to retrieve contractor payment groups. Defaults to 6 months ago. | 2020-01-01 | +| `end_date` | *Optional[str]* | :heavy_minus_sign: | The time period for which to retrieve contractor payment groups. Defaults to today's date. | 2020-12-31 | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[models.ContractorPaymentGroup](../../models/contractorpaymentgroup.md)** +**[List[models.ContractorPaymentGroupWithBlockers]](../../models/.md)** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | -## get_list +## create -Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. +Pay a group of contractors. Information needed depends on the contractor's wage type (hourly vs fixed) + +scope: `payrolls:run` -scope: `payrolls:read` ### Example Usage + ```python +from datetime import date +import gusto_embedded from gusto_embedded import Gusto import os @@ -83,7 +85,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payment_groups.get_list(company_id="", start_date="2020-01-01", end_date="2020-12-31") + res = gusto.contractor_payment_groups.create(company_id="", check_date=date.fromisoformat("2020-01-01"), contractor_payments=[], x_gusto_api_version=gusto_embedded.PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, creation_token="1d532d13-8f61-4a57-ad3c-b5fac1c6e05e") # Handle response print(res) @@ -95,33 +97,35 @@ with Gusto( | Parameter | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | -| `start_date` | *Optional[str]* | :heavy_minus_sign: | The time period for which to retrieve contractor payment groups. Defaults to 6 months ago. | 2020-01-01 | -| `end_date` | *Optional[str]* | :heavy_minus_sign: | The time period for which to retrieve contractor payment groups. Defaults to today's date. | 2020-12-31 | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | -| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `check_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | The payment check date | 2020-01-01 | +| `contractor_payments` | List[[models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments](../../models/postv1companiescompanyidcontractorpaymentgroupscontractorpayments.md)] | :heavy_check_mark: | N/A | | +| `x_gusto_api_version` | [Optional[models.PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion]](../../models/postv1companiescompanyidcontractorpaymentgroupsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `creation_token` | *Optional[str]* | :heavy_minus_sign: | Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. | 1d532d13-8f61-4a57-ad3c-b5fac1c6e05e | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[List[models.ContractorPaymentGroupMinimal]](../../models/.md)** +**[models.ContractorPaymentGroup](../../models/contractorpaymentgroup.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## preview -Preview a group of contractor payments. Request will validate inputs and return preview of the contractor payment group including the expected debit_date. Uuid will be null in the response. +Preview a contractor payment group before creating it. This endpoint allows you to see what the payment group would look like with the provided parameters without actually creating it. + +scope: `contractor_payment_groups:write` -scope: `payrolls:read` ### Example Usage + ```python -from datetime import date +import gusto_embedded from gusto_embedded import Gusto import os @@ -130,14 +134,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payment_groups.preview(company_id="", check_date=date.fromisoformat("2020-01-01"), contractor_payments=[ - { - "wage": 5000, - "hours": 40, - "bonus": 500, - "reimbursement": 20, - }, - ], creation_token="1d532d13-8f61-4a57-ad3c-b5fac1c6e05e") + res = gusto.contractor_payment_groups.preview(company_id="", contractor_payments=[], x_gusto_api_version=gusto_embedded.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -146,25 +143,25 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | -| `check_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | The payment check date | 2020-01-01 | -| `contractor_payments` | List[[models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments](../../models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md)] | :heavy_check_mark: | N/A | | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | -| `creation_token` | *Optional[str]* | :heavy_minus_sign: | Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. | 1d532d13-8f61-4a57-ad3c-b5fac1c6e05e | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `contractor_payments` | List[[models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments](../../models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md)] | :heavy_check_mark: | N/A | +| `x_gusto_api_version` | [Optional[models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion]](../../models/postv1companiescompanyidcontractorpaymentgroupspreviewheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `check_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date when payments should be processed | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.ContractorPaymentGroup](../../models/contractorpaymentgroup.md)** +**[models.ContractorPaymentGroupPreview](../../models/contractorpaymentgrouppreview.md)** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.NotFoundErrorObject | 404 | application/json | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get @@ -172,9 +169,12 @@ Returns a contractor payment group with all associated contractor payments. scope: `payrolls:read` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -183,7 +183,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payment_groups.get(contractor_payment_group_uuid="") + res = gusto.contractor_payment_groups.get(contractor_payment_group_uuid="", x_gusto_api_version=gusto_embedded.GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -195,7 +195,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contractor_payment_group_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion]](../../models/getv1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -204,9 +204,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.NotFoundErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete @@ -214,9 +215,12 @@ Cancels a contractor payment group and all associated contractor payments. All c scope: `payrolls:run` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -225,7 +229,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.contractor_payment_groups.delete(contractor_payment_group_uuid="") + gusto.contractor_payment_groups.delete(contractor_payment_group_uuid="", x_gusto_api_version=gusto_embedded.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -236,29 +240,31 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contractor_payment_group_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion]](../../models/deletev1contractorpaymentgroupscontractorpaymentgroupidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## fund > 🚧 Demo action -> > This action is only available in the Demo environment Simulate funding a contractor payment group. Funding only occurs automatically in the production environment when bank transactions are generated. Use this action in the demo environment to transition a contractor payment group's `status` from `Unfunded` to `Funded`. A `Funded` status is required for generating a contractor payment receipt. scope: `payrolls:run` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -267,7 +273,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payment_groups.fund(contractor_payment_group_uuid="") + res = gusto.contractor_payment_groups.fund(contractor_payment_group_uuid="", x_gusto_api_version=gusto_embedded.PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -279,7 +285,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contractor_payment_group_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion]](../../models/putv1contractorpaymentgroupscontractorpaymentgroupidfundheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -288,7 +294,106 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.NotFoundErrorObject | 404 | application/json | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_v1_contractor_payment_groups_id_partner_disbursements + +Get partner disbursements for a specific contractor payment group. + +scope: `partner_disbursements:read` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.contractor_payment_groups.get_v1_contractor_payment_groups_id_partner_disbursements(id="", x_gusto_api_version=gusto_embedded.GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | +| `x_gusto_api_version` | [Optional[models.GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion]](../../models/getv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ContractorPaymentGroupPartnerDisbursements](../../models/contractorpaymentgrouppartnerdisbursements.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## patch_v1_contractor_payment_groups_id_partner_disbursements + +Update partner disbursements for a specific contractor payment group. + +scope: `partner_disbursements:write` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.contractor_payment_groups.patch_v1_contractor_payment_groups_id_partner_disbursements(id="", disbursements=[ + { + "contractor_payment_uuid": "9f8e7d6c-5b4a-3928-1c2d-3e4f5a6b7c8d", + }, + ], x_gusto_api_version=gusto_embedded.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | +| `disbursements` | List[[models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements](../../models/patchv1contractorpaymentgroupsidpartnerdisbursementsdisbursements.md)] | :heavy_check_mark: | N/A | +| `x_gusto_api_version` | [Optional[models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion]](../../models/patchv1contractorpaymentgroupsidpartnerdisbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ContractorPaymentGroupPartnerDisbursements](../../models/contractorpaymentgrouppartnerdisbursements.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.NotFoundErrorObject | 404 | application/json | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/contractorpaymentmethods/README.md b/gusto_embedded/docs/sdks/contractorpaymentmethods/README.md index 45e74649..f9d47797 100644 --- a/gusto_embedded/docs/sdks/contractorpaymentmethods/README.md +++ b/gusto_embedded/docs/sdks/contractorpaymentmethods/README.md @@ -17,6 +17,7 @@ scope: `contractor_payment_methods:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -27,7 +28,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payment_methods.create_bank_account(contractor_uuid="", name="BoA Checking Account", routing_number="266905059", account_number="5809431207", account_type=gusto_embedded.PostV1ContractorsContractorUUIDBankAccountsAccountType.CHECKING) + res = gusto.contractor_payment_methods.create_bank_account(contractor_uuid="", name="BoA Checking Account", routing_number="266905059", account_number="5809431207", account_type=gusto_embedded.PostV1ContractorsContractorUUIDBankAccountsAccountType.CHECKING, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -52,7 +53,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/contractorpaymentmethodsdk/README.md b/gusto_embedded/docs/sdks/contractorpaymentmethodsdk/README.md index de69bd85..15366faa 100644 --- a/gusto_embedded/docs/sdks/contractorpaymentmethodsdk/README.md +++ b/gusto_embedded/docs/sdks/contractorpaymentmethodsdk/README.md @@ -17,7 +17,9 @@ scope: `contractor_payment_methods:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -26,7 +28,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payment_method.get_bank_accounts(contractor_uuid="") + res = gusto.contractor_payment_method.get_bank_accounts(contractor_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -61,7 +63,9 @@ scope: `contractor_payment_methods:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -70,7 +74,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payment_method.get(contractor_uuid="") + res = gusto.contractor_payment_method.get(contractor_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -104,6 +108,7 @@ scope: `contractor_payment_methods:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -114,7 +119,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payment_method.update(contractor_uuid="", version="63859768485e218ccf8a449bb60f14ed", type_=gusto_embedded.PutV1ContractorsContractorIDPaymentMethodType.DIRECT_DEPOSIT) + res = gusto.contractor_payment_method.update(contractor_uuid="", version="63859768485e218ccf8a449bb60f14ed", type_=gusto_embedded.PutV1ContractorsContractorIDPaymentMethodType.DIRECT_DEPOSIT, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -123,13 +128,13 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contractor_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `type` | [models.PutV1ContractorsContractorIDPaymentMethodType](../../models/putv1contractorscontractoridpaymentmethodtype.md) | :heavy_check_mark: | The payment method type. If type is Direct Deposit, the contractor is required to have a bank account.
see [Bank account endpoint](./post-v1-contractors-contractor_uuid-bank_accounts) | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contractor_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `type` | [models.PutV1ContractorsContractorIDPaymentMethodType](../../models/putv1contractorscontractoridpaymentmethodtype.md) | :heavy_check_mark: | The payment method type. If type is Direct Deposit, the contractor is required to have a bank account.
see [Bank account endpoint](./post-v1-contractors-contractor_uuid-bank_accounts) | | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -137,7 +142,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/contractorpayments/README.md b/gusto_embedded/docs/sdks/contractorpayments/README.md index 4a78047c..c3c8b81f 100644 --- a/gusto_embedded/docs/sdks/contractorpayments/README.md +++ b/gusto_embedded/docs/sdks/contractorpayments/README.md @@ -28,7 +28,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -37,7 +39,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payments.get_receipt(contractor_payment_uuid="") + res = gusto.contractor_payments.get_receipt(contractor_payment_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -74,7 +76,9 @@ scope: `payrolls:run` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -83,7 +87,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payments.fund(contractor_payment_uuid="") + res = gusto.contractor_payments.fund(contractor_payment_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -104,10 +108,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## create @@ -117,8 +121,10 @@ scope: `payrolls:run` ### Example Usage + ```python from datetime import date +import gusto_embedded from gusto_embedded import Gusto import os @@ -127,7 +133,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payments.create(company_id="", contractor_uuid="", date_=date.fromisoformat("2020-01-01"), wage=5000, hours=40, bonus=500, reimbursement=20) + res = gusto.contractor_payments.create(company_id="", contractor_uuid="", date_=date.fromisoformat("2020-01-01"), x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, payment_method=gusto_embedded.PostV1CompaniesCompanyIDContractorPaymentsPaymentMethod.DIRECT_DEPOSIT, wage=5000, hours=40, bonus=500, reimbursement=20) # Handle response print(res) @@ -155,10 +161,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## list @@ -168,7 +174,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -177,7 +185,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payments.list(company_id="", start_date="2020-01-01", end_date="2020-12-31") + res = gusto.contractor_payments.list(company_id="", start_date="2020-01-01", end_date="2020-12-31", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -215,7 +223,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -224,7 +234,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payments.get(company_id="", contractor_payment_id="") + res = gusto.contractor_payments.get(company_id="", contractor_payment_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -258,7 +268,9 @@ scope: `payrolls:run` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -267,7 +279,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.contractor_payments.delete(company_id="", contractor_payment_id="") + gusto.contractor_payments.delete(company_id="", contractor_payment_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -284,10 +296,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## preview @@ -299,7 +311,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -308,9 +322,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractor_payments.preview(company_uuid="", contractor_payments=[ - {}, - ]) + res = gusto.contractor_payments.preview(company_uuid="", contractor_payments=[], x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/contractors/README.md b/gusto_embedded/docs/sdks/contractors/README.md index 145e7a1a..0189041a 100644 --- a/gusto_embedded/docs/sdks/contractors/README.md +++ b/gusto_embedded/docs/sdks/contractors/README.md @@ -14,6 +14,7 @@ * [update_onboarding_status](#update_onboarding_status) - Change the contractor's onboarding status * [get_address](#get_address) - Get a contractor address * [update_address](#update_address) - Update a contractor's address +* [get_v1_companies_company_id_contractors_payment_details](#get_v1_companies_company_id_contractors_payment_details) - List contractor payment details ## create @@ -23,6 +24,7 @@ scope: `contractors:manage` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -33,7 +35,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractors.create(company_uuid="", wage_type=gusto_embedded.PostV1CompaniesCompanyUUIDContractorsWageType.FIXED, start_date="2020-04-01", hourly_rate="40.0", email="johnson@johnson.com", first_name="Johnson", last_name="Johnson", work_state="CA") + res = gusto.contractors.create(company_uuid="", wage_type=gusto_embedded.PostV1CompaniesCompanyUUIDContractorsWageType.FIXED, start_date="2020-04-01", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, type_=gusto_embedded.PostV1CompaniesCompanyUUIDContractorsType.INDIVIDUAL, hourly_rate="40.0", self_onboarding=True, email="johnson@johnson.com", first_name="Johnson", last_name="Johnson", file_new_hire_report=False, work_state="CA") # Handle response print(res) @@ -69,10 +71,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## list @@ -82,7 +84,9 @@ scope: `contractors:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -91,7 +95,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractors.list(company_uuid="") + res = gusto.contractors.list(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -106,6 +110,7 @@ with Gusto( | `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | +| `sort_by` | [Optional[models.ContractorsSortBy]](../../models/contractorssortby.md) | :heavy_minus_sign: | Sort contractors. Options: type, onboarding_status, name, created_at | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -127,7 +132,9 @@ scope: `contractors:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -136,7 +143,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractors.get(contractor_uuid="") + res = gusto.contractors.get(contractor_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -173,6 +180,7 @@ scope: `contractors:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -183,7 +191,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractors.update(contractor_uuid="", version="b48c46abfed1487b873b442334b3c4ff", wage_type=gusto_embedded.PutV1ContractorsContractorUUIDWageType.HOURLY, start_date="2021-01-01", hourly_rate="20.00", first_name="Chanel", last_name="Boyle", middle_initial="X", is_active=True) + res = gusto.contractors.update(contractor_uuid="", version="b48c46abfed1487b873b442334b3c4ff", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, type_=gusto_embedded.PutV1ContractorsContractorUUIDType.INDIVIDUAL, wage_type=gusto_embedded.PutV1ContractorsContractorUUIDWageType.HOURLY, start_date="2021-01-01", hourly_rate="20.00", self_onboarding=False, first_name="Chanel", last_name="Boyle", middle_initial="X", file_new_hire_report=False, is_active=True) # Handle response print(res) @@ -195,7 +203,7 @@ with Gusto( | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contractor_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor | | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | | `type` | [Optional[models.PutV1ContractorsContractorUUIDType]](../../models/putv1contractorscontractoruuidtype.md) | :heavy_minus_sign: | The contractor type. | | | `wage_type` | [Optional[models.PutV1ContractorsContractorUUIDWageType]](../../models/putv1contractorscontractoruuidwagetype.md) | :heavy_minus_sign: | The contractor’s wage type.
| | @@ -220,10 +228,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete @@ -233,7 +241,9 @@ scope: `contractors:manage` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -242,7 +252,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.contractors.delete(contractor_uuid="") + gusto.contractors.delete(contractor_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -301,7 +311,9 @@ scope: `contractors:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -310,7 +322,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractors.get_onboarding_status(contractor_uuid="") + res = gusto.contractors.get_onboarding_status(contractor_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -353,7 +365,9 @@ Below is a list of valid onboarding status changes depending on the intended act ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -362,7 +376,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractors.update_onboarding_status(contractor_uuid="") + res = gusto.contractors.update_onboarding_status(contractor_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, onboarding_status=gusto_embedded.PutV1ContractorsContractorUUIDOnboardingStatusOnboardingStatus.ONBOARDING_COMPLETED) # Handle response print(res) @@ -384,10 +398,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_address @@ -397,7 +411,9 @@ scope: `contractors:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -406,7 +422,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractors.get_address(contractor_uuid="") + res = gusto.contractors.get_address(contractor_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -439,7 +455,9 @@ scope: `contractors:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -448,7 +466,83 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.contractors.update_address(contractor_uuid="", version="fe75bd065ff48b91c35fe8ff842f986c", street_1="300 3rd Street", street_2="", city="San Francisco", state="CA", zip_code="94107") + res = gusto.contractors.update_address(contractor_uuid="", version="fe75bd065ff48b91c35fe8ff842f986c", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_1="300 3rd Street", street_2="", city="San Francisco", state="CA", zip_code="94107") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contractor_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `street_2` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.ContractorAddress](../../models/contractoraddress.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_v1_companies_company_id_contractors_payment_details + +Get payment details for contractors in a company. This endpoint returns a list of all contractors +associated with the specified company, including their payment methods and bank account details +if they are paid via direct deposit. + +For contractors paid by direct deposit, the response includes their bank account information +with sensitive data masked for security. The payment details also include information about +how their payments are split if they have multiple bank accounts configured. + +For contractors paid by check, only the basic payment method information is returned. + +### Response Details +- For direct deposit contractors: + - Bank account details (masked) + - Payment splits configuration + - Routing numbers + - Account types +- For check payments: + - Basic payment method designation + +### Common Use Cases +- Fetching contractor payment information for payroll processing +- Verifying contractor payment methods +- Reviewing payment split configurations + +`encrypted_account_number` is available only with the additional scope `contractor_payment_methods:read:account_numbers`. + +scope: `contractor_payment_methods:read` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.contractors.get_v1_companies_company_id_contractors_payment_details(company_id="", x_gusto_api_version=gusto_embedded.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -459,23 +553,19 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contractor_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company. This identifies the company whose contractor payment details you want to retrieve. | +| `contractor_uuid` | *Optional[str]* | :heavy_minus_sign: | Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor. | +| `contractor_payment_group_uuid` | *Optional[str]* | :heavy_minus_sign: | Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group. | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidcontractorspaymentdetailsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.ContractorAddress](../../models/contractoraddress.md)** +**[List[models.ContractorPaymentDetailsList]](../../models/.md)** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/departments/README.md b/gusto_embedded/docs/sdks/departments/README.md index 38bc2681..fd844e8f 100644 --- a/gusto_embedded/docs/sdks/departments/README.md +++ b/gusto_embedded/docs/sdks/departments/README.md @@ -21,7 +21,9 @@ scope: `departments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -30,7 +32,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.departments.create(company_uuid="", title="Stage Hand") + res = gusto.departments.create(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, title="Stage Hand") # Handle response print(res) @@ -52,10 +54,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_all @@ -65,7 +67,9 @@ scope: `departments:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -74,7 +78,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.departments.get_all(company_uuid="") + res = gusto.departments.get_all(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -108,7 +112,9 @@ scope: `departments:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -117,7 +123,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.departments.get(department_uuid="") + res = gusto.departments.get(department_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -150,7 +156,9 @@ scope: `departments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -159,7 +167,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.departments.update(department_uuid="", version="db0edd04aaac4506f7edab03ac855d56", title="Backup Dancer") + res = gusto.departments.update(department_uuid="", version="db0edd04aaac4506f7edab03ac855d56", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, title="Backup Dancer") # Handle response print(res) @@ -182,10 +190,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete @@ -196,7 +204,9 @@ scope: `departments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -205,7 +215,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.departments.delete(department_uuid="") + gusto.departments.delete(department_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -221,10 +231,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## add_people @@ -235,7 +245,9 @@ scope: `departments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -244,7 +256,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.departments.add_people(department_uuid="") + res = gusto.departments.add_people(department_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -281,7 +293,9 @@ scope: `departments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -290,7 +304,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.departments.remove_people(department_uuid="") + res = gusto.departments.remove_people(department_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/earningtypes/README.md b/gusto_embedded/docs/sdks/earningtypes/README.md index b90d3c03..039261dd 100644 --- a/gusto_embedded/docs/sdks/earningtypes/README.md +++ b/gusto_embedded/docs/sdks/earningtypes/README.md @@ -20,7 +20,9 @@ scope: `payrolls:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -29,7 +31,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.earning_types.create(company_id="", name="Gym Membership Stipend") + res = gusto.earning_types.create(company_id="", name="Gym Membership Stipend", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -51,10 +53,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## list @@ -70,7 +72,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -79,7 +83,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.earning_types.list(company_id="") + res = gusto.earning_types.list(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -112,7 +116,9 @@ scope: `payrolls:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -121,7 +127,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.earning_types.update(company_id="", earning_type_uuid="", name="Gym Membership Stipend") + res = gusto.earning_types.update(company_id="", earning_type_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, name="Gym Membership Stipend") # Handle response print(res) @@ -144,10 +150,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete @@ -157,7 +163,9 @@ scope: `payrolls:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -166,7 +174,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.earning_types.delete(company_id="", earning_type_uuid="") + gusto.earning_types.delete(company_id="", earning_type_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... diff --git a/gusto_embedded/docs/sdks/employeeaddresses/README.md b/gusto_embedded/docs/sdks/employeeaddresses/README.md index dab877b8..5001ea70 100644 --- a/gusto_embedded/docs/sdks/employeeaddresses/README.md +++ b/gusto_embedded/docs/sdks/employeeaddresses/README.md @@ -24,9 +24,12 @@ Supports home address effective dating and courtesy withholding. scope: `employees:read` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -35,7 +38,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_addresses.get(employee_id="") + res = gusto.employee_addresses.get(employee_id="", x_gusto_api_version=gusto_embedded.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -47,7 +50,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion]](../../models/getv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -56,9 +59,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## create @@ -68,10 +72,13 @@ Supports home address effective dating and courtesy withholding. scope: `employees:write` + ### Example Usage + ```python from datetime import date +import gusto_embedded from gusto_embedded import Gusto import os @@ -80,7 +87,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_addresses.create(employee_id="", street_1="300 3rd Street", street_2=None, city="San Francisco", state="CA", zip_code="94107", effective_date=date.fromisoformat("2021-01-01"), courtesy_withholding=True) + res = gusto.employee_addresses.create(employee_id="", x_gusto_api_version=gusto_embedded.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_1="300 3rd Street", city="San Francisco", state="CA", zip_code="94107", effective_date=date.fromisoformat("2022-01-31")) # Handle response print(res) @@ -89,18 +96,18 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion]](../../models/postv1employeesemployeeidhomeaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | 300 3rd Street | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | San Francisco | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | CA | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | 94107 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | 2022-01-31 | +| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -108,10 +115,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## retrieve_home_address @@ -121,9 +128,12 @@ Supports home address effective dating and courtesy withholding. scope: `employees:read` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -132,7 +142,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_addresses.retrieve_home_address(home_address_uuid="") + res = gusto.employee_addresses.retrieve_home_address(home_address_uuid="", x_gusto_api_version=gusto_embedded.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -144,7 +154,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../../models/getv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -153,9 +163,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update @@ -165,10 +176,12 @@ Supports home address effective dating and courtesy withholding. scope: `employees:write` + ### Example Usage + ```python -from datetime import date +import gusto_embedded from gusto_embedded import Gusto import os @@ -177,7 +190,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_addresses.update(home_address_uuid="", version="fe75bd065ff48b91c35fe8ff842f986c", street_1="300 3rd Street", street_2=None, city="San Francisco", state="CA", zip_code="94107", effective_date=date.fromisoformat("2021-01-01"), courtesy_withholding=True) + res = gusto.employee_addresses.update(home_address_uuid="", version="56d00c178bc7393b2a206ed6a86afcb4", x_gusto_api_version=gusto_embedded.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -186,19 +199,19 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `x_gusto_api_version` | [Optional[models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../../models/putv1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | | +| `courtesy_withholding` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -206,20 +219,23 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete -Used for deleting an employee's home address. Cannot delete the employee's active home address. +Used for deleting an employee's home address. Cannot delete the employee's active home address. scope: `employees:write` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -228,7 +244,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.employee_addresses.delete(home_address_uuid="") + gusto.employee_addresses.delete(home_address_uuid="", x_gusto_api_version=gusto_embedded.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -239,26 +255,28 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `home_address_uuid` | *str* | :heavy_check_mark: | The UUID of the home address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion]](../../models/deletev1homeaddresseshomeaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| models.APIError | 4XX, 5XX | \*/\* | ## get_work_addresses -Returns a list of an employee's work addresses. Each address includes its effective date and a boolean -signifying if it is the currently active work address. +Returns a list of an employee's work addresses. Each address includes its effective +date and a boolean signifying if it is the currently active work address. scope: `employees:read` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -267,7 +285,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_addresses.get_work_addresses(employee_id="") + res = gusto.employee_addresses.get_work_addresses(employee_id="", x_gusto_api_version=gusto_embedded.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -279,7 +297,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion]](../../models/getv1employeesemployeeidworkaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -288,9 +306,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## create_work_address @@ -298,10 +317,13 @@ The work address of an employee describes when an employee began working at an a scope: `employees:manage` + ### Example Usage + ```python from datetime import date +import gusto_embedded from gusto_embedded import Gusto import os @@ -310,7 +332,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_addresses.create_work_address(employee_id="", location_uuid="6a119be7-b4b0-4e27-aaa0-89d5f2524635", effective_date=date.fromisoformat("2023-05-15")) + res = gusto.employee_addresses.create_work_address(employee_id="", x_gusto_api_version=gusto_embedded.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid="6a119be7-b4b0-4e27-aaa0-89d5f2524635", effective_date=date.fromisoformat("2023-05-15")) # Handle response print(res) @@ -319,13 +341,13 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date the employee began working at the company location | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion]](../../models/postv1employeesemployeeidworkaddressesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | 6a119be7-b4b0-4e27-aaa0-89d5f2524635 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date the employee began working at the company location | 2023-05-15 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -333,10 +355,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## retrieve_work_address @@ -344,9 +366,12 @@ The work address of an employee is used for payroll tax purposes. scope: `employees:read` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -355,7 +380,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_addresses.retrieve_work_address(work_address_uuid="") + res = gusto.employee_addresses.retrieve_work_address(work_address_uuid="", x_gusto_api_version=gusto_embedded.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -367,7 +392,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../../models/getv1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -376,9 +401,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update_work_address @@ -386,10 +412,13 @@ The work address of an employee is used for payroll tax purposes. scope: `employees:manage` + ### Example Usage + ```python from datetime import date +import gusto_embedded from gusto_embedded import Gusto import os @@ -398,7 +427,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_addresses.update_work_address(work_address_uuid="", version="e6db1baa29d3df1eb307ff6a12c778da", location_uuid="6a119be7-b4b0-4e27-aaa0-89d5f2524635", effective_date=date.fromisoformat("2023-05-15")) + res = gusto.employee_addresses.update_work_address(work_address_uuid="", version="56d00c178bc7393b2a206ed6a86afcb4", x_gusto_api_version=gusto_embedded.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid="6a119be7-b4b0-4e27-aaa0-89d5f2524635", effective_date=date.fromisoformat("2023-05-15")) # Handle response print(res) @@ -407,14 +436,14 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | -| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `x_gusto_api_version` | [Optional[models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../../models/putv1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Reference to a company location | 6a119be7-b4b0-4e27-aaa0-89d5f2524635 | +| `effective_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | 2023-05-15 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -422,20 +451,23 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete_work_address -Used for deleting an employee's work address. Cannot delete the employee's active work address. +Used for deleting an employee's work address. Cannot delete the employee's active work address. scope: `employees:manage` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -444,7 +476,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.employee_addresses.delete_work_address(work_address_uuid="") + gusto.employee_addresses.delete_work_address(work_address_uuid="", x_gusto_api_version=gusto_embedded.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -455,12 +487,12 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `work_address_uuid` | *str* | :heavy_check_mark: | The UUID of the work address | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion]](../../models/deletev1workaddressesworkaddressuuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/employeebenefits/README.md b/gusto_embedded/docs/sdks/employeebenefits/README.md index 62feb137..54972c81 100644 --- a/gusto_embedded/docs/sdks/employeebenefits/README.md +++ b/gusto_embedded/docs/sdks/employeebenefits/README.md @@ -15,12 +15,15 @@ ## create -Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. +Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + +When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -31,10 +34,10 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_benefits.create(employee_id="", company_benefit_uuid="f68abb42-431e-4392-bc3f-2795627e00f3", contribution={ + res = gusto.employee_benefits.create(employee_id="", company_benefit_uuid="f68abb42-431e-4392-bc3f-2795627e00f3", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, active=True, employee_deduction="100.00", deduct_as_percentage=False, contribution={ "type": gusto_embedded.PostV1EmployeesEmployeeIDEmployeeBenefitsType.AMOUNT, "value": "100.00", - }) + }, elective=False, catch_up=False, coverage_salary_multiplier="0.00", company_contribution="0.00", contribute_as_percentage=False) # Handle response print(res) @@ -70,10 +73,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get @@ -87,7 +90,9 @@ scope: `employee_benefits:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -96,7 +101,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_benefits.get(employee_id="") + res = gusto.employee_benefits.get(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -133,7 +138,9 @@ scope: `employee_benefits:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -142,7 +149,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_benefits.retrieve(employee_benefit_id="") + res = gusto.employee_benefits.retrieve(employee_benefit_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -169,13 +176,17 @@ with Gusto( ## update -Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. +Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + +When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only update employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -184,7 +195,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_benefits.update(employee_benefit_id="", version="09j3d29jqdpj92109j9j2d90dq") + res = gusto.employee_benefits.update(employee_benefit_id="", version="09j3d29jqdpj92109j9j2d90dq", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, employee_deduction="250.00", elective=False, catch_up=False, deduction_reduces_taxable_income=gusto_embedded.PutV1EmployeeBenefitsEmployeeBenefitIDDeductionReducesTaxableIncome.UNSET, coverage_salary_multiplier="0.00", company_contribution="0.00", contribute_as_percentage=False) # Handle response print(res) @@ -220,20 +231,24 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete -Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. +Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + +When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only delete employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -242,7 +257,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.employee_benefits.delete(employee_benefit_id="") + gusto.employee_benefits.delete(employee_benefit_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -273,7 +288,9 @@ scope: `employee_benefits:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -282,7 +299,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_benefits.get_ytd_benefit_amounts_from_different_company(employee_id="", tax_year=2024) + res = gusto.employee_benefits.get_ytd_benefit_amounts_from_different_company(employee_id="", tax_year=2024, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -318,7 +335,9 @@ scope: `employee_benefits:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -327,7 +346,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.employee_benefits.create_ytd_benefit_amounts_from_different_company(employee_id="", tax_year=5621.31) + gusto.employee_benefits.create_ytd_benefit_amounts_from_different_company(employee_id="", tax_year=1828.56, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, ytd_employee_deduction_amount="0.00", ytd_company_contribution_amount="0.00") # Use the SDK ... @@ -347,7 +366,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/employeeemployments/README.md b/gusto_embedded/docs/sdks/employeeemployments/README.md index 98317d8c..6e6ec2f1 100644 --- a/gusto_embedded/docs/sdks/employeeemployments/README.md +++ b/gusto_embedded/docs/sdks/employeeemployments/README.md @@ -25,7 +25,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -34,7 +36,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_employments.create_termination(employee_id="", effective_date="2020-06-30", run_termination_payroll=True) + res = gusto.employee_employments.create_termination(employee_id="", effective_date="2020-06-30", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, run_termination_payroll=True) # Handle response print(res) @@ -57,10 +59,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_terminations @@ -72,7 +74,9 @@ scope: `employments:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -81,7 +85,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_employments.get_terminations(employee_id="") + res = gusto.employee_employments.get_terminations(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -114,7 +118,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -123,7 +129,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.employee_employments.delete_termination(employee_id="") + gusto.employee_employments.delete_termination(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -139,10 +145,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update_termination @@ -154,7 +160,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -163,7 +171,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_employments.update_termination(employee_id="", version="1928d0c378e519e9c03fb959bc959a6b", effective_date="2020-06-30", run_termination_payroll=True) + res = gusto.employee_employments.update_termination(employee_id="", version="1928d0c378e519e9c03fb959bc959a6b", effective_date="2020-06-30", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, run_termination_payroll=True) # Handle response print(res) @@ -172,14 +180,14 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `effective_date` | *str* | :heavy_check_mark: | The employee's last day of work. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `run_termination_payroll` | *Optional[bool]* | :heavy_minus_sign: | If true, the employee should receive their final wages via an off-cycle payroll. If false, they should receive their final wages on their current pay schedule. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `effective_date` | *str* | :heavy_check_mark: | The employee's last day of work. | | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `run_termination_payroll` | *Optional[bool]* | :heavy_minus_sign: | If true, the employee should receive their final wages via an off-cycle payroll. If false, they should receive their final wages on their current pay schedule. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -187,10 +195,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404, 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## create_rehire @@ -200,7 +208,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -209,7 +219,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_employments.create_rehire(employee_id="", effective_date="2023-06-30", file_new_hire_report=True, work_location_uuid="b6ae9d93-d4b8-4119-8c96-dba595dd8c30") + res = gusto.employee_employments.create_rehire(employee_id="", effective_date="2023-06-30", file_new_hire_report=True, work_location_uuid="b6ae9d93-d4b8-4119-8c96-dba595dd8c30", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -235,10 +245,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## rehire @@ -248,7 +258,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -257,7 +269,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_employments.rehire(employee_id="", version="1928d0c378e519e9c03fb959bc959a6b", effective_date="2023-06-30", file_new_hire_report=True, work_location_uuid="b6ae9d93-d4b8-4119-8c96-dba595dd8c30") + res = gusto.employee_employments.rehire(employee_id="", version="1928d0c378e519e9c03fb959bc959a6b", effective_date="2023-06-30", file_new_hire_report=True, work_location_uuid="b6ae9d93-d4b8-4119-8c96-dba595dd8c30", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -266,17 +278,17 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `effective_date` | *str* | :heavy_check_mark: | The day when the employee returns to work. | -| `file_new_hire_report` | *bool* | :heavy_check_mark: | The boolean flag indicating whether Gusto will file a new hire report for the employee. | -| `work_location_uuid` | *str* | :heavy_check_mark: | The uuid of the employee's work location. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `employment_status` | [Optional[models.PutV1EmployeesEmployeeIDRehireEmploymentStatus]](../../models/putv1employeesemployeeidrehireemploymentstatus.md) | :heavy_minus_sign: | The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. | -| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `effective_date` | *str* | :heavy_check_mark: | The day when the employee returns to work. | | +| `file_new_hire_report` | *bool* | :heavy_check_mark: | The boolean flag indicating whether Gusto will file a new hire report for the employee. | | +| `work_location_uuid` | *str* | :heavy_check_mark: | The uuid of the employee's work location. | | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `employment_status` | [Optional[models.PutV1EmployeesEmployeeIDRehireEmploymentStatus]](../../models/putv1employeesemployeeidrehireemploymentstatus.md) | :heavy_minus_sign: | The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*. | | +| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -284,10 +296,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404, 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_rehire @@ -297,7 +309,9 @@ scope: `employments:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -306,7 +320,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_employments.get_rehire(employee_id="") + res = gusto.employee_employments.get_rehire(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -327,10 +341,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete_rehire @@ -340,7 +354,9 @@ scope: `employments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -349,7 +365,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.employee_employments.delete_rehire(employee_id="") + gusto.employee_employments.delete_rehire(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -365,10 +381,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_history @@ -379,7 +395,9 @@ scope: `employments:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -388,7 +406,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_employments.get_history(employee_id="") + res = gusto.employee_employments.get_history(employee_id="", x_gusto_api_version=gusto_embedded.GetV1EmployeesEmployeeIDEmploymentHistoryHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -409,7 +427,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/employeeforms/README.md b/gusto_embedded/docs/sdks/employeeforms/README.md index e2df3799..638d5a89 100644 --- a/gusto_embedded/docs/sdks/employeeforms/README.md +++ b/gusto_embedded/docs/sdks/employeeforms/README.md @@ -23,7 +23,9 @@ scope: `employees:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -32,7 +34,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_forms.generate_w2(employee_id="") + res = gusto.employee_forms.generate_w2(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -54,10 +56,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## list @@ -67,7 +69,9 @@ scope: `employee_forms:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -76,7 +80,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_forms.list(employee_id="") + res = gusto.employee_forms.list(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -109,7 +113,9 @@ scope: `employee_forms:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -118,7 +124,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_forms.get(employee_id="", form_id="") + res = gusto.employee_forms.get(employee_id="", form_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -152,7 +158,9 @@ scope: `employee_forms:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -161,7 +169,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_forms.get_pdf(employee_id="", form_id="") + res = gusto.employee_forms.get_pdf(employee_id="", form_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -198,7 +206,9 @@ scope: `employee_forms:sign` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -207,7 +217,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_forms.sign(employee_id="", form_id="", signature_text="Jane Smith", agree=True, signed_by_ip_address="192.168.0.1") + res = gusto.employee_forms.sign(employee_id="", form_id="", signature_text="Jane Smith", agree=True, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, signed_by_ip_address="192.168.0.1") # Handle response print(res) @@ -269,7 +279,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/employeepaymentmethods/README.md b/gusto_embedded/docs/sdks/employeepaymentmethods/README.md index 999ba5c8..8ddcc17c 100644 --- a/gusto_embedded/docs/sdks/employeepaymentmethods/README.md +++ b/gusto_embedded/docs/sdks/employeepaymentmethods/README.md @@ -15,7 +15,9 @@ scope: `employee_payment_methods:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -24,7 +26,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_payment_methods.get_bank_accounts(employee_id="") + res = gusto.employee_payment_methods.get_bank_accounts(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/employeepaymentmethodsdk/README.md b/gusto_embedded/docs/sdks/employeepaymentmethodsdk/README.md index 026a08ad..c3a1fb49 100644 --- a/gusto_embedded/docs/sdks/employeepaymentmethodsdk/README.md +++ b/gusto_embedded/docs/sdks/employeepaymentmethodsdk/README.md @@ -21,6 +21,7 @@ scope: `employee_payment_methods:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -31,7 +32,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_payment_method.create(employee_id="", name="BoA Checking Account", routing_number="266905059", account_number="5809431207", account_type=gusto_embedded.PostV1EmployeesEmployeeIDBankAccountsAccountType.CHECKING) + res = gusto.employee_payment_method.create(employee_id="", name="BoA Checking Account", routing_number="266905059", account_number="5809431207", account_type=gusto_embedded.PostV1EmployeesEmployeeIDBankAccountsAccountType.CHECKING, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -56,10 +57,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete_bank_account @@ -70,7 +71,9 @@ scope: `employee_payment_methods:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -79,7 +82,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.employee_payment_method.delete_bank_account(employee_id="", bank_account_uuid="") + gusto.employee_payment_method.delete_bank_account(employee_id="", bank_account_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -108,6 +111,7 @@ scope: `employee_payment_methods:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -118,7 +122,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_payment_method.update_bank_account(employee_id="", bank_account_uuid="", name="BoA Checking Account", routing_number="266905059", account_number="5809431207", account_type=gusto_embedded.PutV1EmployeesEmployeeIDBankAccountsAccountType.CHECKING) + res = gusto.employee_payment_method.update_bank_account(employee_id="", bank_account_uuid="", name="BoA Checking Account", routing_number="266905059", account_number="5809431207", account_type=gusto_embedded.PutV1EmployeesEmployeeIDBankAccountsAccountType.CHECKING, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -144,10 +148,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get @@ -159,7 +163,9 @@ scope: `employee_payment_methods:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -168,7 +174,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_payment_method.get(employee_id="") + res = gusto.employee_payment_method.get(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -202,6 +208,7 @@ scope: `employee_payment_methods:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -212,7 +219,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_payment_method.update(employee_id="", version="63859768485e218ccf8a449bb60f14ed", type_=gusto_embedded.PutV1EmployeesEmployeeIDPaymentMethodType.DIRECT_DEPOSIT, split_by=gusto_embedded.PutV1EmployeesEmployeeIDPaymentMethodSplitBy.AMOUNT, splits=[ + res = gusto.employee_payment_method.update(employee_id="", version="63859768485e218ccf8a449bb60f14ed", type_=gusto_embedded.PutV1EmployeesEmployeeIDPaymentMethodType.DIRECT_DEPOSIT, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, split_by=gusto_embedded.PutV1EmployeesEmployeeIDPaymentMethodSplitBy.AMOUNT, splits=[ { "uuid": "e88f9436-b74e-49a8-87e9-777b9bfe715e", "name": "BoA Checking Account", @@ -244,10 +251,10 @@ with Gusto( | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. | -| `type` | [models.PutV1EmployeesEmployeeIDPaymentMethodType](../../models/putv1employeesemployeeidpaymentmethodtype.md) | :heavy_check_mark: | The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required. | +| `type` | [models.PutV1EmployeesEmployeeIDPaymentMethodType](../../models/putv1employeesemployeeidpaymentmethodtype.md) | :heavy_check_mark: | The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required. | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `split_by` | [Optional[models.PutV1EmployeesEmployeeIDPaymentMethodSplitBy]](../../models/putv1employeesemployeeidpaymentmethodsplitby.md) | :heavy_minus_sign: | Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. | -| `splits` | List[[models.Splits](../../models/splits.md)] | :heavy_minus_sign: | N/A | +| `split_by` | [Optional[models.PutV1EmployeesEmployeeIDPaymentMethodSplitBy]](../../models/putv1employeesemployeeidpaymentmethodsplitby.md) | :heavy_minus_sign: | Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last `split` amount must be `null` to capture the remainder. | +| `splits` | List[[models.PutV1EmployeesEmployeeIDPaymentMethodSplits](../../models/putv1employeesemployeeidpaymentmethodsplits.md)] | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -256,7 +263,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/employees/README.md b/gusto_embedded/docs/sdks/employees/README.md index 1cc190be..b58f0145 100644 --- a/gusto_embedded/docs/sdks/employees/README.md +++ b/gusto_embedded/docs/sdks/employees/README.md @@ -7,6 +7,7 @@ * [list](#list) - Get employees of a company * [create](#create) - Create an employee +* [get_v1_companies_company_id_employees_payment_details](#get_v1_companies_company_id_employees_payment_details) - Get employee payment details for a company * [create_historical](#create_historical) - Create a historical employee * [get](#get) - Get an employee * [update](#update) - Update an employee. @@ -26,7 +27,9 @@ scope: `employees:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -35,7 +38,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employees.list(company_id="") + res = gusto.employees.list(company_id="", x_gusto_api_version=gusto_embedded.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -44,27 +47,34 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidemployeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | -| `include` | List[[models.Include](../../models/include.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options:
- all_compensations: Include all effective dated compensations for each job instead of only the current compensation
- custom_fields: Include employees' custom fields
| -| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by the provided boolean | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | -| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidemployeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `location_uuid` | *Optional[str]* | :heavy_minus_sign: | Filter employees by a specific primary work location | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | Filter employees by a specific payroll | +| `search_term` | *Optional[str]* | :heavy_minus_sign: | A string to search for in the object's names | +| `sort_by` | *Optional[str]* | :heavy_minus_sign: | Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status | +| `include` | List[[models.Include](../../models/include.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response. Multiple options are comma separated. | +| `onboarded` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have completed onboarding | +| `onboarded_active` | *Optional[bool]* | :heavy_minus_sign: | Filters employees who are ready to work (onboarded AND active today) | +| `terminated` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have been or are scheduled to be terminated | +| `terminated_today` | *Optional[bool]* | :heavy_minus_sign: | Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated) | +| `uuids` | List[*str*] | :heavy_minus_sign: | Optional subset of employees to fetch. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[List[models.Employee]](../../models/.md)** +**[List[models.ShowEmployees]](../../models/.md)** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## create @@ -75,7 +85,9 @@ with Gusto( ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -84,7 +96,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employees.create(company_id="", first_name="Karl", last_name="The Fog") + res = gusto.employees.create(company_id="", first_name="Linda", last_name="Kautzer", x_gusto_api_version=gusto_embedded.PostV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -101,6 +113,7 @@ with Gusto( | `x_gusto_api_version` | [Optional[models.PostV1EmployeesHeaderXGustoAPIVersion]](../../models/postv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `middle_initial` | *Optional[str]* | :heavy_minus_sign: | N/A | | `email` | *Optional[str]* | :heavy_minus_sign: | The employee's personal email address. | +| `work_email` | *Optional[str]* | :heavy_minus_sign: | The employee's work email address. | | `date_of_birth` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | N/A | | `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | | `preferred_first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | @@ -113,10 +126,65 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404, 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_v1_companies_company_id_employees_payment_details + +Fetches payment details for employees in a given company. Results are paginated. + +Use the `employee_uuid` query parameter to filter for a single employee. +Use the `payroll_uuid` query parameter to filter for employees on a specific payroll. +Providing both `employee_uuid` and `payroll_uuid` will result in a 400 error. +An empty array is returned if the company has no employees or if no employees match the filter criteria. + +The `encrypted_account_number` in the `splits` array is only visible if the `employee_payment_methods:read:account_number` scope is present. + +Base scope: `employee_payment_methods:read` + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.employees.get_v1_companies_company_id_employees_payment_details(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `employee_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of a specific employee to fetch payment details for. | +| `payroll_uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of a specific payroll to fetch payment details for employees on that payroll. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.EmployeePaymentDetail]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| models.APIError | 4XX, 5XX | \*/\* | ## create_historical @@ -126,8 +194,10 @@ scope: `employees:manage` ### Example Usage + ```python from datetime import date +import gusto_embedded from gusto_embedded import Gusto import os @@ -148,7 +218,7 @@ with Gusto( "effective_date": date.fromisoformat("2022-09-15T00:00:00Z"), }, job={ "hire_date": date.fromisoformat("2018-05-09T00:00:00Z"), - }, middle_initial="A", preferred_first_name="Angel", employee_state_taxes={ + }, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, middle_initial="A", preferred_first_name="Angel", employee_state_taxes={ "wc_covered": True, "wc_class_code": "20992", }) @@ -184,10 +254,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get @@ -198,7 +268,9 @@ scope: `employees:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -207,7 +279,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employees.get(employee_id="") + res = gusto.employees.get(employee_id="", x_gusto_api_version=gusto_embedded.GetV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -216,12 +288,12 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.GetV1EmployeesHeaderXGustoAPIVersion]](../../models/getv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `include` | List[[models.QueryParamInclude](../../models/queryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options:
- all_compensations: Include all effective dated compensations for each job instead of only the current compensation
- custom_fields: Include employees' custom fields
| -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesHeaderXGustoAPIVersion]](../../models/getv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `include` | List[[models.QueryParamInclude](../../models/queryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute(s) in each employee response. Multiple options are comma separated. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -229,9 +301,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update @@ -242,7 +315,9 @@ scope: `employees:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -251,7 +326,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employees.update(employee_id="", version="f0c06d303aab1fd909b40d4a1ad409ac", first_name="Weezy", middle_initial="F", last_name="Baby", email="tunechi@cashmoneyrecords.com", date_of_birth="1991-01-31", ssn="824920233") + res = gusto.employees.update(employee_id="", version="56d00c178bc7393b2a206ed6a86afcb4", x_gusto_api_version=gusto_embedded.PutV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, first_name="Weezy", middle_initial="F", last_name="Baby", email="tunechi@cashmoneyrecords.com", work_email="new.partner.work@example.com", date_of_birth="1991-01-31", ssn="824920233") # Handle response print(res) @@ -260,20 +335,21 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `x_gusto_api_version` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `last_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `email` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `date_of_birth` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `x_gusto_api_version` | [Optional[models.PutV1EmployeesHeaderXGustoAPIVersion]](../../models/putv1employeesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | Weezy | +| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | F | +| `last_name` | *Optional[str]* | :heavy_minus_sign: | N/A | Baby | +| `email` | *Optional[str]* | :heavy_minus_sign: | N/A | tunechi@cashmoneyrecords.com | +| `work_email` | *Optional[str]* | :heavy_minus_sign: | N/A | new.partner.work@example.com | +| `date_of_birth` | *Optional[str]* | :heavy_minus_sign: | N/A | 1991-01-31 | +| `ssn` | *Optional[str]* | :heavy_minus_sign: | N/A | 824920233 | +| `preferred_first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `two_percent_shareholder` | *Optional[bool]* | :heavy_minus_sign: | Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -281,10 +357,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404, 409, 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 409, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete @@ -297,7 +373,9 @@ scope: `employees:manage` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -306,7 +384,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.employees.delete(employee_id="") + gusto.employees.delete(employee_id="", x_gusto_api_version=gusto_embedded.DeleteV1EmployeeHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -334,7 +412,9 @@ scope: `employees:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -343,7 +423,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employees.get_custom_fields(employee_id="") + res = gusto.employees.get_custom_fields(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -378,7 +458,9 @@ scope: `employees:manage` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -387,7 +469,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employees.update_onboarding_documents_config(employee_id="", i9_document=True) + res = gusto.employees.update_onboarding_documents_config(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, i9_document=True) # Handle response print(res) @@ -458,7 +540,9 @@ scope: `employees:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -467,7 +551,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employees.get_onboarding_status(employee_id="") + res = gusto.employees.get_onboarding_status(employee_id="", x_gusto_api_version=gusto_embedded.GetV1EmployeesEmployeeIDOnboardingStatusHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -488,9 +572,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update_onboarding_status @@ -510,6 +595,7 @@ with Gusto( ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -520,7 +606,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employees.update_onboarding_status(employee_id="", onboarding_status=gusto_embedded.PutV1EmployeesEmployeeIDOnboardingStatusOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE) + res = gusto.employees.update_onboarding_status(employee_id="", onboarding_status=gusto_embedded.PutV1EmployeesEmployeeIDOnboardingStatusOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE, x_gusto_api_version=gusto_embedded.PutV1EmployeesEmployeeIDOnboardingStatusHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -542,10 +628,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404, 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_time_off_activities @@ -555,7 +641,9 @@ scope: `employee_time_off_activities:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -564,7 +652,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employees.get_time_off_activities(employee_uuid="", time_off_type="") + res = gusto.employees.get_time_off_activities(employee_uuid="", time_off_type="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/employeetaxsetup/README.md b/gusto_embedded/docs/sdks/employeetaxsetup/README.md index 5a35192b..f06db599 100644 --- a/gusto_embedded/docs/sdks/employeetaxsetup/README.md +++ b/gusto_embedded/docs/sdks/employeetaxsetup/README.md @@ -18,7 +18,9 @@ Get attributes relevant for an employee's federal taxes. ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -27,7 +29,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_tax_setup.get_federal_taxes(employee_uuid="") + res = gusto.employee_tax_setup.get_federal_taxes(employee_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -60,7 +62,9 @@ scope: `employee_federal_taxes:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -69,7 +73,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_tax_setup.update_federal_taxes(employee_uuid="", version="56a489ce86ed6c1b0f0cecc4050a0b01", filing_status="Single", extra_withholding="0.0", two_jobs=True, dependents_amount="0.0", other_income="0.0", deductions="0.0", w4_data_type="rev_2020_w4") + res = gusto.employee_tax_setup.update_federal_taxes(employee_uuid="", version="56a489ce86ed6c1b0f0cecc4050a0b01", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, filing_status="Single", extra_withholding="0.0", two_jobs=True, dependents_amount="0.0", other_income="0.0", deductions="0.0", w4_data_type="rev_2020_w4") # Handle response print(res) @@ -98,10 +102,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_state_taxes @@ -123,7 +127,9 @@ scope: `employee_state_taxes:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -132,7 +138,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_tax_setup.get_state_taxes(employee_uuid="") + res = gusto.employee_tax_setup.get_state_taxes(employee_uuid="", x_gusto_api_version=gusto_embedded.GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -144,18 +150,19 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_uuid` | *str* | :heavy_check_mark: | The UUID of the employee | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion]](../../models/getv1employeesemployeeidstatetaxesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[List[models.EmployeeStateTax]](../../models/.md)** +**[List[models.EmployeeStateTaxesList]](../../models/.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update_state_taxes @@ -165,9 +172,12 @@ As described for the GET endpoint, the answers must be supplied in the effective scope: `employee_state_taxes:write` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -176,53 +186,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.employee_tax_setup.update_state_taxes(employee_uuid="", states=[ - { - "state": "CA", - "questions": [ - { - "key": "filing_status", - "answers": [ - { - "value": "M", - "valid_from": "2010-01-01", - "valid_up_to": None, - }, - ], - }, - { - "key": "withholding_allowance", - "answers": [ - { - "value": 2, - "valid_from": "2010-01-01", - "valid_up_to": None, - }, - ], - }, - { - "key": "additional_withholding", - "answers": [ - { - "value": "25.0", - "valid_from": "2010-01-01", - "valid_up_to": None, - }, - ], - }, - { - "key": "file_new_hire_report", - "answers": [ - { - "value": True, - "valid_from": "2010-01-01", - "valid_up_to": None, - }, - ], - }, - ], - }, - ]) + res = gusto.employee_tax_setup.update_state_taxes(employee_uuid="", states=[], x_gusto_api_version=gusto_embedded.PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -235,16 +199,16 @@ with Gusto( | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_uuid` | *str* | :heavy_check_mark: | The UUID of the employee | | `states` | List[[models.States](../../models/states.md)] | :heavy_check_mark: | N/A | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion]](../../models/putv1employeesemployeeidstatetaxesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[List[models.EmployeeStateTax]](../../models/.md)** +**[List[models.EmployeeStateTaxesList]](../../models/.md)** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/events/README.md b/gusto_embedded/docs/sdks/events/README.md index 230f675f..e34b867e 100644 --- a/gusto_embedded/docs/sdks/events/README.md +++ b/gusto_embedded/docs/sdks/events/README.md @@ -19,6 +19,7 @@ scope: `events:read` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -29,7 +30,7 @@ with Gusto() as gusto: res = gusto.events.get(security=gusto_embedded.GetEventsSecurity( system_access_auth=os.getenv("GUSTO_SYSTEM_ACCESS_AUTH", ""), - ), sort_order=gusto_embedded.SortOrder.ASC) + ), sort_order=gusto_embedded.SortOrder.ASC, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/externalpayrolls/README.md b/gusto_embedded/docs/sdks/externalpayrolls/README.md index cd89c9f3..3e304a3d 100644 --- a/gusto_embedded/docs/sdks/externalpayrolls/README.md +++ b/gusto_embedded/docs/sdks/externalpayrolls/README.md @@ -23,7 +23,9 @@ scope: `external_payrolls:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -32,7 +34,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.external_payrolls.create(company_uuid="", check_date="2022-06-01", payment_period_start_date="2022-05-15", payment_period_end_date="2022-05-30") + res = gusto.external_payrolls.create(company_uuid="", check_date="2022-06-01", payment_period_start_date="2022-05-15", payment_period_end_date="2022-05-30", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -56,10 +58,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get @@ -69,7 +71,9 @@ scope: `external_payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -78,7 +82,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.external_payrolls.get(company_uuid="") + res = gusto.external_payrolls.get(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -111,7 +115,9 @@ scope: `external_payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -120,7 +126,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.external_payrolls.retrieve(company_uuid="", external_payroll_id="") + res = gusto.external_payrolls.retrieve(company_uuid="", external_payroll_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -154,7 +160,9 @@ scope: `external_payrolls:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -163,7 +171,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.external_payrolls.delete(company_uuid="", external_payroll_id="") + gusto.external_payrolls.delete(company_uuid="", external_payroll_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -192,6 +200,7 @@ scope: `external_payrolls:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -202,7 +211,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.external_payrolls.update(company_uuid="", external_payroll_id="", replace_fields=True, external_payroll_items=[ + res = gusto.external_payrolls.update(company_uuid="", external_payroll_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, replace_fields=True, external_payroll_items=[ { "employee_uuid": "403c6ee3-5f58-40ef-a117-ff7175cd9ee3", "earnings": [ @@ -266,10 +275,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## calculate_taxes @@ -281,7 +290,9 @@ scope: `external_payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -290,7 +301,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.external_payrolls.calculate_taxes(company_uuid="", external_payroll_id="") + res = gusto.external_payrolls.calculate_taxes(company_uuid="", external_payroll_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -324,7 +335,9 @@ scope: `external_payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -333,7 +346,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.external_payrolls.list_tax_liabilities(company_uuid="") + res = gusto.external_payrolls.list_tax_liabilities(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -366,7 +379,9 @@ scope: `external_payrolls:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -375,7 +390,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.external_payrolls.update_tax_liabilities(company_uuid="", liability_selections=[ + res = gusto.external_payrolls.update_tax_liabilities(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, liability_selections=[ { "tax_id": 1, "last_unpaid_external_payroll_uuid": "7985032c-ee3a-4e98-af27-d56551eb5f1c", @@ -413,10 +428,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## finalize_tax_liabilities @@ -426,7 +441,9 @@ scope: `external_payrolls:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -435,7 +452,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.external_payrolls.finalize_tax_liabilities(company_uuid="") + gusto.external_payrolls.finalize_tax_liabilities(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -451,7 +468,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/federaltaxdetailssdk/README.md b/gusto_embedded/docs/sdks/federaltaxdetailssdk/README.md index 6859e86c..f43880e1 100644 --- a/gusto_embedded/docs/sdks/federaltaxdetailssdk/README.md +++ b/gusto_embedded/docs/sdks/federaltaxdetailssdk/README.md @@ -16,7 +16,9 @@ scope: `company_federal_taxes:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -25,7 +27,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.federal_tax_details.get(company_id="") + res = gusto.federal_tax_details.get(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -59,6 +61,7 @@ scope: `company_federal_taxes:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -69,7 +72,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.federal_tax_details.update(company_id="", version="6cb95e00540706ca48d4577b3c839fbe", legal_name="Acme Corp.", tax_payer_type=gusto_embedded.TaxPayerType.LLP, filing_form=gusto_embedded.FilingForm.NINE_HUNDRED_AND_FORTY_FOUR, taxable_as_scorp=False) + res = gusto.federal_tax_details.update(company_id="", version="6cb95e00540706ca48d4577b3c839fbe", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, legal_name="Acme Corp.", tax_payer_type=gusto_embedded.TaxPayerType.LLP, filing_form=gusto_embedded.FilingForm.NINE_HUNDRED_AND_FORTY_FOUR, taxable_as_scorp=False) # Handle response print(res) @@ -96,7 +99,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/flows/README.md b/gusto_embedded/docs/sdks/flows/README.md index f1b5d734..b8e65484 100644 --- a/gusto_embedded/docs/sdks/flows/README.md +++ b/gusto_embedded/docs/sdks/flows/README.md @@ -15,7 +15,9 @@ scope: `flows:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -24,7 +26,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.flows.create(company_uuid="", flow_type="company_onboarding") + res = gusto.flows.create(company_uuid="", flow_type="company_retirement_benefits", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -40,6 +42,7 @@ with Gusto( | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `entity_uuid` | *Optional[str]* | :heavy_minus_sign: | UUID of the target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details. | | `entity_type` | [Optional[models.PostV1CompanyFlowsEntityType]](../../models/postv1companyflowsentitytype.md) | :heavy_minus_sign: | the type of target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details. | +| `options` | Dict[str, *Any*] | :heavy_minus_sign: | Optional configuration object that varies based on the flow_type. This can contain arbitrary key-value pairs specific to the flow being generated (e.g., { "provider": "guideline" }). | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -48,7 +51,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/garnishments/README.md b/gusto_embedded/docs/sdks/garnishments/README.md index e6ebecd9..e7978043 100644 --- a/gusto_embedded/docs/sdks/garnishments/README.md +++ b/gusto_embedded/docs/sdks/garnishments/README.md @@ -19,7 +19,9 @@ scope: `garnishments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -28,7 +30,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.garnishments.create(employee_id="", amount="150.00", court_ordered=True, description="Back taxes") + res = gusto.garnishments.create(employee_id="", amount="150.00", court_ordered=True, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, active=True, description="Back taxes", times=None, recurring=True, annual_maximum=None, pay_period_maximum=None, deduct_as_percentage=False) # Handle response print(res) @@ -61,10 +63,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## list @@ -74,7 +76,9 @@ scope: `garnishments:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -83,7 +87,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.garnishments.list(employee_id="") + res = gusto.garnishments.list(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -118,7 +122,9 @@ scope: `garnishments:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -127,7 +133,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.garnishments.get(garnishment_id="") + res = gusto.garnishments.get(garnishment_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -160,7 +166,9 @@ scope: `garnishments:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -169,7 +177,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.garnishments.update(garnishment_id="", version="52b7c567242cb7452e89ba2bc02cb476") + res = gusto.garnishments.update(garnishment_id="", version="52b7c567242cb7452e89ba2bc02cb476", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, active=False, times=None, recurring=False, annual_maximum=None, pay_period_maximum=None, deduct_as_percentage=False) # Handle response print(res) @@ -202,10 +210,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_child_support_data @@ -215,7 +223,9 @@ scope: `garnishments:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -224,7 +234,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.garnishments.get_child_support_data() + res = gusto.garnishments.get_child_support_data(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/generateddocuments/README.md b/gusto_embedded/docs/sdks/generateddocuments/README.md index 7cca0dc4..04c7a4c2 100644 --- a/gusto_embedded/docs/sdks/generateddocuments/README.md +++ b/gusto_embedded/docs/sdks/generateddocuments/README.md @@ -15,6 +15,7 @@ scope: `generated_documents:read` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -25,7 +26,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.generated_documents.get(document_type=gusto_embedded.DocumentType.PRINTABLE_PAYROLL_CHECKS, request_uuid="") + res = gusto.generated_documents.get(document_type=gusto_embedded.DocumentType.PRINTABLE_PAYROLL_CHECKS, request_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/gusto/README.md b/gusto_embedded/docs/sdks/gusto/README.md deleted file mode 100644 index 25c77387..00000000 --- a/gusto_embedded/docs/sdks/gusto/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Gusto SDK - -## Overview - -Gusto API: Welcome to Gusto's Embedded Payroll API documentation! - -### Available Operations diff --git a/gusto_embedded/docs/sdks/historicalemployees/README.md b/gusto_embedded/docs/sdks/historicalemployees/README.md index cb6119e0..f3898f2e 100644 --- a/gusto_embedded/docs/sdks/historicalemployees/README.md +++ b/gusto_embedded/docs/sdks/historicalemployees/README.md @@ -15,8 +15,10 @@ scope: `employees:manage` ### Example Usage + ```python from datetime import date +import gusto_embedded from gusto_embedded import Gusto import os @@ -37,7 +39,7 @@ with Gusto( "effective_date": date.fromisoformat("2022-09-15T00:00:00Z"), }, job={ "hire_date": date.fromisoformat("2018-05-09T00:00:00Z"), - }, middle_initial="A", employee_state_taxes={ + }, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, middle_initial="A", employee_state_taxes={ "wc_covered": True, "wc_class_code": "20992", }) @@ -49,25 +51,25 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company | -| `historical_employee_uuid` | *str* | :heavy_check_mark: | The UUID of the historical employee | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `first_name` | *str* | :heavy_check_mark: | N/A | -| `last_name` | *str* | :heavy_check_mark: | N/A | -| `date_of_birth` | *str* | :heavy_check_mark: | N/A | -| `ssn` | *str* | :heavy_check_mark: | N/A | -| `work_address` | [models.PutV1HistoricalEmployeesWorkAddress](../../models/putv1historicalemployeesworkaddress.md) | :heavy_check_mark: | N/A | -| `home_address` | [models.PutV1HistoricalEmployeesHomeAddress](../../models/putv1historicalemployeeshomeaddress.md) | :heavy_check_mark: | N/A | -| `termination` | [models.PutV1HistoricalEmployeesTermination](../../models/putv1historicalemployeestermination.md) | :heavy_check_mark: | N/A | -| `job` | [models.PutV1HistoricalEmployeesJob](../../models/putv1historicalemployeesjob.md) | :heavy_check_mark: | N/A | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `middle_initial` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `preferred_first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `email` | *Optional[str]* | :heavy_minus_sign: | Optional. If provided, the email address will be saved to the employee. | -| `employee_state_taxes` | [Optional[models.PutV1HistoricalEmployeesEmployeeStateTaxes]](../../models/putv1historicalemployeesemployeestatetaxes.md) | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company | | +| `historical_employee_uuid` | *str* | :heavy_check_mark: | The UUID of the historical employee | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `first_name` | *str* | :heavy_check_mark: | N/A | | +| `last_name` | *str* | :heavy_check_mark: | N/A | | +| `date_of_birth` | *str* | :heavy_check_mark: | N/A | | +| `ssn` | *str* | :heavy_check_mark: | N/A | | +| `work_address` | [models.PutV1HistoricalEmployeesWorkAddress](../../models/putv1historicalemployeesworkaddress.md) | :heavy_check_mark: | N/A | | +| `home_address` | [models.PutV1HistoricalEmployeesHomeAddress](../../models/putv1historicalemployeeshomeaddress.md) | :heavy_check_mark: | N/A | | +| `termination` | [models.PutV1HistoricalEmployeesTermination](../../models/putv1historicalemployeestermination.md) | :heavy_check_mark: | N/A | | +| `job` | [models.PutV1HistoricalEmployeesJob](../../models/putv1historicalemployeesjob.md) | :heavy_check_mark: | N/A | | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `middle_initial` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `preferred_first_name` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `email` | *Optional[str]* | :heavy_minus_sign: | Optional. If provided, the email address will be saved to the employee. | | +| `employee_state_taxes` | [Optional[models.PutV1HistoricalEmployeesEmployeeStateTaxes]](../../models/putv1historicalemployeesemployeestatetaxes.md) | :heavy_minus_sign: | N/A | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/gusto_embedded/docs/sdks/holidaypaypolicies/README.md b/gusto_embedded/docs/sdks/holidaypaypolicies/README.md index 45cbfa89..3da5a1f5 100644 --- a/gusto_embedded/docs/sdks/holidaypaypolicies/README.md +++ b/gusto_embedded/docs/sdks/holidaypaypolicies/README.md @@ -21,7 +21,9 @@ scope: `holiday_pay_policies:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -30,7 +32,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.holiday_pay_policies.get(company_uuid="") + res = gusto.holiday_pay_policies.get(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -63,7 +65,9 @@ scope: `holiday_pay_policies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -72,7 +76,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.holiday_pay_policies.create(company_uuid="", federal_holidays={ + res = gusto.holiday_pay_policies.create(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, federal_holidays={ "mlk_day": { "selected": True, }, @@ -113,10 +117,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update @@ -126,7 +130,9 @@ scope: `holiday_pay_policies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -135,7 +141,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.holiday_pay_policies.update(company_uuid="", version="1b37938b017c7fd7116bada007072290", federal_holidays={ + res = gusto.holiday_pay_policies.update(company_uuid="", version="1b37938b017c7fd7116bada007072290", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, federal_holidays={ "mlk_day": { "selected": True, }, @@ -177,10 +183,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete @@ -190,7 +196,9 @@ scope: `holiday_pay_policies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -199,7 +207,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.holiday_pay_policies.delete(company_uuid="") + gusto.holiday_pay_policies.delete(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -215,10 +223,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## add_employees @@ -228,7 +236,9 @@ scope: `holiday_pay_policies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -237,7 +247,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.holiday_pay_policies.add_employees(company_uuid="", version="1b37938b017c7fd7116bada007072290", employees=[ + res = gusto.holiday_pay_policies.add_employees(company_uuid="", version="1b37938b017c7fd7116bada007072290", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, employees=[ { "uuid": "1ca3cd25-3eda-48c6-ac88-f0e7fb91a15a", }, @@ -267,10 +277,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## remove_employees @@ -280,7 +290,9 @@ scope: `holiday_pay_policies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -289,7 +301,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.holiday_pay_policies.remove_employees(company_uuid="", version="1b37938b017c7fd7116bada007072290", employees=[ + res = gusto.holiday_pay_policies.remove_employees(company_uuid="", version="1b37938b017c7fd7116bada007072290", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, employees=[ { "uuid": "1ca3cd25-3eda-48c6-ac88-f0e7fb91a15a", }, @@ -319,10 +331,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## preview_paid_holidays @@ -332,7 +344,9 @@ scope: `holiday_pay_policies:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -341,7 +355,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.holiday_pay_policies.preview_paid_holidays(company_uuid="", year="2023") + res = gusto.holiday_pay_policies.preview_paid_holidays(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, year="2023") # Handle response print(res) @@ -363,7 +377,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/i9verification/README.md b/gusto_embedded/docs/sdks/i9verification/README.md index f07c8939..4b168dfc 100644 --- a/gusto_embedded/docs/sdks/i9verification/README.md +++ b/gusto_embedded/docs/sdks/i9verification/README.md @@ -23,7 +23,9 @@ scope: `i9_authorizations:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -32,7 +34,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.i9_verification.get_authorization(employee_id="") + res = gusto.i9_verification.get_authorization(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -83,6 +85,7 @@ scope: `i9_authorizations:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -93,7 +96,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.i9_verification.update(employee_id="", authorization_status=gusto_embedded.PutV1EmployeesEmployeeIDI9AuthorizationAuthorizationStatus.CITIZEN, version="52b7c567242cb7452e89ba2bc02cb476") + res = gusto.i9_verification.update(employee_id="", authorization_status=gusto_embedded.PutV1EmployeesEmployeeIDI9AuthorizationAuthorizationStatus.CITIZEN, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, version="52b7c567242cb7452e89ba2bc02cb476") # Handle response print(res) @@ -120,10 +123,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_document_options @@ -133,7 +136,9 @@ scope: `i9_authorizations:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -142,7 +147,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.i9_verification.get_document_options(employee_id="") + res = gusto.i9_verification.get_document_options(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -175,7 +180,9 @@ scope: `i9_authorizations:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -184,7 +191,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.i9_verification.get_documents(employee_id="") + res = gusto.i9_verification.get_documents(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -224,7 +231,9 @@ scope: `i9_authorizations:manage` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -241,7 +250,7 @@ with Gusto( "expiration_date": "2026-01-01", "issuing_authority": "USA", }, - ]) + ], x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -263,10 +272,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete_document @@ -276,7 +285,9 @@ scope: `i9_authorizations:manage` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -285,7 +296,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.i9_verification.delete_document(employee_id="", document_id="") + gusto.i9_verification.delete_document(employee_id="", document_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -314,7 +325,9 @@ scope: `i9_authorizations:manage` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -323,7 +336,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.i9_verification.employer_sign(employee_id="", signature_text="", signer_title="", agree=False) + res = gusto.i9_verification.employer_sign(employee_id="", signature_text="", signer_title="", agree=False, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -351,7 +364,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/industryselection/README.md b/gusto_embedded/docs/sdks/industryselection/README.md index 6b1dee2b..5486a680 100644 --- a/gusto_embedded/docs/sdks/industryselection/README.md +++ b/gusto_embedded/docs/sdks/industryselection/README.md @@ -16,7 +16,9 @@ scope: `companies:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -25,7 +27,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.industry_selection.get(company_id="") + res = gusto.industry_selection.get(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -58,7 +60,9 @@ scope: `companies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -67,7 +71,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.industry_selection.update(company_id="", naics_code="611420", title="Computer Training", sic_codes=[ + res = gusto.industry_selection.update(company_id="", naics_code="611420", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, title="Computer Training", sic_codes=[ "8243", ]) @@ -93,7 +97,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/informationrequests/README.md b/gusto_embedded/docs/sdks/informationrequests/README.md index 6fbf0c80..d5746aa5 100644 --- a/gusto_embedded/docs/sdks/informationrequests/README.md +++ b/gusto_embedded/docs/sdks/informationrequests/README.md @@ -15,7 +15,9 @@ scope: `information_requests:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -24,7 +26,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.information_requests.get_information_requests(company_uuid="") + res = gusto.information_requests.get_information_requests(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/introspection/README.md b/gusto_embedded/docs/sdks/introspection/README.md index e7618c9b..afba6ae0 100644 --- a/gusto_embedded/docs/sdks/introspection/README.md +++ b/gusto_embedded/docs/sdks/introspection/README.md @@ -14,7 +14,9 @@ Returns scope and resource information associated with the current access token. ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -23,7 +25,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.get_info() + res = gusto.introspection.get_info(x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -57,7 +59,9 @@ The `expires_in` value is provided in seconds from when the `access_token` was g ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -66,7 +70,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.introspection.refresh_token(client_id="", client_secret="", refresh_token="", grant_type="") + res = gusto.introspection.refresh_token(client_id="", client_secret="", refresh_token="", grant_type="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/invoices/README.md b/gusto_embedded/docs/sdks/invoices/README.md index ece798bd..e28893d0 100644 --- a/gusto_embedded/docs/sdks/invoices/README.md +++ b/gusto_embedded/docs/sdks/invoices/README.md @@ -19,6 +19,7 @@ scope: `invoices:read` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -29,7 +30,7 @@ with Gusto() as gusto: res = gusto.invoices.get(security=gusto_embedded.GetInvoicesInvoicePeriodSecurity( system_access_auth=os.getenv("GUSTO_SYSTEM_ACCESS_AUTH", ""), - ), invoice_period="2020-01") + ), invoice_period="2020-01", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -54,7 +55,7 @@ with Gusto() as gusto: ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/jobsandcompensations/README.md b/gusto_embedded/docs/sdks/jobsandcompensations/README.md index 0e7d1a39..640e5795 100644 --- a/gusto_embedded/docs/sdks/jobsandcompensations/README.md +++ b/gusto_embedded/docs/sdks/jobsandcompensations/README.md @@ -24,7 +24,9 @@ scope: `jobs:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -33,7 +35,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.jobs_and_compensations.create_job(employee_id="", title="Regional Manager", hire_date="2020-12-21") + res = gusto.jobs_and_compensations.create_job(employee_id="", title="Regional Manager", hire_date="2020-12-21", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -59,10 +61,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_jobs @@ -72,7 +74,9 @@ scope: `jobs:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -81,7 +85,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.jobs_and_compensations.get_jobs(employee_id="") + res = gusto.jobs_and_compensations.get_jobs(employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -117,7 +121,9 @@ scope: `jobs:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -126,7 +132,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.jobs_and_compensations.get_job(job_id="") + res = gusto.jobs_and_compensations.get_job(job_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -160,7 +166,9 @@ scope: `jobs:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -169,7 +177,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.jobs_and_compensations.update(job_id="", version="gr78930htutrz444kuytr3s5hgxykuveb523fwl8sir", title="Regional Manager", hire_date="2020-12-21") + res = gusto.jobs_and_compensations.update(job_id="", version="gr78930htutrz444kuytr3s5hgxykuveb523fwl8sir", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, title="Regional Manager", hire_date="2020-12-21") # Handle response print(res) @@ -196,10 +204,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete @@ -209,7 +217,9 @@ scope: `jobs:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -218,7 +228,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.jobs_and_compensations.delete(job_id="") + gusto.jobs_and_compensations.delete(job_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -250,7 +260,9 @@ scope: `jobs:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -259,7 +271,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.jobs_and_compensations.get_compensations(job_id="") + res = gusto.jobs_and_compensations.get_compensations(job_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -295,6 +307,7 @@ scope: `jobs:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -305,7 +318,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.jobs_and_compensations.create_compensation(job_id="", payment_unit=gusto_embedded.PostV1CompensationsCompensationIDPaymentUnit.YEAR, flsa_status=gusto_embedded.FlsaStatusType.EXEMPT, rate="60000.00") + res = gusto.jobs_and_compensations.create_compensation(job_id="", payment_unit=gusto_embedded.PostV1CompensationsCompensationIDPaymentUnit.YEAR, flsa_status=gusto_embedded.FlsaStatusType.EXEMPT, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, rate="60000.00") # Handle response print(res) @@ -332,10 +345,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_compensation @@ -346,7 +359,9 @@ scope: `jobs:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -355,7 +370,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.jobs_and_compensations.get_compensation(compensation_id="") + res = gusto.jobs_and_compensations.get_compensation(compensation_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -388,6 +403,7 @@ scope: `jobs:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -398,7 +414,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.jobs_and_compensations.update_compensation(compensation_id="", version="98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", rate="60000.00", payment_unit=gusto_embedded.PutV1CompensationsCompensationIDPaymentUnit.YEAR, flsa_status=gusto_embedded.FlsaStatusType.EXEMPT) + res = gusto.jobs_and_compensations.update_compensation(compensation_id="", version="98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, rate="60000.00", payment_unit=gusto_embedded.PutV1CompensationsCompensationIDPaymentUnit.YEAR, flsa_status=gusto_embedded.FlsaStatusType.EXEMPT) # Handle response print(res) @@ -425,10 +441,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete_compensation @@ -439,7 +455,9 @@ scope: `jobs:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -448,7 +466,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.jobs_and_compensations.delete_compensation(compensation_id="") + gusto.jobs_and_compensations.delete_compensation(compensation_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... diff --git a/gusto_embedded/docs/sdks/locations/README.md b/gusto_embedded/docs/sdks/locations/README.md index 114c59e5..e5f3998e 100644 --- a/gusto_embedded/docs/sdks/locations/README.md +++ b/gusto_embedded/docs/sdks/locations/README.md @@ -21,7 +21,9 @@ scope: `companies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -30,7 +32,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.locations.create(company_id="", phone_number="8009360383", street_1="425 2nd Street", city="San Francisco", state="CA", zip_code="94107", street_2="Suite 602") + res = gusto.locations.create(company_id="", phone_number="8009360383", street_1="425 2nd Street", city="San Francisco", state="CA", zip_code="94107", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_2="Suite 602") # Handle response print(res) @@ -59,10 +61,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get @@ -74,7 +76,9 @@ scope: `companies:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -83,7 +87,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.locations.get(company_id="") + res = gusto.locations.get(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -119,7 +123,9 @@ scope: `companies:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -128,7 +134,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.locations.retrieve(location_id="") + res = gusto.locations.retrieve(location_id="", x_gusto_api_version=gusto_embedded.XGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -149,10 +155,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update @@ -163,7 +169,9 @@ scope: `companies.write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -172,7 +180,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.locations.update(location_id="", version="aa2c4db94c2e968aa0cf51f346007c5f", phone_number="8009360383", street_1="300 3rd Street", street_2="Apartment 318", city="San Francisco", zip_code="94107", filing_address=True) + res = gusto.locations.update(location_id="", version="56d00c178bc7393b2a206ed6a86afcb4", x_gusto_api_version=gusto_embedded.HeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, phone_number="8009360383", street_1="300 3rd Street", street_2="Apartment 318", city="San Francisco", zip_code="94107") # Handle response print(res) @@ -181,21 +189,21 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `location_id` | *str* | :heavy_check_mark: | The UUID of the location | -| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | -| `x_gusto_api_version` | [Optional[models.HeaderXGustoAPIVersion]](../../models/headerxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `phone_number` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `country` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `mailing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's mailing address. A company has a single mailing address, so this designation will override any previous selection. | -| `filing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's filing address. A company has a single filing address, so this designation will override any previous selection. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `location_id` | *str* | :heavy_check_mark: | The UUID of the location | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `x_gusto_api_version` | [Optional[models.HeaderXGustoAPIVersion]](../../models/headerxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `phone_number` | *Optional[str]* | :heavy_minus_sign: | N/A | 8009360383 | +| `street_1` | *Optional[str]* | :heavy_minus_sign: | N/A | 300 3rd Street | +| `street_2` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | Apartment 318 | +| `city` | *Optional[str]* | :heavy_minus_sign: | N/A | San Francisco | +| `state` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `zip_code` | *Optional[str]* | :heavy_minus_sign: | N/A | 94107 | +| `country` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `mailing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's mailing address. A company has a single mailing address, so this designation will override any previous selection. | | +| `filing_address` | *Optional[bool]* | :heavy_minus_sign: | For a company location, specify if this location is the company's filing address. A company has a single filing address, so this designation will override any previous selection. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -203,10 +211,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404, 409, 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 409, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_minimum_wages @@ -217,7 +225,9 @@ scope: `companies:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -226,7 +236,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.locations.get_minimum_wages(location_uuid="", effective_date="2020-01-31") + res = gusto.locations.get_minimum_wages(location_uuid="", x_gusto_api_version=gusto_embedded.GetV1LocationsLocationUUIDMinimumWagesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, effective_date="2020-01-31") # Handle response print(res) @@ -248,7 +258,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/notifications/README.md b/gusto_embedded/docs/sdks/notifications/README.md index 9556dc3c..aaa919f6 100644 --- a/gusto_embedded/docs/sdks/notifications/README.md +++ b/gusto_embedded/docs/sdks/notifications/README.md @@ -6,6 +6,7 @@ ### Available Operations * [get_details](#get_details) - Get a notification's details +* [get_company_notifications](#get_company_notifications) - Get notifications for company ## get_details @@ -19,7 +20,9 @@ scope: `notifications:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -28,7 +31,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.notifications.get_details(notification_uuid="") + res = gusto.notifications.get_details(notification_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -49,7 +52,55 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_company_notifications + +Returns all notifications relevant for the given company. + +scope: `notifications:read` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.notifications.get_company_notifications(company_uuid="", x_gusto_api_version=gusto_embedded.GetCompanyNotificationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company for which you would like to return notifications | +| `status` | [Optional[models.QueryParamStatus]](../../models/queryparamstatus.md) | :heavy_minus_sign: | N/A | +| `x_gusto_api_version` | [Optional[models.GetCompanyNotificationsHeaderXGustoAPIVersion]](../../models/getcompanynotificationsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.Notification]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/paymentconfigssdk/README.md b/gusto_embedded/docs/sdks/paymentconfigssdk/README.md index 051a3442..3411c0bb 100644 --- a/gusto_embedded/docs/sdks/paymentconfigssdk/README.md +++ b/gusto_embedded/docs/sdks/paymentconfigssdk/README.md @@ -10,13 +10,15 @@ ## get -Get payment speed for the company and fast payment limit (1-day is only applicable to partners that opt in). +Get payment speed configurations for the company and fast payment limit (1-day is only applicable to partners that opt in). scope: `company_payment_configs:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -25,7 +27,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payment_configs.get(company_uuid="") + res = gusto.payment_configs.get(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -58,6 +60,7 @@ scope: `company_payment_configs:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -71,7 +74,7 @@ with Gusto( res = gusto.payment_configs.update(company_uuid="", request_body={ "fast_payment_limit": "5000", "payment_speed": gusto_embedded.PaymentSpeedParam.TWO_MINUS_DAY, - }) + }, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -93,7 +96,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/payrolls/README.md b/gusto_embedded/docs/sdks/payrolls/README.md index 67e16b80..1b8adcdb 100644 --- a/gusto_embedded/docs/sdks/payrolls/README.md +++ b/gusto_embedded/docs/sdks/payrolls/README.md @@ -5,8 +5,8 @@ ### Available Operations -* [create_off_cycle](#create_off_cycle) - Create an off-cycle payroll * [list](#list) - Get all payrolls for a company +* [create_off_cycle](#create_off_cycle) - Create an off-cycle payroll * [get_approved_reversals](#get_approved_reversals) - Get approved payroll reversals * [get](#get) - Get a single payroll * [update](#update) - Update a payroll by ID @@ -22,22 +22,25 @@ * [get_pay_stub](#get_pay_stub) - Get an employee pay stub (pdf) * [get_pay_stubs](#get_pay_stubs) - Get an employee's pay stubs * [generate_printable_checks](#generate_printable_checks) - Generate printable payroll checks (pdf) +* [get_v1_companies_company_id_payrolls_id_partner_disbursements](#get_v1_companies_company_id_payrolls_id_partner_disbursements) - Get partner disbursements for a payroll +* [patch_v1_companies_company_id_payrolls_id_partner_disbursements](#patch_v1_companies_company_id_payrolls_id_partner_disbursements) - Update partner disbursements for a payroll -## create_off_cycle +## list -Creates a new, unprocessed, off-cycle payroll. +Returns a list of payrolls for a company. You can change the payrolls returned by updating the processing_status, payroll_types, start_date, & end_date params. -## `off_cycle_reason` -By default: -- External benefits and deductions will be included when the `off_cycle_reason` is set to `Correction`. -- All benefits and deductions are blocked when the `off_cycle_reason` is set to `Bonus`. +By default, will return processed, regular payrolls for the past 6 months. -These elections can be overridden with the `skip_regular_deductions` boolean. +Notes: +* Dollar amounts are returned as string representations of numeric decimals, are represented to the cent. +* end_date can be at most 3 months in the future and start_date and end_date can't be more than 1 year apart. + +scope: `payrolls:read` -scope: `payrolls:run` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -48,7 +51,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payrolls.create_off_cycle(company_id="", off_cycle=True, off_cycle_reason=gusto_embedded.OffCycleReason.DISMISSED_EMPLOYEE, start_date="", end_date="") + res = gusto.payrolls.list(company_id="", x_gusto_api_version=gusto_embedded.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, start_date="2020-01-31", end_date="2020-01-31", sort_order=gusto_embedded.QueryParamSortOrder.ASC) # Handle response print(res) @@ -57,48 +60,52 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | -| `off_cycle` | *bool* | :heavy_check_mark: | Whether it is an off cycle payroll. | -| `off_cycle_reason` | [models.OffCycleReason](../../models/offcyclereason.md) | :heavy_check_mark: | An off cycle payroll reason. Select one from the following list. | -| `start_date` | *str* | :heavy_check_mark: | Pay period start date. | -| `end_date` | *str* | :heavy_check_mark: | Pay period end date. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `pay_schedule_uuid` | *Optional[str]* | :heavy_minus_sign: | A pay schedule is required for transition from old pay schedule payroll to identify the matching transition pay period. | -| `employee_uuids` | List[*str*] | :heavy_minus_sign: | A list of employee uuids to include on the payroll. | -| `check_date` | *Optional[str]* | :heavy_minus_sign: | Payment date. | -| `withholding_pay_period` | [Optional[models.WithholdingPayPeriod]](../../models/withholdingpayperiod.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. | -| `skip_regular_deductions` | *Optional[bool]* | :heavy_minus_sign: | Block regular deductions and contributions for this payroll. | -| `fixed_withholding_rate` | *Optional[bool]* | :heavy_minus_sign: | Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `processing_statuses` | List[[models.ProcessingStatuses](../../models/processingstatuses.md)] | :heavy_minus_sign: | Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` | | +| `payroll_types` | List[[models.PayrollTypes](../../models/payrolltypes.md)] | :heavy_minus_sign: | Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` | | +| `processed` | *Optional[bool]* | :heavy_minus_sign: | Whether to return processed or unprocessed payrolls | | +| `include_off_cycle` | *Optional[bool]* | :heavy_minus_sign: | Whether to include off cycle payrolls in the response | | +| `include` | List[[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude](../../models/getv1companiescompanyidpayrollsqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` | | +| `start_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is after the start date | 2020-01-31 | +| `end_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. | 2020-01-31 | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | +| `sort_order` | [Optional[models.QueryParamSortOrder]](../../models/queryparamsortorder.md) | :heavy_minus_sign: | A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. | asc | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[models.PayrollPrepared](../../models/payrollprepared.md)** +**[List[models.Payroll]](../../models/.md)** ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | -## list +## create_off_cycle -Returns a list of payrolls for a company. You can change the payrolls returned by updating the processing_status, payroll_types, start_date, & end_date params. +Creates a new, unprocessed, off-cycle payroll. -By default, will return processed, regular payrolls for the past 6 months. +## `off_cycle_reason` +By default: +- External benefits and deductions will be included when the `off_cycle_reason` is set to `Correction`. +- All benefits and deductions are blocked when the `off_cycle_reason` is set to `Bonus`. -Notes: -* Dollar amounts are returned as string representations of numeric decimals, are represented to the cent. -* end_date can be at most 3 months in the future and start_date and end_date can't be more than 1 year apart. +These elections can be overridden with the `skip_regular_deductions` boolean. + +scope: `payrolls:run` -scope: `payrolls:read` ### Example Usage + ```python +from datetime import date import gusto_embedded from gusto_embedded import Gusto import os @@ -108,7 +115,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payrolls.list(company_id="", sort_order=gusto_embedded.SortOrder.ASC) + res = gusto.payrolls.create_off_cycle(company_id="", off_cycle=False, off_cycle_reason=gusto_embedded.OffCycleReason.CORRECTION, start_date=date.fromisoformat("2025-06-14"), end_date=date.fromisoformat("2025-07-23"), x_gusto_api_version=gusto_embedded.PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -117,29 +124,32 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | -| `processing_statuses` | List[[models.ProcessingStatuses](../../models/processingstatuses.md)] | :heavy_minus_sign: | Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` | | -| `payroll_types` | List[[models.PayrollTypes](../../models/payrolltypes.md)] | :heavy_minus_sign: | Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` | | -| `include` | List[[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude](../../models/getv1companiescompanyidpayrollsqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta` | | -| `start_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is after the start date | | -| `end_date` | *Optional[str]* | :heavy_minus_sign: | Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. | | -| `sort_order` | [Optional[models.SortOrder]](../../models/sortorder.md) | :heavy_minus_sign: | A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. | asc | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | -| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `off_cycle` | *bool* | :heavy_check_mark: | Whether it is an off cycle payroll. | +| `off_cycle_reason` | [models.OffCycleReason](../../models/offcyclereason.md) | :heavy_check_mark: | An off cycle payroll reason. Select one from the following list. | +| `start_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | Pay period start date. | +| `end_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | Pay period end date. | +| `x_gusto_api_version` | [Optional[models.PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../../models/postv1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `pay_schedule_uuid` | *Optional[str]* | :heavy_minus_sign: | A pay schedule is required for transition from old pay schedule payroll to identify the matching transition pay period. | +| `employee_uuids` | List[*str*] | :heavy_minus_sign: | A list of employee uuids to include on the payroll. | +| `check_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Payment date. | +| `withholding_pay_period` | [Optional[models.PostV1CompaniesCompanyIDPayrollsWithholdingPayPeriod]](../../models/postv1companiescompanyidpayrollswithholdingpayperiod.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. | +| `skip_regular_deductions` | *Optional[bool]* | :heavy_minus_sign: | Block regular deductions and contributions for this payroll. | +| `fixed_withholding_rate` | *Optional[bool]* | :heavy_minus_sign: | Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[List[models.PayrollMinimal]](../../models/.md)** +**[models.PayrollPrepared](../../models/payrollprepared.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_approved_reversals @@ -149,7 +159,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -158,7 +170,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payrolls.get_approved_reversals(company_id="") + res = gusto.payrolls.get_approved_reversals(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -198,9 +210,12 @@ Notes: scope: `payrolls:read` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -209,7 +224,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payrolls.get(company_id="", payroll_id="") + res = gusto.payrolls.get(company_id="", payroll_id="", x_gusto_api_version=gusto_embedded.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -222,19 +237,23 @@ with Gusto( | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidpayrollspayrollidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `include` | List[[models.GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude](../../models/getv1companiescompanyidpayrollspayrollidqueryparaminclude.md)] | :heavy_minus_sign: | Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `sort_by` | [Optional[models.SortBy]](../../models/sortby.md) | :heavy_minus_sign: | Field to sort employee compensations by | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.Payroll](../../models/payroll.md)** +**[models.PayrollShow](../../models/payrollshow.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update @@ -245,9 +264,12 @@ will not be removed from the payroll. scope: `payrolls:write` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -258,9 +280,7 @@ with Gusto( res = gusto.payrolls.update(company_id="", payroll_id="", employee_compensations=[ {}, - {}, - {}, - ]) + ], x_gusto_api_version=gusto_embedded.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -273,9 +293,9 @@ with Gusto( | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | -| `employee_compensations` | List[[models.PutV1CompaniesCompanyIDPayrollsEmployeeCompensations](../../models/putv1companiescompanyidpayrollsemployeecompensations.md)] | :heavy_check_mark: | N/A | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `withholding_pay_period` | [Optional[models.PutV1CompaniesCompanyIDPayrollsWithholdingPayPeriod]](../../models/putv1companiescompanyidpayrollswithholdingpayperiod.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. | +| `employee_compensations` | List[[models.PayrollUpdateEmployeeCompensations](../../models/payrollupdateemployeecompensations.md)] | :heavy_check_mark: | N/A | +| `x_gusto_api_version` | [Optional[models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../../models/putv1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `withholding_pay_period` | [Optional[models.WithholdingPayPeriod]](../../models/withholdingpayperiod.md) | :heavy_minus_sign: | The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. | | `skip_regular_deductions` | *Optional[bool]* | :heavy_minus_sign: | Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls. | | `fixed_withholding_rate` | *Optional[bool]* | :heavy_minus_sign: | Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -286,10 +306,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete @@ -299,9 +319,12 @@ By default the payroll and associated data is deleted synchronously. To request scope: `payrolls:run` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -310,7 +333,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.payrolls.delete(company_id="", payroll_id="") + gusto.payrolls.delete(company_id="", payroll_id="", x_gusto_api_version=gusto_embedded.DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -323,14 +346,15 @@ with Gusto( | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | | `async_` | *Optional[bool]* | :heavy_minus_sign: | When true, request an asynchronous delete of the payroll. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion]](../../models/deletev1companiescompanyidpayrollsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## prepare @@ -344,7 +368,9 @@ scope: `payrolls:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -353,7 +379,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payrolls.prepare(company_id="", payroll_id="") + res = gusto.payrolls.prepare(company_id="", payroll_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -366,7 +392,11 @@ with Gusto( | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | `payroll_id` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `sort_by` | [Optional[models.PayrollPrepareSortBy]](../../models/payrollpreparesortby.md) | :heavy_minus_sign: | Sort employee compenstations by name. Options: first_name, last_name | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `employee_uuids` | List[*str*] | :heavy_minus_sign: | An array of employee UUIDs. If passed, only those employees payroll items will be prepared. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -390,9 +420,12 @@ Notes: scope: `payrolls:read` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -401,7 +434,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payrolls.get_receipt(payroll_uuid="") + res = gusto.payrolls.get_receipt(payroll_uuid="", x_gusto_api_version=gusto_embedded.GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -413,7 +446,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `payroll_uuid` | *str* | :heavy_check_mark: | The UUID of the payroll | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion]](../../models/getv1paymentreceiptspayrollspayrolluuidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -422,9 +455,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_blockers @@ -436,7 +470,9 @@ scope: `payrolls:run` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -445,7 +481,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payrolls.get_blockers(company_uuid="") + res = gusto.payrolls.get_blockers(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -480,6 +516,7 @@ scope: `payrolls:run` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -490,7 +527,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.payrolls.skip(company_uuid="", payroll_type=gusto_embedded.PostCompaniesPayrollSkipCompanyUUIDPayrollType.REGULAR, start_date="2023-05-26T00:00:00Z", end_date="2023-06-25T00:00:00Z", pay_schedule_uuid="85100524-4b42-4d2d-bd62-9d864f9aea64") + gusto.payrolls.skip(company_uuid="", payroll_type=gusto_embedded.PostCompaniesPayrollSkipCompanyUUIDPayrollType.REGULAR, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, start_date="2023-05-26T00:00:00Z", end_date="2023-06-25T00:00:00Z", pay_schedule_uuid="85100524-4b42-4d2d-bd62-9d864f9aea64") # Use the SDK ... @@ -511,11 +548,11 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.PayrollBlockersError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.PayrollBlockersError | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## calculate_gross_up @@ -527,7 +564,9 @@ scope: `payrolls:run` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -536,7 +575,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payrolls.calculate_gross_up(payroll_uuid="", employee_uuid="be48c41e-142d-4116-9430-5aba2313fac7", net_pay="1000.00") + res = gusto.payrolls.calculate_gross_up(payroll_uuid="", employee_uuid="be48c41e-142d-4116-9430-5aba2313fac7", net_pay="1000.00", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -559,11 +598,11 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.PayrollBlockersError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.PayrollBlockersError | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## calculate @@ -576,7 +615,9 @@ If the company is blocked from running payroll due to issues like incomplete set ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -585,7 +626,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.payrolls.calculate(company_id="", payroll_id="") + gusto.payrolls.calculate(company_id="", payroll_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -602,11 +643,11 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.PayrollBlockersError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.PayrollBlockersError | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## submit @@ -620,7 +661,9 @@ scope: `payrolls:run` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -629,7 +672,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.payrolls.submit(company_id="", payroll_id="") + gusto.payrolls.submit(company_id="", payroll_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -647,11 +690,11 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.PayrollBlockersError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.PayrollBlockersError | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## cancel @@ -664,7 +707,9 @@ scope: `payrolls:run` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -673,7 +718,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payrolls.cancel(company_id="", payroll_id="") + res = gusto.payrolls.cancel(company_id="", payroll_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -695,10 +740,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_pay_stub @@ -709,7 +754,9 @@ scope: `pay_stubs:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -718,9 +765,10 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.payrolls.get_pay_stub(payroll_id="", employee_id="") + res = gusto.payrolls.get_pay_stub(payroll_id="", employee_id="", x_gusto_api_version=gusto_embedded.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) - # Use the SDK ... + # Handle response + print(res) ``` @@ -733,11 +781,16 @@ with Gusto( | `x_gusto_api_version` | [Optional[models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion]](../../models/getv1payrollspayrolluuidemployeesemployeeuuidpaystubheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +### Response + +**[httpx.Response](../../models/.md)** + ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_pay_stubs @@ -748,7 +801,9 @@ scope: `pay_stubs:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -757,7 +812,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payrolls.get_pay_stubs(employee_id="") + res = gusto.payrolls.get_pay_stubs(employee_id="", x_gusto_api_version=gusto_embedded.GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -770,6 +825,8 @@ with Gusto( | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion]](../../models/getv1employeesemployeeuuidpaystubsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -778,10 +835,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 404 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## generate_printable_checks @@ -791,6 +848,7 @@ scope: `generated_documents:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -801,7 +859,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.payrolls.generate_printable_checks(payroll_uuid="", printing_format=gusto_embedded.PrintingFormat.BOTTOM) + res = gusto.payrolls.generate_printable_checks(payroll_uuid="", printing_format=gusto_embedded.PrintingFormat.TOP, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -824,7 +882,106 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_v1_companies_company_id_payrolls_id_partner_disbursements + +Get partner disbursements for a specific payroll. + +scope: `partner_disbursements:read` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.payrolls.get_v1_companies_company_id_payrolls_id_partner_disbursements(company_id="", id="", x_gusto_api_version=gusto_embedded.GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `id` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `x_gusto_api_version` | [Optional[models.GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion]](../../models/getv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PayrollPartnerDisbursements](../../models/payrollpartnerdisbursements.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## patch_v1_companies_company_id_payrolls_id_partner_disbursements + +Update partner disbursements for a specific payroll. + +scope: `partner_disbursements:write` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.payrolls.patch_v1_companies_company_id_payrolls_id_partner_disbursements(company_id="", id="", disbursements=[ + { + "employee_uuid": "1a2b3c4d-5e6f-7890-abcd-ef1234567890", + }, + ], x_gusto_api_version=gusto_embedded.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | +| `id` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `disbursements` | List[[models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements](../../models/patchv1companiescompanyidpayrollsidpartnerdisbursementsdisbursements.md)] | :heavy_check_mark: | N/A | +| `x_gusto_api_version` | [Optional[models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion]](../../models/patchv1companiescompanyidpayrollsidpartnerdisbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PayrollPartnerDisbursements](../../models/payrollpartnerdisbursements.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/payschedules/README.md b/gusto_embedded/docs/sdks/payschedules/README.md index e42eb9ee..13111331 100644 --- a/gusto_embedded/docs/sdks/payschedules/README.md +++ b/gusto_embedded/docs/sdks/payschedules/README.md @@ -28,6 +28,7 @@ scope: `pay_schedules:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -38,7 +39,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.pay_schedules.create(company_id="", frequency=gusto_embedded.Frequency.TWICE_PER_MONTH, anchor_pay_date="2021-10-15", anchor_end_of_pay_period="2021-10-15", day_1=15, day_2=31, custom_name="demo pay schedule") + res = gusto.pay_schedules.create(company_id="", frequency=gusto_embedded.Frequency.TWICE_PER_MONTH, anchor_pay_date="2021-10-15", anchor_end_of_pay_period="2021-10-15", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, day_1=15, day_2=31, custom_name="demo pay schedule") # Handle response print(res) @@ -65,10 +66,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_all @@ -78,7 +79,9 @@ scope: `pay_schedules:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -87,7 +90,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.pay_schedules.get_all(company_id="") + res = gusto.pay_schedules.get_all(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -122,6 +125,7 @@ scope: `pay_schedules:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -132,7 +136,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.pay_schedules.get_preview(company_id="", frequency=gusto_embedded.QueryParamFrequency.EVERY_OTHER_WEEK, anchor_pay_date="2020-05-15", anchor_end_of_pay_period="2020-05-08") + res = gusto.pay_schedules.get_preview(company_id="", frequency=gusto_embedded.QueryParamFrequency.MONTHLY, anchor_pay_date="2020-05-15", anchor_end_of_pay_period="2020-05-08", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -170,7 +174,9 @@ scope: `pay_schedules:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -179,7 +185,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.pay_schedules.get(company_id="", pay_schedule_id="") + res = gusto.pay_schedules.get(company_id="", pay_schedule_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -213,6 +219,7 @@ scope: `pay_schedules:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -223,7 +230,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.pay_schedules.update(company_id="", pay_schedule_id="", version="68934a3e9455fa72420237eb05902327", frequency=gusto_embedded.PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDFrequency.TWICE_PER_MONTH, anchor_pay_date="2021-10-15", anchor_end_of_pay_period="2021-10-15", day_1=15, day_2=31, custom_name="demo pay schedule", auto_pilot=True) + res = gusto.pay_schedules.update(company_id="", pay_schedule_id="", version="68934a3e9455fa72420237eb05902327", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, frequency=gusto_embedded.PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDFrequency.TWICE_PER_MONTH, anchor_pay_date="2021-10-15", anchor_end_of_pay_period="2021-10-15", day_1=15, day_2=31, custom_name="demo pay schedule", auto_pilot=True) # Handle response print(res) @@ -253,10 +260,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_pay_periods @@ -270,7 +277,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -279,7 +288,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.pay_schedules.get_pay_periods(company_id="", start_date="2020-01-01", end_date="2020-01-31") + res = gusto.pay_schedules.get_pay_periods(company_id="", start_date="2020-01-01", end_date="2020-01-31", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -317,7 +326,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -326,7 +337,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.pay_schedules.get_unprocessed_termination_periods(company_id="") + res = gusto.pay_schedules.get_unprocessed_termination_periods(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -359,7 +370,9 @@ scope: `pay_schedules:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -368,7 +381,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.pay_schedules.get_assignments(company_id="") + res = gusto.pay_schedules.get_assignments(company_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -401,6 +414,7 @@ scope: `pay_schedules:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -411,7 +425,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.pay_schedules.preview_assignment(company_id="", type_=gusto_embedded.PayScheduleAssignmentBodyType.BY_EMPLOYEE, employees=[ + res = gusto.pay_schedules.preview_assignment(company_id="", type_=gusto_embedded.PayScheduleAssignmentBodyType.BY_EMPLOYEE, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, employees=[ { "employee_uuid": "f0238368-f2cf-43e2-9a07-b0265f2cec69", "pay_schedule_uuid": "c277ac52-9871-4a96-a1e6-0c449684602a", @@ -444,10 +458,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## assign @@ -458,6 +472,7 @@ scope: `pay_schedules:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -468,7 +483,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.pay_schedules.assign(company_id="", type_=gusto_embedded.PayScheduleAssignmentBodyType.BY_EMPLOYEE, employees=[ + gusto.pay_schedules.assign(company_id="", type_=gusto_embedded.PayScheduleAssignmentBodyType.BY_EMPLOYEE, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, employees=[ { "employee_uuid": "f0238368-f2cf-43e2-9a07-b0265f2cec69", "pay_schedule_uuid": "c277ac52-9871-4a96-a1e6-0c449684602a", @@ -496,7 +511,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/recoverycases/README.md b/gusto_embedded/docs/sdks/recoverycases/README.md index 823b3cbf..a9b1c8fd 100644 --- a/gusto_embedded/docs/sdks/recoverycases/README.md +++ b/gusto_embedded/docs/sdks/recoverycases/README.md @@ -16,7 +16,9 @@ scope: `recovery_cases:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -25,7 +27,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.recovery_cases.get(company_uuid="") + res = gusto.recovery_cases.get(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -62,7 +64,9 @@ scope: `recovery_cases:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -71,7 +75,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.recovery_cases.redebit(recovery_case_uuid="") + gusto.recovery_cases.redebit(recovery_case_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -87,7 +91,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_app_int/docs/sdks/contractorpaymentgroups/README.md b/gusto_embedded/docs/sdks/reimbursements/README.md similarity index 55% rename from gusto_app_int/docs/sdks/contractorpaymentgroups/README.md rename to gusto_embedded/docs/sdks/reimbursements/README.md index 384cc08e..445c5e06 100644 --- a/gusto_app_int/docs/sdks/contractorpaymentgroups/README.md +++ b/gusto_embedded/docs/sdks/reimbursements/README.md @@ -1,31 +1,37 @@ -# ContractorPaymentGroups -(*contractor_payment_groups*) +# Reimbursements +(*reimbursements*) ## Overview ### Available Operations -* [get](#get) - Get contractor payment groups for a company -* [preview](#preview) - Preview a contractor payment group -* [fetch](#fetch) - Fetch a contractor payment group +* [get_v1_employees_employee_id_recurring_reimbursements](#get_v1_employees_employee_id_recurring_reimbursements) - Get recurring reimbursements for an employee +* [post_v1_employees_employee_id_recurring_reimbursements](#post_v1_employees_employee_id_recurring_reimbursements) - Create a recurring reimbursement +* [get_v1_recurring_reimbursements](#get_v1_recurring_reimbursements) - Get a recurring reimbursement +* [put_v1_recurring_reimbursements](#put_v1_recurring_reimbursements) - Update a recurring reimbursement +* [delete_v1_recurring_reimbursements](#delete_v1_recurring_reimbursements) - Delete a recurring reimbursement -## get +## get_v1_employees_employee_id_recurring_reimbursements -Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. +Get all active recurring reimbursements for an employee. + +scope: `reimbursements:read` -scope: `payrolls:read` ### Example Usage + ```python -from gusto_app_integration import GustoAppIntegration +import gusto_embedded +from gusto_embedded import Gusto +import os -with GustoAppIntegration( - company_access_auth="", -) as gai_client: +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: - res = gai_client.contractor_payment_groups.get(company_id="", start_date="2020-01-01", end_date="2020-12-31") + res = gusto.reimbursements.get_v1_employees_employee_id_recurring_reimbursements(employee_id="", x_gusto_api_version=gusto_embedded.GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -34,51 +40,46 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | -| `start_date` | *Optional[str]* | :heavy_minus_sign: | The time period for which to retrieve contractor payment groups. Defaults to 6 months ago. | 2020-01-01 | -| `end_date` | *Optional[str]* | :heavy_minus_sign: | The time period for which to retrieve contractor payment groups. Defaults to today's date. | 2020-12-31 | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | | -| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `x_gusto_api_version` | [Optional[models.GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion]](../../models/getv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. | +| `per` | *Optional[int]* | :heavy_minus_sign: | Number of objects per page. For majority of endpoints will default to 25 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[List[models.ContractorPaymentGroupMinimal]](../../models/.md)** +**[List[models.GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBody]](../../models/.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## post_v1_employees_employee_id_recurring_reimbursements -## preview +Create a recurring reimbursement for an employee. -Preview a group of contractor payments. Request will validate inputs and return preview of the contractor payment group including the expected debit_date. Uuid will be null in the response. +scope: `reimbursements:write` -scope: `payrolls:read` ### Example Usage + ```python -from datetime import date -from gusto_app_integration import GustoAppIntegration +import gusto_embedded +from gusto_embedded import Gusto +import os -with GustoAppIntegration( - company_access_auth="", -) as gai_client: +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: - res = gai_client.contractor_payment_groups.preview(company_id="", check_date=date.fromisoformat("2020-01-01"), contractor_payments=[ - { - "wage": 5000, - "hours": 40, - "bonus": 500, - "reimbursement": 20, - }, - ], creation_token="1d532d13-8f61-4a57-ad3c-b5fac1c6e05e") + res = gusto.reimbursements.post_v1_employees_employee_id_recurring_reimbursements(employee_id="", description="as procrastinate produce provided gracefully huzzah likewise when", amount=2610.77, x_gusto_api_version=gusto_embedded.PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -87,43 +88,46 @@ with GustoAppIntegration( ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_id` | *str* | :heavy_check_mark: | The UUID of the company | | -| `check_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_check_mark: | The payment check date | 2020-01-01 | -| `contractor_payments` | List[[models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments](../../models/postv1companiescompanyidcontractorpaymentgroupspreviewcontractorpayments.md)] | :heavy_check_mark: | N/A | | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | -| `creation_token` | *Optional[str]* | :heavy_minus_sign: | Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. | 1d532d13-8f61-4a57-ad3c-b5fac1c6e05e | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | +| `description` | *str* | :heavy_check_mark: | The description of the reimbursement | +| `amount` | *float* | :heavy_check_mark: | The dollar amount of the reimbursement | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion]](../../models/postv1employeesemployeeidrecurringreimbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.ContractorPaymentGroup](../../models/contractorpaymentgroup.md)** +**[models.PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBody](../../models/postv1employeesemployeeidrecurringreimbursementsresponsebody.md)** ### Errors | Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | | models.APIError | 4XX, 5XX | \*/\* | -## fetch +## get_v1_recurring_reimbursements + +Get a specific recurring reimbursement. -Returns a contractor payment group with all associated contractor payments. +scope: `reimbursements:read` -scope: `payrolls:read` ### Example Usage + ```python -from gusto_app_integration import GustoAppIntegration +import gusto_embedded +from gusto_embedded import Gusto +import os -with GustoAppIntegration( - company_access_auth="", -) as gai_client: +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: - res = gai_client.contractor_payment_groups.fetch(contractor_payment_group_uuid="") + res = gusto.reimbursements.get_v1_recurring_reimbursements(id="", x_gusto_api_version=gusto_embedded.GetV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -134,13 +138,103 @@ with GustoAppIntegration( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `contractor_payment_group_uuid` | *str* | :heavy_check_mark: | The UUID of the contractor payment group | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `id` | *str* | :heavy_check_mark: | The UUID of the reimbursement | +| `x_gusto_api_version` | [Optional[models.GetV1RecurringReimbursementsHeaderXGustoAPIVersion]](../../models/getv1recurringreimbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.ContractorPaymentGroup](../../models/contractorpaymentgroup.md)** +**[models.GetV1RecurringReimbursementsResponseBody](../../models/getv1recurringreimbursementsresponsebody.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## put_v1_recurring_reimbursements + +Update a recurring reimbursement. + +scope: `reimbursements:write` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.reimbursements.put_v1_recurring_reimbursements(id="", version="56d00c178bc7393b2a206ed6a86afcb4", x_gusto_api_version=gusto_embedded.PutV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The UUID of the reimbursement | | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. | 56d00c178bc7393b2a206ed6a86afcb4 | +| `x_gusto_api_version` | [Optional[models.PutV1RecurringReimbursementsHeaderXGustoAPIVersion]](../../models/putv1recurringreimbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `description` | *Optional[str]* | :heavy_minus_sign: | The description of the reimbursement | | +| `amount` | *Optional[float]* | :heavy_minus_sign: | The dollar amount of the reimbursement | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.PutV1RecurringReimbursementsResponseBody](../../models/putv1recurringreimbursementsresponsebody.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 409, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## delete_v1_recurring_reimbursements + +Delete (soft delete) a recurring reimbursement for an employee. + +scope: `reimbursements:write` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + gusto.reimbursements.delete_v1_recurring_reimbursements(id="", x_gusto_api_version=gusto_embedded.DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The UUID of the reimbursement | +| `x_gusto_api_version` | [Optional[models.DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion]](../../models/deletev1recurringreimbursementsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Errors diff --git a/gusto_embedded/docs/sdks/reports/README.md b/gusto_embedded/docs/sdks/reports/README.md index 16040005..adfdc00a 100644 --- a/gusto_embedded/docs/sdks/reports/README.md +++ b/gusto_embedded/docs/sdks/reports/README.md @@ -6,17 +6,19 @@ ### Available Operations * [create_custom](#create_custom) - Create a custom report -* [get](#get) - Get a report +* [post_payrolls_payroll_uuid_reports_general_ledger](#post_payrolls_payroll_uuid_reports_general_ledger) - Create a general ledger report +* [get_reports_request_uuid](#get_reports_request_uuid) - Get a report * [get_template](#get_template) - Get a report template ## create_custom -Create a custom report for a company. This endpoint initiates creating a custom report with custom columns, groupings, and filters. The `request_uuid` in the response can then be used to poll for the status and report URL upon completion using the report GET endpoint. This URL is valid for 10 minutes. +Create a custom report for a company. This endpoint initiates creating a custom report with custom columns, groupings, and filters. The `request_uuid` in the response can then be used to poll for the status and report URL upon completion using the [report GET endpoint](https://docs.gusto.com/embedded-payroll/reference/get-reports-request_uuid). This URL is valid for 10 minutes. scope: `company_reports:write` ### Example Usage + ```python from datetime import date import gusto_embedded @@ -29,12 +31,8 @@ with Gusto( ) as gusto: res = gusto.reports.create_custom(company_uuid="", columns=[ - gusto_embedded.Columns.TOTAL_EMPLOYER_BENEFIT_CONTRIBUTIONS, - gusto_embedded.Columns.EMPLOYEE_MEDICARE_ADDITIONAL_TAX, - ], groupings=[ - gusto_embedded.Groupings.WORK_ADDRESS_STATE, - gusto_embedded.Groupings.WORK_ADDRESS, - ], file_type=gusto_embedded.FileType.CSV, start_date=date.fromisoformat("2024-01-01"), end_date=date.fromisoformat("2024-04-01"), dismissed_start_date=date.fromisoformat("2024-01-01"), dismissed_end_date=date.fromisoformat("2024-04-01")) + gusto_embedded.Columns.TOTAL_TIME_OFF_EARNINGS, + ], groupings=[], file_type=gusto_embedded.FileType.JSON, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, with_totals=False, start_date=date.fromisoformat("2024-01-01"), end_date=date.fromisoformat("2024-04-01"), dismissed_start_date=date.fromisoformat("2024-01-01"), dismissed_end_date=date.fromisoformat("2024-04-01")) # Handle response print(res) @@ -70,20 +68,73 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | -## get +## post_payrolls_payroll_uuid_reports_general_ledger + +Create a general ledger report for a payroll. The report can be aggregated by different dimensions such as job or department. + +Use the `request_uuid` in the response with the [report GET endpoint](../reference/get-reports-request_uuid) to poll for the status and report URL upon completion. The retrieved report will be generated in a JSON format. + +scope: `company_reports:write` OR `company_reports:write:general_ledger` + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.reports.post_payrolls_payroll_uuid_reports_general_ledger(payroll_uuid="", aggregation=gusto_embedded.PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation.DEFAULT, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `payroll_uuid` | *str* | :heavy_check_mark: | The UUID of the payroll | +| `aggregation` | [models.PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation](../../models/postpayrollspayrolluuidreportsgeneralledgeraggregation.md) | :heavy_check_mark: | The breakdown of the report. Use 'default' for no split. | +| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `integration_type` | [OptionalNullable[models.PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType]](../../models/postpayrollspayrolluuidreportsgeneralledgerintegrationtype.md) | :heavy_minus_sign: | The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GeneralLedgerReport](../../models/generalledgerreport.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_reports_request_uuid Get a company's report given the `request_uuid`. The response will include the report request's status and, if complete, the report URL. +Reports containing PHI are inaccessible with `company_reports:read:tier_2_only` data scope + scope: `company_reports:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -92,7 +143,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.reports.get(report_uuid="") + res = gusto.reports.get_reports_request_uuid(request_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -103,7 +154,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `report_uuid` | *str* | :heavy_check_mark: | The UUID of the report request | +| `request_uuid` | *str* | :heavy_check_mark: | The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint. | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -125,7 +176,9 @@ scope: `company_reports:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -134,7 +187,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.reports.get_template(company_uuid="", report_type="") + res = gusto.reports.get_template(company_uuid="", report_type="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/salaryestimates/README.md b/gusto_embedded/docs/sdks/salaryestimates/README.md new file mode 100644 index 00000000..e26cfcf0 --- /dev/null +++ b/gusto_embedded/docs/sdks/salaryestimates/README.md @@ -0,0 +1,274 @@ +# SalaryEstimates +(*salary_estimates*) + +## Overview + +### Available Operations + +* [post_v1_employees_employee_id_salary_estimates](#post_v1_employees_employee_id_salary_estimates) - Create a salary estimate for an employee +* [get_v1_salary_estimates_id](#get_v1_salary_estimates_id) - Get a salary estimate +* [put_v1_salary_estimates_id](#put_v1_salary_estimates_id) - Update a salary estimate +* [post_v1_salary_estimates_uuid_accept](#post_v1_salary_estimates_uuid_accept) - Accept a salary estimate +* [get_v1_salary_estimates_occupations](#get_v1_salary_estimates_occupations) - Search for BLS occupations + +## post_v1_employees_employee_id_salary_estimates + +Create a salary estimate for an employee. This endpoint helps calculate a reasonable salary for S Corp owners based on their occupation, experience level, location, and business revenue. + +A salary estimate must include: +- Annual net revenue of the business +- ZIP code for location-based salary data +- One or more occupations with experience levels and time percentages (must sum to 100%) + +Only one in-progress salary estimate can exist per employee at a time. If an in-progress estimate already exists, you must either accept it or use the update endpoint. + +scope: `salary_estimates:write` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.salary_estimates.post_v1_employees_employee_id_salary_estimates(employee_id="", zip_code="94107", occupations=[], x_gusto_api_version=gusto_embedded.PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, annual_net_revenue=500000) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee_id` | *str* | :heavy_check_mark: | The UUID of the employee | | +| `zip_code` | *str* | :heavy_check_mark: | The ZIP code for location-based salary calculations | 94107 | +| `occupations` | List[[models.PostV1EmployeesEmployeeIDSalaryEstimatesOccupations](../../models/postv1employeesemployeeidsalaryestimatesoccupations.md)] | :heavy_check_mark: | Array of occupations. Time percentages must sum to 100%. | | +| `x_gusto_api_version` | [Optional[models.PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion]](../../models/postv1employeesemployeeidsalaryestimatesheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `annual_net_revenue` | *OptionalNullable[float]* | :heavy_minus_sign: | The annual net revenue of the business (must be greater than 0) | 500000 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.SalaryEstimate](../../models/salaryestimate.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_v1_salary_estimates_id + +Retrieve a salary estimate by its UUID. Returns the estimated salary calculation along with all occupation details, revenue, and location information. + +scope: `salary_estimates:read` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.salary_estimates.get_v1_salary_estimates_id(uuid="3c9d1f7e-adda-44fb-ba0e-7e5843661514", x_gusto_api_version=gusto_embedded.GetV1SalaryEstimatesIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the salary estimate | +| `x_gusto_api_version` | [Optional[models.GetV1SalaryEstimatesIDHeaderXGustoAPIVersion]](../../models/getv1salaryestimatesidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.SalaryEstimate](../../models/salaryestimate.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## put_v1_salary_estimates_id + +Update an existing salary estimate. You can modify the annual net revenue, ZIP code, and occupations. + +The salary estimate must not be finalized (accepted). Once accepted, salary estimates become read-only for record-keeping purposes. + +scope: `salary_estimates:write` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.salary_estimates.put_v1_salary_estimates_id(uuid="969f5dac-57dd-4091-b195-2546171d3a76", zip_code="94107", occupations=[ + { + "code": "151252", + "experience_level": gusto_embedded.PutV1SalaryEstimatesIDExperienceLevel.EXPERT, + "time_percentage": "0.6", + "primary": True, + }, + ], x_gusto_api_version=gusto_embedded.PutV1SalaryEstimatesIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, annual_net_revenue=600000) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the salary estimate | | +| `zip_code` | *str* | :heavy_check_mark: | The ZIP code for location-based salary calculations | 94107 | +| `occupations` | List[[models.PutV1SalaryEstimatesIDOccupations](../../models/putv1salaryestimatesidoccupations.md)] | :heavy_check_mark: | Array of occupations. Time percentages must sum to 100%. | | +| `x_gusto_api_version` | [Optional[models.PutV1SalaryEstimatesIDHeaderXGustoAPIVersion]](../../models/putv1salaryestimatesidheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `annual_net_revenue` | *OptionalNullable[float]* | :heavy_minus_sign: | The annual net revenue of the business (must be greater than 0) | 600000 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.SalaryEstimate](../../models/salaryestimate.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## post_v1_salary_estimates_uuid_accept + +Accept and finalize a salary estimate. This associates the estimate with an employee job and marks it as accepted. + +Once accepted, the salary estimate becomes read-only for record-keeping purposes. The accepted salary can then be used to set up compensation for the employee. + +scope: `salary_estimates:write` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto( + company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), +) as gusto: + + res = gusto.salary_estimates.post_v1_salary_estimates_uuid_accept(uuid="22c00075-fa4c-4bdc-91e3-f72ab8ec7a1d", employee_job_uuid="7f5d3d93-6d6f-48c0-9f4e-cd12c2d3e4b2", x_gusto_api_version=gusto_embedded.PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *str* | :heavy_check_mark: | The UUID of the salary estimate | | +| `employee_job_uuid` | *str* | :heavy_check_mark: | The UUID of the employee job to associate with this salary estimate | 7f5d3d93-6d6f-48c0-9f4e-cd12c2d3e4b2 | +| `x_gusto_api_version` | [Optional[models.PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion]](../../models/postv1salaryestimatesuuidacceptheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.SalaryEstimate](../../models/salaryestimate.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404, 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_v1_salary_estimates_occupations + +Search for Bureau of Labor Statistics (BLS) occupations by name or keyword. This endpoint helps users find the appropriate occupation codes to use when creating or updating salary estimates. + +Returns a list of matching occupations with their codes, titles, and descriptions. + +U0001F4D8 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: `salary_estimates:read` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto() as gusto: + + res = gusto.salary_estimates.get_v1_salary_estimates_occupations(security=gusto_embedded.GetV1SalaryEstimatesOccupationsSecurity( + system_access_auth=os.getenv("GUSTO_SYSTEM_ACCESS_AUTH", ""), + ), search="software", x_gusto_api_version=gusto_embedded.GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [models.GetV1SalaryEstimatesOccupationsSecurity](../../models/getv1salaryestimatesoccupationssecurity.md) | :heavy_check_mark: | N/A | | +| `search` | *str* | :heavy_check_mark: | Search term for occupation (minimum 3 characters) | software | +| `x_gusto_api_version` | [Optional[models.GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion]](../../models/getv1salaryestimatesoccupationsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[List[models.BLSOccupation]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/signatories/README.md b/gusto_embedded/docs/sdks/signatories/README.md index 532ed889..266228a7 100644 --- a/gusto_embedded/docs/sdks/signatories/README.md +++ b/gusto_embedded/docs/sdks/signatories/README.md @@ -21,7 +21,9 @@ scope: `signatories:manage` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -30,12 +32,12 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.signatories.create(company_uuid="", ssn="", first_name="Jed", last_name="Johnson", email="Annie.Wiegand16@gmail.com", title="", phone="857-932-0220 x31016", birthday="", home_address={ + res = gusto.signatories.create(company_uuid="", ssn="", first_name="Ed", last_name="Reichert", email="Shanny62@hotmail.com", title="", phone="1-346-396-8392 x69356", birthday="", home_address={ "street_1": "", - "city": "North Lilly", - "state": "North Carolina", - "zip_code": "05065", - }) + "city": "East Clydefield", + "state": "Kentucky", + "zip_code": "13719-5134", + }, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -65,10 +67,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## list @@ -78,7 +80,9 @@ scope: `signatories:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -87,7 +91,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.signatories.list(company_uuid="") + res = gusto.signatories.list(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -118,7 +122,9 @@ Create a signatory with minimal information. This signatory can be invited to pr ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -127,7 +133,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.signatories.invite(company_uuid="", email="Maureen_Wyman@yahoo.com") + res = gusto.signatories.invite(company_uuid="", email="Kamron.Nikolaus@yahoo.com", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -152,10 +158,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update @@ -165,7 +171,9 @@ scope: `signatories:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -174,7 +182,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.signatories.update(company_uuid="", signatory_uuid="") + res = gusto.signatories.update(company_uuid="", signatory_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -205,10 +213,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## delete @@ -218,7 +226,9 @@ scope: `signatories:manage` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -227,7 +237,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.signatories.delete(company_uuid="", signatory_uuid="") + gusto.signatories.delete(company_uuid="", signatory_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... diff --git a/gusto_embedded/docs/sdks/suspensions/README.md b/gusto_embedded/docs/sdks/suspensions/README.md index b02eae4f..6ae6b0d8 100644 --- a/gusto_embedded/docs/sdks/suspensions/README.md +++ b/gusto_embedded/docs/sdks/suspensions/README.md @@ -10,17 +10,20 @@ ## get -Get existing suspension records for this company. A company may have multiple suspension records if they have suspended their Gusto account more than once. +Get existing suspension records for this company. A company may have multiple suspension records if they have suspended their Gusto account more than once. -> 📘 To check if company is already suspended +>📘 To check if company is already suspended > > To determine if a company is _currently_ suspended, use the `is_suspended` and `company_status` fields in the [Get a company](https://docs.gusto.com/embedded-payroll/reference/get-v1-companies) endpoint. scope: `company_suspensions:read` + ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -29,7 +32,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.suspensions.get(company_uuid="") + res = gusto.companies.suspensions.get(company_uuid="", x_gusto_api_version=gusto_embedded.GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -41,7 +44,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `x_gusto_api_version` | [Optional[models.GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion]](../../models/getcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -50,9 +53,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 404 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## suspend @@ -60,8 +64,10 @@ Use this endpoint to suspend a company. After suspension, company will no longer scope: `company_suspensions:write` + ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -72,7 +78,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.companies.suspensions.suspend(company_uuid="", file_quarterly_forms=True, file_yearly_forms=True, reconcile_tax_method=gusto_embedded.PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod.PAY_TAXES, reason=gusto_embedded.Reason.SWITCHING_PROVIDER, leaving_for=gusto_embedded.LeavingFor.OTHER) + res = gusto.companies.suspensions.suspend(company_uuid="", file_quarterly_forms=True, file_yearly_forms=False, reconcile_tax_method=gusto_embedded.PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod.PAY_TAXES, reason=gusto_embedded.Reason.ACQUIRED, x_gusto_api_version=gusto_embedded.PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -81,17 +87,17 @@ with Gusto( ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company | -| `file_quarterly_forms` | *bool* | :heavy_check_mark: | Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. | -| `file_yearly_forms` | *bool* | :heavy_check_mark: | Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. | -| `reconcile_tax_method` | [models.PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod](../../models/postcompaniescompanyuuidsuspensionsreconciletaxmethod.md) | :heavy_check_mark: | How Gusto will handle taxes already collected. | -| `reason` | [models.Reason](../../models/reason.md) | :heavy_check_mark: | Explanation for why the company is suspending their account.

> 🚧 FEIN or entity type changes require Customer Support
>
> If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time. | -| `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | -| `comments` | *Optional[str]* | :heavy_minus_sign: | User-supplied comments describing why they are suspending their account. | -| `leaving_for` | [Optional[models.LeavingFor]](../../models/leavingfor.md) | :heavy_minus_sign: | Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `company_uuid` | *str* | :heavy_check_mark: | The UUID of the company | +| `file_quarterly_forms` | *bool* | :heavy_check_mark: | Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. | +| `file_yearly_forms` | *bool* | :heavy_check_mark: | Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. | +| `reconcile_tax_method` | [models.PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod](../../models/postcompaniescompanyuuidsuspensionsreconciletaxmethod.md) | :heavy_check_mark: | How Gusto will handle taxes already collected. | +| `reason` | [models.Reason](../../models/reason.md) | :heavy_check_mark: | Explanation for why the company is suspending their account.

> 🚧 FEIN or entity type changes require Customer Support
> If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time.
| +| `x_gusto_api_version` | [Optional[models.PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion]](../../models/postcompaniescompanyuuidsuspensionsheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `comments` | *Optional[str]* | :heavy_minus_sign: | User-supplied comments describing why they are suspending their account. Required if the user is leaving for another provider and selects "other" instead of a defined provider. | +| `leaving_for` | [Optional[models.LeavingFor]](../../models/leavingfor.md) | :heavy_minus_sign: | The competitor the company is switching to. Required if `reason` is `'switching_provider'`.

> 🚧 Switching to Gusto requires Customer Support
> If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case.
| +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -99,7 +105,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| models.CompanySuspensionCreationErrorsError | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/taxrequirements/README.md b/gusto_embedded/docs/sdks/taxrequirements/README.md index f1bd0ab0..b7adbc49 100644 --- a/gusto_embedded/docs/sdks/taxrequirements/README.md +++ b/gusto_embedded/docs/sdks/taxrequirements/README.md @@ -57,7 +57,9 @@ scope: `company_tax_requirements:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -66,7 +68,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.tax_requirements.get(company_uuid="", state="Oklahoma") + res = gusto.tax_requirements.get(company_uuid="", state="South Dakota", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -101,7 +103,9 @@ scope: `company_tax_requirements:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -110,7 +114,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - gusto.tax_requirements.update_state(company_uuid="", state="Massachusetts", requirement_sets=[ + gusto.tax_requirements.update_state(company_uuid="", state="Tennessee", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, requirement_sets=[ { "key": "registrations", "effective_from": None, @@ -166,10 +170,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_all @@ -179,7 +183,9 @@ scope: `company_tax_requirements:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -188,7 +194,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.tax_requirements.get_all(company_uuid="") + res = gusto.tax_requirements.get_all(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/docs/sdks/timeoffpolicies/README.md b/gusto_embedded/docs/sdks/timeoffpolicies/README.md index 63ddff4e..3af53faa 100644 --- a/gusto_embedded/docs/sdks/timeoffpolicies/README.md +++ b/gusto_embedded/docs/sdks/timeoffpolicies/README.md @@ -31,7 +31,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -40,7 +42,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.time_off_policies.calculate_accruing_time_off_hours(payroll_id="", employee_id="", regular_hours_worked=30.25, overtime_hours_worked=10, double_overtime_hours_worked=0, pto_hours_used=5.5, sick_hours_used=0) + res = gusto.time_off_policies.calculate_accruing_time_off_hours(payroll_id="", employee_id="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, regular_hours_worked=30.25, overtime_hours_worked=10, double_overtime_hours_worked=0, pto_hours_used=5.5, sick_hours_used=0) # Handle response print(res) @@ -67,10 +69,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get @@ -80,7 +82,9 @@ scope: `time_off_policies:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -89,7 +93,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.time_off_policies.get(time_off_policy_uuid="") + res = gusto.time_off_policies.get(time_off_policy_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -122,6 +126,7 @@ scope: `time_off_policies:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -132,7 +137,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.time_off_policies.update(time_off_policy_uuid="", name="Hourly Vacation Policy", accrual_method=gusto_embedded.AccrualMethod.PER_HOUR_PAID, accrual_rate="4.0", accrual_rate_unit="80.0", paid_out_on_termination=True, accrual_waiting_period_days=30, carryover_limit_hours="200.0", max_accrual_hours_per_year="120.0", max_hours="240.0") + res = gusto.time_off_policies.update(time_off_policy_uuid="", version="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, name="Hourly Vacation Policy", accrual_method=gusto_embedded.AccrualMethod.PER_HOUR_PAID, accrual_rate="4.0", accrual_rate_unit="80.0", paid_out_on_termination=True, accrual_waiting_period_days=30, carryover_limit_hours="200.0", max_accrual_hours_per_year="120.0", max_hours="240.0") # Handle response print(res) @@ -144,6 +149,7 @@ with Gusto( | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `time_off_policy_uuid` | *str* | :heavy_check_mark: | The UUID of the company time off policy | +| `version` | *str* | :heavy_check_mark: | The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/api-fundamentals#optimistic-version-control) for information on how to use this field. | | `x_gusto_api_version` | [Optional[models.VersionHeader]](../../models/versionheader.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | | `name` | *Optional[str]* | :heavy_minus_sign: | Name of the time off policy | | `accrual_method` | [Optional[models.AccrualMethod]](../../models/accrualmethod.md) | :heavy_minus_sign: | Accrual method of the time off policy | @@ -162,10 +168,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_all @@ -175,7 +181,9 @@ scope: `time_off_policies:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -184,7 +192,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.time_off_policies.get_all(company_uuid="") + res = gusto.time_off_policies.get_all(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -217,6 +225,7 @@ scope: `time_off_policies:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -227,7 +236,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.time_off_policies.create(company_uuid="", name="Unlimited Vacation Policy", policy_type="vacation", accrual_method=gusto_embedded.PostCompaniesCompanyUUIDTimeOffPoliciesAccrualMethod.UNLIMITED) + res = gusto.time_off_policies.create(company_uuid="", name="Unlimited Vacation Policy", policy_type="vacation", accrual_method=gusto_embedded.PostCompaniesCompanyUUIDTimeOffPoliciesAccrualMethod.UNLIMITED, x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -258,10 +267,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## add_employees @@ -271,7 +280,9 @@ scope: `time_off_policies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -280,7 +291,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.time_off_policies.add_employees(time_off_policy_uuid="") + res = gusto.time_off_policies.add_employees(time_off_policy_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -302,10 +313,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## remove_employees @@ -315,7 +326,9 @@ scope: `time_off_policies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -324,7 +337,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.time_off_policies.remove_employees(time_off_policy_uuid="") + res = gusto.time_off_policies.remove_employees(time_off_policy_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -346,10 +359,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## update_balance @@ -359,7 +372,9 @@ scope: `time_off_policies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -368,7 +383,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.time_off_policies.update_balance(time_off_policy_uuid="") + res = gusto.time_off_policies.update_balance(time_off_policy_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -390,10 +405,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## deactivate @@ -403,7 +418,9 @@ scope: `time_off_policies:write` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -412,7 +429,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.time_off_policies.deactivate(time_off_policy_uuid="") + res = gusto.time_off_policies.deactivate(time_off_policy_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -433,7 +450,7 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/webhooks/README.md b/gusto_embedded/docs/sdks/webhooks/README.md index 19d9f84e..4715db1d 100644 --- a/gusto_embedded/docs/sdks/webhooks/README.md +++ b/gusto_embedded/docs/sdks/webhooks/README.md @@ -12,6 +12,7 @@ * [delete_subscription](#delete_subscription) - Delete a webhook subscription * [verify](#verify) - Verify the webhook subscription * [request_verification_token](#request_verification_token) - Request the webhook subscription verification_token +* [get_v1_webhooks_health_check](#get_v1_webhooks_health_check) - Get the webhooks health status ## create_subscription @@ -25,6 +26,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -38,7 +40,7 @@ with Gusto() as gusto: ), url="https://partner-app.com/subscriber", subscription_types=[ gusto_embedded.PostV1WebhookSubscriptionSubscriptionTypes.COMPANY, gusto_embedded.PostV1WebhookSubscriptionSubscriptionTypes.EMPLOYEE, - ]) + ], x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -61,10 +63,10 @@ with Gusto() as gusto: ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## list_subscriptions @@ -78,6 +80,7 @@ scope: `webhook_subscriptions:read` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -88,7 +91,7 @@ with Gusto() as gusto: res = gusto.webhooks.list_subscriptions(security=gusto_embedded.GetV1WebhookSubscriptionsSecurity( system_access_auth=os.getenv("GUSTO_SYSTEM_ACCESS_AUTH", ""), - )) + ), x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -126,6 +129,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -139,7 +143,7 @@ with Gusto() as gusto: ), webhook_subscription_uuid="", subscription_types=[ gusto_embedded.PutV1WebhookSubscriptionUUIDSubscriptionTypes.COMPANY, gusto_embedded.PutV1WebhookSubscriptionUUIDSubscriptionTypes.EMPLOYEE, - ]) + ], x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -162,10 +166,10 @@ with Gusto() as gusto: ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## get_subscription @@ -180,6 +184,7 @@ scope: `webhook_subscriptions:read` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -190,7 +195,7 @@ with Gusto() as gusto: res = gusto.webhooks.get_subscription(security=gusto_embedded.GetV1WebhookSubscriptionUUIDSecurity( system_access_auth=os.getenv("GUSTO_SYSTEM_ACCESS_AUTH", ""), - ), webhook_subscription_uuid="") + ), webhook_subscription_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -229,6 +234,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -239,7 +245,7 @@ with Gusto() as gusto: gusto.webhooks.delete_subscription(security=gusto_embedded.DeleteV1WebhookSubscriptionUUIDSecurity( system_access_auth=os.getenv("GUSTO_SYSTEM_ACCESS_AUTH", ""), - ), webhook_subscription_uuid="") + ), webhook_subscription_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -275,6 +281,7 @@ scope: `webhook_subscriptions:write` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -285,7 +292,7 @@ with Gusto() as gusto: res = gusto.webhooks.verify(security=gusto_embedded.PutV1VerifyWebhookSubscriptionUUIDSecurity( system_access_auth=os.getenv("GUSTO_SYSTEM_ACCESS_AUTH", ""), - ), webhook_subscription_uuid="", verification_token="asefasedfe23e234easd") + ), webhook_subscription_uuid="", verification_token="asefasedfe23e234easd", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -308,10 +315,10 @@ with Gusto() as gusto: ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## request_verification_token @@ -326,6 +333,7 @@ scope: `webhook_subscriptions:read` ### Example Usage + ```python import gusto_embedded from gusto_embedded import Gusto @@ -336,7 +344,7 @@ with Gusto() as gusto: gusto.webhooks.request_verification_token(security=gusto_embedded.GetV1WebhookSubscriptionVerificationTokenUUIDSecurity( system_access_auth=os.getenv("GUSTO_SYSTEM_ACCESS_AUTH", ""), - ), webhook_subscription_uuid="") + ), webhook_subscription_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Use the SDK ... @@ -353,6 +361,51 @@ with Gusto() as gusto: ### Errors +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| models.APIError | 4XX, 5XX | \*/\* | + +## get_v1_webhooks_health_check + +Returns the health status (`healthy`, `unhealthy`, or `unknown`) of the webhooks system based on the last ten minutes of activity. + +scope: `webhook_subscriptions:read` + + +### Example Usage + + +```python +import gusto_embedded +from gusto_embedded import Gusto +import os + + +with Gusto() as gusto: + + res = gusto.webhooks.get_v1_webhooks_health_check(security=gusto_embedded.GetV1WebhooksHealthCheckSecurity( + system_access_auth=os.getenv("GUSTO_SYSTEM_ACCESS_AUTH", ""), + ), x_gusto_api_version=gusto_embedded.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `security` | [models.GetV1WebhooksHealthCheckSecurity](../../models/getv1webhookshealthchecksecurity.md) | :heavy_check_mark: | N/A | +| `x_gusto_api_version` | [Optional[models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion]](../../models/getv1webhookshealthcheckheaderxgustoapiversion.md) | :heavy_minus_sign: | Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WebhooksHealthCheckStatus](../../models/webhookshealthcheckstatus.md)** + +### Errors + | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gusto_embedded/docs/sdks/wireinrequests/README.md b/gusto_embedded/docs/sdks/wireinrequests/README.md index c6d1a5f1..a4a6cfc0 100644 --- a/gusto_embedded/docs/sdks/wireinrequests/README.md +++ b/gusto_embedded/docs/sdks/wireinrequests/README.md @@ -17,7 +17,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -26,7 +28,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.wire_in_requests.get(wire_in_request_uuid="") + res = gusto.wire_in_requests.get(wire_in_request_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) @@ -59,7 +61,9 @@ scope: `payrolls:run` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -68,7 +72,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.wire_in_requests.submit(wire_in_request_uuid="", date_sent="2024-06-10T00:00:00Z", bank_name="Chase", amount_sent="314500", additional_notes="Wire for 2024-06-15 payroll.") + res = gusto.wire_in_requests.submit(wire_in_request_uuid="", date_sent="2024-06-10T00:00:00Z", bank_name="Chase", amount_sent="314500", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, additional_notes="Wire for 2024-06-15 payroll.") # Handle response print(res) @@ -93,10 +97,10 @@ with Gusto( ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| models.UnprocessableEntityErrorObjectError | 422 | application/json | -| models.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| models.UnprocessableEntityErrorObject | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | ## list @@ -106,7 +110,9 @@ scope: `payrolls:read` ### Example Usage + ```python +import gusto_embedded from gusto_embedded import Gusto import os @@ -115,7 +121,7 @@ with Gusto( company_access_auth=os.getenv("GUSTO_COMPANY_ACCESS_AUTH", ""), ) as gusto: - res = gusto.wire_in_requests.list(company_uuid="") + res = gusto.wire_in_requests.list(company_uuid="", x_gusto_api_version=gusto_embedded.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01) # Handle response print(res) diff --git a/gusto_embedded/poetry.lock b/gusto_embedded/poetry.lock index 0db38f95..1454332b 100644 --- a/gusto_embedded/poetry.lock +++ b/gusto_embedded/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -109,31 +109,31 @@ test = ["pytest (>=6)"] [[package]] name = "h11" -version = "0.14.0" +version = "0.16.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, ] [[package]] name = "httpcore" -version = "1.0.7" +version = "1.0.9" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, - {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, ] [package.dependencies] certifi = "*" -h11 = ">=0.13,<0.15" +h11 = ">=0.16" [package.extras] asyncio = ["anyio (>=4.0,<5.0)"] @@ -553,4 +553,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.1" python-versions = ">=3.9.2" -content-hash = "e8a1f9e6b4c81b04603e502642fd940846ce892668f7cbd96fa85f9ad8d353fc" +content-hash = "fd5d2a9148a00cbc5258586b48c24f763e191bdc12367f4e92abdbfc15e30679" diff --git a/gusto_embedded/poetry.toml b/gusto_embedded/poetry.toml index ab1033bd..cd3492ac 100644 --- a/gusto_embedded/poetry.toml +++ b/gusto_embedded/poetry.toml @@ -1,2 +1,3 @@ + [virtualenvs] in-project = true diff --git a/gusto_embedded/pyproject.toml b/gusto_embedded/pyproject.toml index 1301315c..796bf53a 100644 --- a/gusto_embedded/pyproject.toml +++ b/gusto_embedded/pyproject.toml @@ -1,11 +1,13 @@ + [project] name = "gusto_embedded" -version = "0.3.0" +version = "0.4.0" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" requires-python = ">=3.9.2" dependencies = [ + "httpcore >=1.0.9", "httpx >=0.28.1", "pydantic >=2.11.2", ] @@ -37,6 +39,8 @@ pythonpath = ["src"] [tool.mypy] disable_error_code = "misc" +explicit_package_bases = true +mypy_path = "src" [[tool.mypy.overrides]] module = "typing_inspect" diff --git a/gusto_embedded/scripts/prepare_readme.py b/gusto_embedded/scripts/prepare_readme.py index caba51d6..6d2b67a2 100644 --- a/gusto_embedded/scripts/prepare_readme.py +++ b/gusto_embedded/scripts/prepare_readme.py @@ -10,12 +10,17 @@ GITHUB_URL = ( GITHUB_URL[: -len(".git")] if GITHUB_URL.endswith(".git") else GITHUB_URL ) + REPO_SUBDIR = "gusto_embedded" + # Ensure the subdirectory has a trailing slash + if not REPO_SUBDIR.endswith("/"): + REPO_SUBDIR += "/" # links on PyPI should have absolute URLs readme_contents = re.sub( r"(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))", lambda m: m.group(1) + GITHUB_URL + "/blob/master/" + + REPO_SUBDIR + m.group(2) + m.group(3), readme_contents, diff --git a/gusto_embedded/scripts/publish.sh b/gusto_embedded/scripts/publish.sh index f2f2cf2c..2a3ead70 100755 --- a/gusto_embedded/scripts/publish.sh +++ b/gusto_embedded/scripts/publish.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash - export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN} poetry run python scripts/prepare_readme.py diff --git a/gusto_embedded/src/gusto_embedded/_hooks/types.py b/gusto_embedded/src/gusto_embedded/_hooks/types.py index 15113496..5683980c 100644 --- a/gusto_embedded/src/gusto_embedded/_hooks/types.py +++ b/gusto_embedded/src/gusto_embedded/_hooks/types.py @@ -2,11 +2,13 @@ from abc import ABC, abstractmethod from gusto_embedded.httpclient import HttpClient +from gusto_embedded.sdkconfiguration import SDKConfiguration import httpx from typing import Any, Callable, List, Optional, Tuple, Union class HookContext: + config: SDKConfiguration base_url: str operation_id: str oauth2_scopes: Optional[List[str]] = None @@ -14,11 +16,13 @@ class HookContext: def __init__( self, + config: SDKConfiguration, base_url: str, operation_id: str, oauth2_scopes: Optional[List[str]], security_source: Optional[Union[Any, Callable[[], Any]]], ): + self.config = config self.base_url = base_url self.operation_id = operation_id self.oauth2_scopes = oauth2_scopes @@ -28,6 +32,7 @@ def __init__( class BeforeRequestContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( + hook_ctx.config, hook_ctx.base_url, hook_ctx.operation_id, hook_ctx.oauth2_scopes, @@ -38,6 +43,7 @@ def __init__(self, hook_ctx: HookContext): class AfterSuccessContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( + hook_ctx.config, hook_ctx.base_url, hook_ctx.operation_id, hook_ctx.oauth2_scopes, @@ -48,6 +54,7 @@ def __init__(self, hook_ctx: HookContext): class AfterErrorContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( + hook_ctx.config, hook_ctx.base_url, hook_ctx.operation_id, hook_ctx.oauth2_scopes, diff --git a/gusto_embedded/src/gusto_embedded/_version.py b/gusto_embedded/src/gusto_embedded/_version.py index 47ec460e..49f18524 100644 --- a/gusto_embedded/src/gusto_embedded/_version.py +++ b/gusto_embedded/src/gusto_embedded/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "gusto_embedded" -__version__: str = "0.3.0" +__version__: str = "0.4.0" __openapi_doc_version__: str = "2024-04-01" -__gen_version__: str = "2.599.0" -__user_agent__: str = "speakeasy-sdk/python 0.3.0 2.599.0 2024-04-01 gusto_embedded" +__gen_version__: str = "2.730.5" +__user_agent__: str = "speakeasy-sdk/python 0.4.0 2.730.5 2024-04-01 gusto_embedded" try: if __package__ is not None: diff --git a/gusto_embedded/src/gusto_embedded/achtransactions.py b/gusto_embedded/src/gusto_embedded/achtransactions.py index e932f8e2..6c975fe4 100644 --- a/gusto_embedded/src/gusto_embedded/achtransactions.py +++ b/gusto_embedded/src/gusto_embedded/achtransactions.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import List, Mapping, Optional @@ -93,9 +94,10 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-ach-transactions", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -106,26 +108,15 @@ def get_all( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.AchTransaction]) + return unmarshal_json_response(List[models.AchTransaction], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def get_all_async( self, @@ -211,9 +202,10 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-ach-transactions", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -224,23 +216,12 @@ async def get_all_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.AchTransaction]) + return unmarshal_json_response(List[models.AchTransaction], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/bankaccounts.py b/gusto_embedded/src/gusto_embedded/bankaccounts.py index 85494388..be69ef8e 100644 --- a/gusto_embedded/src/gusto_embedded/bankaccounts.py +++ b/gusto_embedded/src/gusto_embedded/bankaccounts.py @@ -5,47 +5,32 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional class BankAccounts(BaseSDK): - def create( + def get( self, *, company_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - routing_number: Optional[str] = None, - account_number: Optional[str] = None, - account_type: Optional[ - models.PostV1CompaniesCompanyIDBankAccountsAccountType - ] = None, + models.GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.CompanyBankAccount: - r"""Create a company bank account - - This endpoint creates a new company bank account. - - Upon being created, two verification deposits are automatically sent to the bank account, and the bank account's verification_status is 'awaiting_deposits'. + ) -> List[models.CompanyBankAccount]: + r"""Get all company bank accounts - When the deposits are successfully transferred, the verification_status changes to 'ready_for_verification', at which point the verify endpoint can be used to verify the bank account. - After successful verification, the bank account's verification_status is 'verified'. + Returns company bank accounts. Currently, we only support a single default bank account per company. - scope: `company_bank_accounts:write` + scope: `company_bank_accounts:read` - > 🚧 Warning - > - > If a default bank account exists, it will be disabled and the new bank account will replace it as the company's default funding method. :param company_id: The UUID of the company :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param routing_number: The bank routing number - :param account_number: The bank account number - :param account_type: The bank account type :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -61,36 +46,24 @@ def create( else: base_url = self._get_url(base_url, url_variables) - request = models.PostV1CompaniesCompanyIDBankAccountsRequest( + request = models.GetV1CompaniesCompanyIDBankAccountsRequest( company_id=company_id, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1CompaniesCompanyIDBankAccountsRequestBody( - routing_number=routing_number, - account_number=account_number, - account_type=account_type, - ), ) req = self._build_request( - method="POST", + method="GET", path="/v1/companies/{company_id}/bank_accounts", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PostV1CompaniesCompanyIDBankAccountsRequestBody, - ), timeout_ms=timeout_ms, ) @@ -104,83 +77,57 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-v1-companies-company_id-bank-accounts", - oauth2_scopes=[], + operation_id="get-v1-companies-company_id-bank-accounts", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBankAccount) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.CompanyBankAccount], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def create_async( + async def get_async( self, *, company_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - routing_number: Optional[str] = None, - account_number: Optional[str] = None, - account_type: Optional[ - models.PostV1CompaniesCompanyIDBankAccountsAccountType - ] = None, + models.GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.CompanyBankAccount: - r"""Create a company bank account - - This endpoint creates a new company bank account. - - Upon being created, two verification deposits are automatically sent to the bank account, and the bank account's verification_status is 'awaiting_deposits'. + ) -> List[models.CompanyBankAccount]: + r"""Get all company bank accounts - When the deposits are successfully transferred, the verification_status changes to 'ready_for_verification', at which point the verify endpoint can be used to verify the bank account. - After successful verification, the bank account's verification_status is 'verified'. + Returns company bank accounts. Currently, we only support a single default bank account per company. - scope: `company_bank_accounts:write` + scope: `company_bank_accounts:read` - > 🚧 Warning - > - > If a default bank account exists, it will be disabled and the new bank account will replace it as the company's default funding method. :param company_id: The UUID of the company :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param routing_number: The bank routing number - :param account_number: The bank account number - :param account_type: The bank account type :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -196,36 +143,24 @@ async def create_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PostV1CompaniesCompanyIDBankAccountsRequest( + request = models.GetV1CompaniesCompanyIDBankAccountsRequest( company_id=company_id, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1CompaniesCompanyIDBankAccountsRequestBody( - routing_number=routing_number, - account_number=account_number, - account_type=account_type, - ), ) req = self._build_request_async( - method="POST", + method="GET", path="/v1/companies/{company_id}/bank_accounts", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PostV1CompaniesCompanyIDBankAccountsRequestBody, - ), timeout_ms=timeout_ms, ) @@ -239,65 +174,71 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-v1-companies-company_id-bank-accounts", - oauth2_scopes=[], + operation_id="get-v1-companies-company_id-bank-accounts", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBankAccount) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.CompanyBankAccount], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def get( + def create( self, *, company_id: str, + routing_number: str, + account_number: str, + account_type: models.CompanyBankAccountRequestAccountType, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion + ] = models.PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.CompanyBankAccount]: - r"""Get all company bank accounts + ) -> models.CompanyBankAccount: + r"""Create a company bank account - Returns company bank accounts. Currently, we only support a single default bank account per company. + This endpoint creates a new company bank account. + + Upon being created, two verification deposits are automatically sent to the bank account, and the bank account's verification_status is 'awaiting_deposits'. + + When the deposits are successfully transferred, the verification_status changes to 'ready_for_verification', at which point the verify endpoint can be used to verify the bank account. + After successful verification, the bank account's verification_status is 'verified'. + + scope: `company_bank_accounts:write` + + >🚧 Warning + > + > If a default bank account exists, it will be disabled and the new bank account will replace it as the company's default funding method. - scope: `company_bank_accounts:read` :param company_id: The UUID of the company + :param routing_number: The bank routing number + :param account_number: The bank account number + :param account_type: The bank account type :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -314,24 +255,36 @@ def get( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesCompanyIDBankAccountsRequest( + request = models.PostV1CompaniesCompanyIDBankAccountsRequest( company_id=company_id, x_gusto_api_version=x_gusto_api_version, + company_bank_account_request=models.CompanyBankAccountRequest( + routing_number=routing_number, + account_number=account_number, + account_type=account_type, + ), ) req = self._build_request( - method="GET", + method="POST", path="/v1/companies/{company_id}/bank_accounts", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.company_bank_account_request, + False, + False, + "json", + models.CompanyBankAccountRequest, + ), timeout_ms=timeout_ms, ) @@ -345,59 +298,71 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-company_id-bank-accounts", - oauth2_scopes=[], + operation_id="post-v1-companies-company_id-bank-accounts", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.CompanyBankAccount]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.CompanyBankAccount, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def get_async( + async def create_async( self, *, company_id: str, + routing_number: str, + account_number: str, + account_type: models.CompanyBankAccountRequestAccountType, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion + ] = models.PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.CompanyBankAccount]: - r"""Get all company bank accounts + ) -> models.CompanyBankAccount: + r"""Create a company bank account - Returns company bank accounts. Currently, we only support a single default bank account per company. + This endpoint creates a new company bank account. + + Upon being created, two verification deposits are automatically sent to the bank account, and the bank account's verification_status is 'awaiting_deposits'. + + When the deposits are successfully transferred, the verification_status changes to 'ready_for_verification', at which point the verify endpoint can be used to verify the bank account. + After successful verification, the bank account's verification_status is 'verified'. + + scope: `company_bank_accounts:write` + + >🚧 Warning + > + > If a default bank account exists, it will be disabled and the new bank account will replace it as the company's default funding method. - scope: `company_bank_accounts:read` :param company_id: The UUID of the company + :param routing_number: The bank routing number + :param account_number: The bank account number + :param account_type: The bank account type :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -414,24 +379,36 @@ async def get_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesCompanyIDBankAccountsRequest( + request = models.PostV1CompaniesCompanyIDBankAccountsRequest( company_id=company_id, x_gusto_api_version=x_gusto_api_version, + company_bank_account_request=models.CompanyBankAccountRequest( + routing_number=routing_number, + account_number=account_number, + account_type=account_type, + ), ) req = self._build_request_async( - method="GET", + method="POST", path="/v1/companies/{company_id}/bank_accounts", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.company_bank_account_request, + False, + False, + "json", + models.CompanyBankAccountRequest, + ), timeout_ms=timeout_ms, ) @@ -445,39 +422,35 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-company_id-bank-accounts", - oauth2_scopes=[], + operation_id="post-v1-companies-company_id-bank-accounts", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.CompanyBankAccount]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.CompanyBankAccount, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def verify( self, @@ -576,9 +549,10 @@ def verify( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-bank-accounts-verify", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -590,31 +564,20 @@ def verify( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBankAccount) + return unmarshal_json_response(models.CompanyBankAccount, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def verify_async( self, @@ -713,9 +676,10 @@ async def verify_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-bank-accounts-verify", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -727,31 +691,20 @@ async def verify_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBankAccount) + return unmarshal_json_response(models.CompanyBankAccount, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create_from_plaid_token( self, @@ -841,9 +794,10 @@ def create_from_plaid_token( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-plaid-processor_token", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -855,33 +809,22 @@ def create_from_plaid_token( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, models.PostV1PlaidProcessorTokenResponseBody + return unmarshal_json_response( + models.PostV1PlaidProcessorTokenResponseBody, http_res ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_from_plaid_token_async( self, @@ -971,9 +914,10 @@ async def create_from_plaid_token_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-plaid-processor_token", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -985,30 +929,223 @@ async def create_from_plaid_token_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, models.PostV1PlaidProcessorTokenResponseBody + return unmarshal_json_response( + models.PostV1PlaidProcessorTokenResponseBody, http_res ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def delete_v1_companies_company_id_bank_accounts_bank_account_id( + self, + *, + company_id: str, + bank_account_id: str, + x_gusto_api_version: Optional[ + models.DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion + ] = models.DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a company bank account + + This endpoint disables a company bank account. + + A bank account cannot be disabled if it is used for any unprocessed payments. + + scope: `company_bank_accounts:write` + + + :param company_id: The UUID of the company + :param bank_account_id: The UUID of the company bank account + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDRequest( + company_id=company_id, + bank_account_id=bank_account_id, + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request( + method="DELETE", + path="/v1/companies/{company_id}/bank_accounts/{bank_account_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete-v1-companies-company_id-bank-accounts-bank_account_id", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def delete_v1_companies_company_id_bank_accounts_bank_account_id_async( + self, + *, + company_id: str, + bank_account_id: str, + x_gusto_api_version: Optional[ + models.DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion + ] = models.DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a company bank account + + This endpoint disables a company bank account. + + A bank account cannot be disabled if it is used for any unprocessed payments. + + scope: `company_bank_accounts:write` + + + :param company_id: The UUID of the company + :param bank_account_id: The UUID of the company bank account + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, + request = models.DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDRequest( + company_id=company_id, + bank_account_id=bank_account_id, + x_gusto_api_version=x_gusto_api_version, ) + + req = self._build_request_async( + method="DELETE", + path="/v1/companies/{company_id}/bank_accounts/{bank_account_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete-v1-companies-company_id-bank-accounts-bank_account_id", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/basesdk.py b/gusto_embedded/src/gusto_embedded/basesdk.py index d300bbdb..47761d00 100644 --- a/gusto_embedded/src/gusto_embedded/basesdk.py +++ b/gusto_embedded/src/gusto_embedded/basesdk.py @@ -15,9 +15,19 @@ class BaseSDK: sdk_configuration: SDKConfiguration + parent_ref: Optional[object] = None + """ + Reference to the root SDK instance, if any. This will prevent it from + being garbage collected while there are active streams. + """ - def __init__(self, sdk_config: SDKConfiguration) -> None: + def __init__( + self, + sdk_config: SDKConfiguration, + parent_ref: Optional[object] = None, + ) -> None: self.sdk_configuration = sdk_config + self.parent_ref = parent_ref def _get_url(self, base_url, url_variables): sdk_url, sdk_variables = self.sdk_configuration.get_server_details() @@ -218,12 +228,12 @@ def do_request( client = self.sdk_configuration.client logger = self.sdk_configuration.debug_logger + hooks = self.sdk_configuration.__dict__["_hooks"] + def do(): http_res = None try: - req = self.sdk_configuration.get_hooks().before_request( - BeforeRequestContext(hook_ctx), request - ) + req = hooks.before_request(BeforeRequestContext(hook_ctx), request) logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -237,16 +247,14 @@ def do(): http_res = client.send(req, stream=stream) except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error( - AfterErrorContext(hook_ctx), None, e - ) + _, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e) if e is not None: logger.debug("Request Exception", exc_info=True) raise e if http_res is None: logger.debug("Raising no response SDK error") - raise models.APIError("No response received") + raise models.NoResponseError("No response received") logger.debug( "Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s", @@ -257,7 +265,7 @@ def do(): ) if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = self.sdk_configuration.get_hooks().after_error( + result, err = hooks.after_error( AfterErrorContext(hook_ctx), http_res, None ) if err is not None: @@ -267,7 +275,7 @@ def do(): http_res = result else: logger.debug("Raising unexpected SDK error") - raise models.APIError("Unexpected error occurred") + raise models.APIError("Unexpected error occurred", http_res) return http_res @@ -277,9 +285,7 @@ def do(): http_res = do() if not utils.match_status_codes(error_status_codes, http_res.status_code): - http_res = self.sdk_configuration.get_hooks().after_success( - AfterSuccessContext(hook_ctx), http_res - ) + http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) return http_res @@ -294,12 +300,12 @@ async def do_request_async( client = self.sdk_configuration.async_client logger = self.sdk_configuration.debug_logger + hooks = self.sdk_configuration.__dict__["_hooks"] + async def do(): http_res = None try: - req = self.sdk_configuration.get_hooks().before_request( - BeforeRequestContext(hook_ctx), request - ) + req = hooks.before_request(BeforeRequestContext(hook_ctx), request) logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -313,16 +319,14 @@ async def do(): http_res = await client.send(req, stream=stream) except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error( - AfterErrorContext(hook_ctx), None, e - ) + _, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e) if e is not None: logger.debug("Request Exception", exc_info=True) raise e if http_res is None: logger.debug("Raising no response SDK error") - raise models.APIError("No response received") + raise models.NoResponseError("No response received") logger.debug( "Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s", @@ -333,7 +337,7 @@ async def do(): ) if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = self.sdk_configuration.get_hooks().after_error( + result, err = hooks.after_error( AfterErrorContext(hook_ctx), http_res, None ) if err is not None: @@ -343,7 +347,7 @@ async def do(): http_res = result else: logger.debug("Raising unexpected SDK error") - raise models.APIError("Unexpected error occurred") + raise models.APIError("Unexpected error occurred", http_res) return http_res @@ -355,8 +359,6 @@ async def do(): http_res = await do() if not utils.match_status_codes(error_status_codes, http_res.status_code): - http_res = self.sdk_configuration.get_hooks().after_success( - AfterSuccessContext(hook_ctx), http_res - ) + http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) return http_res diff --git a/gusto_embedded/src/gusto_embedded/companies.py b/gusto_embedded/src/gusto_embedded/companies.py index 2464831f..f585e632 100644 --- a/gusto_embedded/src/gusto_embedded/companies.py +++ b/gusto_embedded/src/gusto_embedded/companies.py @@ -7,19 +7,24 @@ from gusto_embedded.suspensions import Suspensions from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union class Companies(BaseSDK): suspensions: Suspensions - def __init__(self, sdk_config: SDKConfiguration) -> None: - BaseSDK.__init__(self, sdk_config) + def __init__( + self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None + ) -> None: + BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref) self.sdk_configuration = sdk_config self._init_sdks() def _init_sdks(self): - self.suspensions = Suspensions(self.sdk_configuration) + self.suspensions = Suspensions( + self.sdk_configuration, parent_ref=self.parent_ref + ) def create_partner_managed( self, @@ -120,6 +125,7 @@ def create_partner_managed( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-partner-managed-companies", oauth2_scopes=None, @@ -132,33 +138,22 @@ def create_partner_managed( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.PostV1PartnerManagedCompaniesResponseBody + return unmarshal_json_response( + models.PostV1PartnerManagedCompaniesResponseBody, http_res ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["401", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_partner_managed_async( self, @@ -259,6 +254,7 @@ async def create_partner_managed_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-partner-managed-companies", oauth2_scopes=None, @@ -271,33 +267,22 @@ async def create_partner_managed_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.PostV1PartnerManagedCompaniesResponseBody + return unmarshal_json_response( + models.PostV1PartnerManagedCompaniesResponseBody, http_res ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["401", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -368,9 +353,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -381,26 +367,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Company) + return unmarshal_json_response(models.Company, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -471,9 +446,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -484,26 +460,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Company) + return unmarshal_json_response(models.Company, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -583,9 +548,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -597,31 +563,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Company) + return unmarshal_json_response(models.Company, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -701,9 +656,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -715,31 +671,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Company) + return unmarshal_json_response(models.Company, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def migrate( self, @@ -827,9 +772,10 @@ def migrate( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-partner-managed-companies-company-uuid-migrate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -841,34 +787,23 @@ def migrate( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, + return unmarshal_json_response( models.PutV1PartnerManagedCompaniesCompanyUUIDMigrateResponseBody, + http_res, ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def migrate_async( self, @@ -956,9 +891,10 @@ async def migrate_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-partner-managed-companies-company-uuid-migrate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -970,34 +906,23 @@ async def migrate_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, + return unmarshal_json_response( models.PutV1PartnerManagedCompaniesCompanyUUIDMigrateResponseBody, + http_res, ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def accept_terms_of_service( self, @@ -1084,9 +1009,10 @@ def accept_terms_of_service( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-partner-managed-companies-company_uuid-accept_terms_of_service", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1098,34 +1024,23 @@ def accept_terms_of_service( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, + return unmarshal_json_response( models.PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceResponseBody, + http_res, ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def accept_terms_of_service_async( self, @@ -1212,9 +1127,10 @@ async def accept_terms_of_service_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-partner-managed-companies-company_uuid-accept_terms_of_service", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1226,34 +1142,23 @@ async def accept_terms_of_service_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, + return unmarshal_json_response( models.PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceResponseBody, + http_res, ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def retrieve_terms_of_service( self, @@ -1335,9 +1240,10 @@ def retrieve_terms_of_service( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-partner-managed-companies-company_uuid-retrieve_terms_of_service", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1349,34 +1255,23 @@ def retrieve_terms_of_service( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, + return unmarshal_json_response( models.PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceResponseBody, + http_res, ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def retrieve_terms_of_service_async( self, @@ -1458,9 +1353,10 @@ async def retrieve_terms_of_service_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-partner-managed-companies-company_uuid-retrieve_terms_of_service", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1472,34 +1368,23 @@ async def retrieve_terms_of_service_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, + return unmarshal_json_response( models.PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceResponseBody, + http_res, ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create_admin( self, @@ -1586,9 +1471,10 @@ def create_admin( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-admins", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1600,31 +1486,20 @@ def create_admin( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Admin) + return unmarshal_json_response(models.Admin, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_admin_async( self, @@ -1711,9 +1586,10 @@ async def create_admin_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-admins", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1725,31 +1601,20 @@ async def create_admin_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Admin) + return unmarshal_json_response(models.Admin, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list_admins( self, @@ -1823,9 +1688,10 @@ def list_admins( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-admins", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1836,26 +1702,15 @@ def list_admins( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Admin]) + return unmarshal_json_response(List[models.Admin], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_admins_async( self, @@ -1929,9 +1784,10 @@ async def list_admins_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-admins", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1942,26 +1798,15 @@ async def list_admins_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Admin]) + return unmarshal_json_response(List[models.Admin], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_onboarding_status( self, @@ -2033,9 +1878,10 @@ def get_onboarding_status( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-onboarding-status", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2046,26 +1892,15 @@ def get_onboarding_status( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyOnboardingStatus) + return unmarshal_json_response(models.CompanyOnboardingStatus, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_onboarding_status_async( self, @@ -2137,9 +1972,10 @@ async def get_onboarding_status_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-onboarding-status", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2150,26 +1986,15 @@ async def get_onboarding_status_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyOnboardingStatus) + return unmarshal_json_response(models.CompanyOnboardingStatus, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def finish_onboarding( self, @@ -2249,9 +2074,10 @@ def finish_onboarding( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-finish-onboarding", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2263,31 +2089,20 @@ def finish_onboarding( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyOnboardingStatus) + return unmarshal_json_response(models.CompanyOnboardingStatus, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def finish_onboarding_async( self, @@ -2367,9 +2182,10 @@ async def finish_onboarding_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-finish-onboarding", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2381,31 +2197,20 @@ async def finish_onboarding_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyOnboardingStatus) + return unmarshal_json_response(models.CompanyOnboardingStatus, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_custom_fields( self, @@ -2479,9 +2284,10 @@ def get_custom_fields( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-custom_fields", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2492,26 +2298,15 @@ def get_custom_fields( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyCustomFieldList) + return unmarshal_json_response(models.CompanyCustomFieldList, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_custom_fields_async( self, @@ -2585,9 +2380,10 @@ async def get_custom_fields_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-custom_fields", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2598,23 +2394,12 @@ async def get_custom_fields_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyCustomFieldList) + return unmarshal_json_response(models.CompanyCustomFieldList, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/companyattachment_sdk.py b/gusto_embedded/src/gusto_embedded/companyattachment_sdk.py index e3dee3dc..9598dc8b 100644 --- a/gusto_embedded/src/gusto_embedded/companyattachment_sdk.py +++ b/gusto_embedded/src/gusto_embedded/companyattachment_sdk.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional @@ -79,9 +80,10 @@ def get_download_url( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-attachment-url", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -92,28 +94,17 @@ def get_download_url( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.GetV1CompaniesAttachmentURLResponseBody + return unmarshal_json_response( + models.GetV1CompaniesAttachmentURLResponseBody, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_download_url_async( self, @@ -185,9 +176,10 @@ async def get_download_url_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-attachment-url", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -198,25 +190,14 @@ async def get_download_url_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.GetV1CompaniesAttachmentURLResponseBody + return unmarshal_json_response( + models.GetV1CompaniesAttachmentURLResponseBody, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/companyattachments.py b/gusto_embedded/src/gusto_embedded/companyattachments.py index c8aa7b13..5d039a95 100644 --- a/gusto_embedded/src/gusto_embedded/companyattachments.py +++ b/gusto_embedded/src/gusto_embedded/companyattachments.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -78,9 +79,10 @@ def get_details( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-attachment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -91,26 +93,15 @@ def get_details( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyAttachment) + return unmarshal_json_response(models.CompanyAttachment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_details_async( self, @@ -181,9 +172,10 @@ async def get_details_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-attachment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -194,26 +186,15 @@ async def get_details_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyAttachment) + return unmarshal_json_response(models.CompanyAttachment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_list( self, @@ -281,9 +262,10 @@ def get_list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-attachments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -294,26 +276,15 @@ def get_list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.CompanyAttachment]) + return unmarshal_json_response(List[models.CompanyAttachment], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_list_async( self, @@ -381,9 +352,10 @@ async def get_list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-attachments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -394,26 +366,15 @@ async def get_list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.CompanyAttachment]) + return unmarshal_json_response(List[models.CompanyAttachment], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create( self, @@ -503,9 +464,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-attachment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -517,31 +479,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyAttachment) + return unmarshal_json_response(models.CompanyAttachment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -631,9 +582,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-attachment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -645,28 +597,17 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyAttachment) + return unmarshal_json_response(models.CompanyAttachment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/companybenefits.py b/gusto_embedded/src/gusto_embedded/companybenefits.py index 84fef1e0..eb10812f 100644 --- a/gusto_embedded/src/gusto_embedded/companybenefits.py +++ b/gusto_embedded/src/gusto_embedded/companybenefits.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -32,6 +33,8 @@ def create( Note that company benefits can be deactivated only when no employees are enrolled. + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only create company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_id: The UUID of the company @@ -101,9 +104,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-company_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -115,31 +119,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBenefit) + return unmarshal_json_response(models.CompanyBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -164,6 +157,8 @@ async def create_async( Note that company benefits can be deactivated only when no employees are enrolled. + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only create company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_id: The UUID of the company @@ -233,9 +228,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-company_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -247,31 +243,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBenefit) + return unmarshal_json_response(models.CompanyBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list( self, @@ -349,9 +334,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-company_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -362,26 +348,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.CompanyBenefit]) + return unmarshal_json_response(List[models.CompanyBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -459,9 +434,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-company_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -472,26 +448,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.CompanyBenefit]) + return unmarshal_json_response(List[models.CompanyBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -566,9 +531,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -579,28 +545,17 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.CompanyBenefitWithEmployeeBenefits + return unmarshal_json_response( + models.CompanyBenefitWithEmployeeBenefits, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -675,9 +630,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -688,28 +644,17 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.CompanyBenefitWithEmployeeBenefits + return unmarshal_json_response( + models.CompanyBenefitWithEmployeeBenefits, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -732,6 +677,8 @@ def update( Note that company benefits can be deactivated only when no employees are enrolled. + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only update company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -797,9 +744,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -811,31 +759,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBenefit) + return unmarshal_json_response(models.CompanyBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -858,6 +795,8 @@ async def update_async( Note that company benefits can be deactivated only when no employees are enrolled. + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only update company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -923,9 +862,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -937,31 +877,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanyBenefit) + return unmarshal_json_response(models.CompanyBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -982,6 +911,8 @@ def delete( - There are no payroll items associated with the company benefit - The benefit is not managed by a Partner or by Gusto (type must be 'External') + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only delete company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -1032,9 +963,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1048,32 +980,20 @@ def delete( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, - models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, + response_data = unmarshal_json_response( + models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, http_res ) raise models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody( - data=response_data + response_data, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1094,6 +1014,8 @@ async def delete_async( - There are no payroll items associated with the company benefit - The benefit is not managed by a Partner or by Gusto (type must be 'External') + When the application has the `company_benefits:write:benefit_type_limited` data scope, the application can only delete company benefits for benefit types that are permitted for the application. + scope: `company_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -1144,9 +1066,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-company_benefits-company_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1160,32 +1083,20 @@ async def delete_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, - models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, + response_data = unmarshal_json_response( + models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, http_res ) raise models.DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody( - data=response_data + response_data, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_all( self, @@ -1252,9 +1163,10 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1265,26 +1177,15 @@ def get_all( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.SupportedBenefit]) + return unmarshal_json_response(List[models.SupportedBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_all_async( self, @@ -1351,9 +1252,10 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1364,26 +1266,15 @@ async def get_all_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.SupportedBenefit]) + return unmarshal_json_response(List[models.SupportedBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_supported( self, @@ -1453,9 +1344,10 @@ def get_supported( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1466,26 +1358,15 @@ def get_supported( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.SupportedBenefit) + return unmarshal_json_response(models.SupportedBenefit, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_supported_async( self, @@ -1555,9 +1436,10 @@ async def get_supported_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1568,26 +1450,15 @@ async def get_supported_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.SupportedBenefit) + return unmarshal_json_response(models.SupportedBenefit, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_summary( self, @@ -1666,9 +1537,10 @@ def get_summary( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-company_benefit_id-summary", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1679,26 +1551,15 @@ def get_summary( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.BenefitSummary) + return unmarshal_json_response(models.BenefitSummary, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_summary_async( self, @@ -1777,9 +1638,10 @@ async def get_summary_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-company_benefit_id-summary", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1790,26 +1652,15 @@ async def get_summary_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.BenefitSummary) + return unmarshal_json_response(models.BenefitSummary, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_employee_benefits( self, @@ -1887,9 +1738,10 @@ def get_employee_benefits( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company_benefits-company_benefit_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1900,26 +1752,15 @@ def get_employee_benefits( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_employee_benefits_async( self, @@ -1997,9 +1838,10 @@ async def get_employee_benefits_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company_benefits-company_benefit_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2010,26 +1852,15 @@ async def get_employee_benefits_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_employee_benefits( self, @@ -2055,6 +1886,8 @@ def update_employee_benefits( Benefits containing PHI are only visible to applications with the `employee_benefits:read:phi` scope. + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create or update employee benefits for benefit types that are permitted for the application. + scope: `employee_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -2118,9 +1951,10 @@ def update_employee_benefits( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company_benefits-company_benefit_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2132,31 +1966,20 @@ def update_employee_benefits( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_employee_benefits_async( self, @@ -2182,6 +2005,8 @@ async def update_employee_benefits_async( Benefits containing PHI are only visible to applications with the `employee_benefits:read:phi` scope. + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create or update employee benefits for benefit types that are permitted for the application. + scope: `employee_benefits:write` :param company_benefit_id: The UUID of the company benefit @@ -2245,9 +2070,10 @@ async def update_employee_benefits_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company_benefits-company_benefit_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2259,31 +2085,20 @@ async def update_employee_benefits_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_requirements( self, @@ -2351,9 +2166,10 @@ def get_requirements( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-benefits_id-requirements", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2364,26 +2180,15 @@ def get_requirements( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.BenefitTypeRequirements) + return unmarshal_json_response(models.BenefitTypeRequirements, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_requirements_async( self, @@ -2451,9 +2256,10 @@ async def get_requirements_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-benefits-benefits_id-requirements", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2464,23 +2270,430 @@ async def get_requirements_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.BenefitTypeRequirements) + return unmarshal_json_response(models.BenefitTypeRequirements, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_v1_company_benefits_company_benefit_id_contribution_exclusions( + self, + *, + company_benefit_id: str, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContributionExclusion]: + r"""Get contribution exclusions for a company benefit + + Returns all contributions for a given company benefit and whether they are excluded or not. + + Currently this endpoint only works for 401-k and Roth 401-k benefit types. + + scope: `company_benefits:read` + + :param company_benefit_id: The UUID of the company benefit + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest( + company_benefit_id=company_benefit_id, + x_gusto_api_version=x_gusto_api_version, + ) + ) + + req = self._build_request( + method="GET", + path="/v1/company_benefits/{company_benefit_id}/contribution_exclusions", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-company_benefits-company_benefit_id-contribution_exclusions", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.ContributionExclusion], http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_company_benefits_company_benefit_id_contribution_exclusions_async( + self, + *, + company_benefit_id: str, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContributionExclusion]: + r"""Get contribution exclusions for a company benefit + + Returns all contributions for a given company benefit and whether they are excluded or not. + + Currently this endpoint only works for 401-k and Roth 401-k benefit types. + + scope: `company_benefits:read` + + :param company_benefit_id: The UUID of the company benefit + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest( + company_benefit_id=company_benefit_id, + x_gusto_api_version=x_gusto_api_version, ) + ) + + req = self._build_request_async( + method="GET", + path="/v1/company_benefits/{company_benefit_id}/contribution_exclusions", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-company_benefits-company_benefit_id-contribution_exclusions", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.ContributionExclusion], http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def put_v1_company_benefits_company_benefit_id_contribution_exclusions( + self, + *, + company_benefit_id: str, + contribution_exclusions: Union[ + List[models.ContributionExclusion], + List[models.ContributionExclusionTypedDict], + ], + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContributionExclusion]: + r"""Update contribution exclusions for a company benefit + + Updates contribution exclusions for a given company benefit. + + Currently this endpoint only works for 401-k and Roth 401-k benefit types. + + scope: `company_benefits:write` + + :param company_benefit_id: The UUID of the company benefit + :param contribution_exclusions: The list of contribution exclusions to update + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest( + company_benefit_id=company_benefit_id, + x_gusto_api_version=x_gusto_api_version, + request_body=models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody( + contribution_exclusions=utils.get_pydantic_model( + contribution_exclusions, List[models.ContributionExclusion] + ), + ), + ) + + req = self._build_request( + method="PUT", + path="/v1/company_benefits/{company_benefit_id}/contribution_exclusions", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="put-v1-company_benefits-company_benefit_id-contribution_exclusions", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.ContributionExclusion], http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def put_v1_company_benefits_company_benefit_id_contribution_exclusions_async( + self, + *, + company_benefit_id: str, + contribution_exclusions: Union[ + List[models.ContributionExclusion], + List[models.ContributionExclusionTypedDict], + ], + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContributionExclusion]: + r"""Update contribution exclusions for a company benefit + + Updates contribution exclusions for a given company benefit. + + Currently this endpoint only works for 401-k and Roth 401-k benefit types. + + scope: `company_benefits:write` + + :param company_benefit_id: The UUID of the company benefit + :param contribution_exclusions: The list of contribution exclusions to update + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest( + company_benefit_id=company_benefit_id, + x_gusto_api_version=x_gusto_api_version, + request_body=models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody( + contribution_exclusions=utils.get_pydantic_model( + contribution_exclusions, List[models.ContributionExclusion] + ), + ), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/company_benefits/{company_benefit_id}/contribution_exclusions", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="put-v1-company_benefits-company_benefit_id-contribution_exclusions", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.ContributionExclusion], http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/companyforms.py b/gusto_embedded/src/gusto_embedded/companyforms.py index 0e1a20f2..3bf46c20 100644 --- a/gusto_embedded/src/gusto_embedded/companyforms.py +++ b/gusto_embedded/src/gusto_embedded/companyforms.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -13,6 +14,7 @@ def get_all( self, *, company_id: str, + sort_by: Optional[models.CompanyFormsSortBy] = None, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -28,6 +30,7 @@ def get_all( scope: `company_forms:read` :param company_id: The UUID of the company + :param sort_by: Sort company forms. Options: name, year, quarter, draft, document_content_type :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -46,6 +49,7 @@ def get_all( request = models.GetV1CompanyFormsRequest( company_id=company_id, + sort_by=sort_by, x_gusto_api_version=x_gusto_api_version, ) @@ -75,9 +79,10 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-forms", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,31 +93,21 @@ def get_all( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Form]) + return unmarshal_json_response(List[models.Form], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_all_async( self, *, company_id: str, + sort_by: Optional[models.CompanyFormsSortBy] = None, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -128,6 +123,7 @@ async def get_all_async( scope: `company_forms:read` :param company_id: The UUID of the company + :param sort_by: Sort company forms. Options: name, year, quarter, draft, document_content_type :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -146,6 +142,7 @@ async def get_all_async( request = models.GetV1CompanyFormsRequest( company_id=company_id, + sort_by=sort_by, x_gusto_api_version=x_gusto_api_version, ) @@ -175,9 +172,10 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-forms", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -188,26 +186,15 @@ async def get_all_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Form]) + return unmarshal_json_response(List[models.Form], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -275,9 +262,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-form", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -288,26 +276,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form) + return unmarshal_json_response(models.Form, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -375,9 +352,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-form", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -388,26 +366,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form) + return unmarshal_json_response(models.Form, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_pdf( self, @@ -475,9 +442,10 @@ def get_pdf( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-form-pdf", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -488,26 +456,15 @@ def get_pdf( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.FormPdf) + return unmarshal_json_response(models.FormPdf, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_pdf_async( self, @@ -575,9 +532,10 @@ async def get_pdf_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-form-pdf", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -588,26 +546,15 @@ async def get_pdf_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.FormPdf) + return unmarshal_json_response(models.FormPdf, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def sign( self, @@ -696,9 +643,10 @@ def sign( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company-form-sign", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -710,31 +658,20 @@ def sign( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form) + return unmarshal_json_response(models.Form, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def sign_async( self, @@ -823,9 +760,10 @@ async def sign_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company-form-sign", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -837,28 +775,17 @@ async def sign_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form) + return unmarshal_json_response(models.Form, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/contractordocuments.py b/gusto_embedded/src/gusto_embedded/contractordocuments.py index d319eb63..679a8300 100644 --- a/gusto_embedded/src/gusto_embedded/contractordocuments.py +++ b/gusto_embedded/src/gusto_embedded/contractordocuments.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -75,9 +76,10 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-documents", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,26 +90,15 @@ def get_all( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Document]) + return unmarshal_json_response(List[models.Document], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_all_async( self, @@ -175,9 +166,10 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-documents", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -188,26 +180,15 @@ async def get_all_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Document]) + return unmarshal_json_response(List[models.Document], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -227,7 +208,7 @@ def get( scope: `contractor_documents:read` - :param document_uuid: The ID or UUID of the document + :param document_uuid: The UUID of the document :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -275,9 +256,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-document", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -288,26 +270,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Document) + return unmarshal_json_response(models.Document, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -327,7 +298,7 @@ async def get_async( scope: `contractor_documents:read` - :param document_uuid: The ID or UUID of the document + :param document_uuid: The UUID of the document :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -375,9 +346,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-document", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -388,26 +360,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Document) + return unmarshal_json_response(models.Document, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_pdf( self, @@ -427,7 +388,7 @@ def get_pdf( scope: `contractor_documents:read` - :param document_uuid: The ID or UUID of the document + :param document_uuid: The UUID of the document :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -475,9 +436,10 @@ def get_pdf( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-document-pdf", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -488,26 +450,15 @@ def get_pdf( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.DocumentPdf) + return unmarshal_json_response(models.DocumentPdf, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_pdf_async( self, @@ -527,7 +478,7 @@ async def get_pdf_async( scope: `contractor_documents:read` - :param document_uuid: The ID or UUID of the document + :param document_uuid: The UUID of the document :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -575,9 +526,10 @@ async def get_pdf_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-document-pdf", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -588,26 +540,15 @@ async def get_pdf_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.DocumentPdf) + return unmarshal_json_response(models.DocumentPdf, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def sign( self, @@ -634,7 +575,7 @@ def sign( scope: `contractor_documents:write` - :param document_uuid: The ID or UUID of the document + :param document_uuid: The UUID of the document :param fields: List of fields and the values they will be set to. :param agree: Whether you agree to sign electronically :param x_gusto_client_ip: Optional header to supply the IP address. This can be used to supply the IP address for signature endpoints instead of the signed_by_ip_address parameter. @@ -701,9 +642,10 @@ def sign( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractor-document-sign", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -715,31 +657,20 @@ def sign( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.DocumentSigned) + return unmarshal_json_response(models.DocumentSigned, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def sign_async( self, @@ -766,7 +697,7 @@ async def sign_async( scope: `contractor_documents:write` - :param document_uuid: The ID or UUID of the document + :param document_uuid: The UUID of the document :param fields: List of fields and the values they will be set to. :param agree: Whether you agree to sign electronically :param x_gusto_client_ip: Optional header to supply the IP address. This can be used to supply the IP address for signature endpoints instead of the signed_by_ip_address parameter. @@ -833,9 +764,10 @@ async def sign_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractor-document-sign", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -847,28 +779,17 @@ async def sign_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.DocumentSigned) + return unmarshal_json_response(models.DocumentSigned, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/contractorforms.py b/gusto_embedded/src/gusto_embedded/contractorforms.py index 0ef92a64..50a84b81 100644 --- a/gusto_embedded/src/gusto_embedded/contractorforms.py +++ b/gusto_embedded/src/gusto_embedded/contractorforms.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -75,9 +76,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-forms", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,26 +90,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Form1099]) + return unmarshal_json_response(List[models.Form1099], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -175,9 +166,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-forms", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -188,26 +180,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Form1099]) + return unmarshal_json_response(List[models.Form1099], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -278,9 +259,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-form", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -291,26 +273,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form1099) + return unmarshal_json_response(models.Form1099, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -381,9 +352,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-form", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -394,26 +366,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form1099) + return unmarshal_json_response(models.Form1099, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_pdf( self, @@ -484,9 +445,10 @@ def get_pdf( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-form-pdf", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -497,26 +459,15 @@ def get_pdf( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.FormPdf) + return unmarshal_json_response(models.FormPdf, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_pdf_async( self, @@ -587,9 +538,10 @@ async def get_pdf_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor-form-pdf", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -600,26 +552,15 @@ async def get_pdf_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.FormPdf) + return unmarshal_json_response(models.FormPdf, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def generate1099( self, @@ -703,9 +644,10 @@ def generate1099( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-sandbox-generate_1099", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -717,31 +659,20 @@ def generate1099( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form1099) + return unmarshal_json_response(models.Form1099, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def generate1099_async( self, @@ -825,9 +756,10 @@ async def generate1099_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-sandbox-generate_1099", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -839,28 +771,17 @@ async def generate1099_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form1099) + return unmarshal_json_response(models.Form1099, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/contractorpaymentgroups.py b/gusto_embedded/src/gusto_embedded/contractorpaymentgroups.py index 6dd9285a..415a9296 100644 --- a/gusto_embedded/src/gusto_embedded/contractorpaymentgroups.py +++ b/gusto_embedded/src/gusto_embedded/contractorpaymentgroups.py @@ -6,43 +6,519 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union class ContractorPaymentGroups(BaseSDK): + def get_list( + self, + *, + company_id: str, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + page: Optional[int] = None, + per: Optional[int] = None, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContractorPaymentGroupWithBlockers]: + r"""Get contractor payment groups for a company + + Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. + + scope: `payrolls:read` + + + :param company_id: The UUID of the company + :param start_date: The time period for which to retrieve contractor payment groups. Defaults to 6 months ago. + :param end_date: The time period for which to retrieve contractor payment groups. Defaults to today's date. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1CompaniesCompanyIDContractorPaymentGroupsRequest( + company_id=company_id, + start_date=start_date, + end_date=end_date, + page=page, + per=per, + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request( + method="GET", + path="/v1/companies/{company_id}/contractor_payment_groups", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-contractor_payment_groups", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.ContractorPaymentGroupWithBlockers], http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_list_async( + self, + *, + company_id: str, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + page: Optional[int] = None, + per: Optional[int] = None, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContractorPaymentGroupWithBlockers]: + r"""Get contractor payment groups for a company + + Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. + + scope: `payrolls:read` + + + :param company_id: The UUID of the company + :param start_date: The time period for which to retrieve contractor payment groups. Defaults to 6 months ago. + :param end_date: The time period for which to retrieve contractor payment groups. Defaults to today's date. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1CompaniesCompanyIDContractorPaymentGroupsRequest( + company_id=company_id, + start_date=start_date, + end_date=end_date, + page=page, + per=per, + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request_async( + method="GET", + path="/v1/companies/{company_id}/contractor_payment_groups", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-contractor_payment_groups", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.ContractorPaymentGroupWithBlockers], http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + def create( self, *, company_id: str, - check_date: date, + check_date: date, + contractor_payments: Union[ + List[ + models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments + ], + List[ + models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPaymentsTypedDict + ], + ], + x_gusto_api_version: Optional[ + models.PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion + ] = models.PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + creation_token: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ContractorPaymentGroup: + r"""Create a contractor payment group + + Pay a group of contractors. Information needed depends on the contractor's wage type (hourly vs fixed) + + scope: `payrolls:run` + + + :param company_id: The UUID of the company + :param check_date: The payment check date + :param contractor_payments: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param creation_token: Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequest( + x_gusto_api_version=x_gusto_api_version, + company_id=company_id, + request_body=models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody( + check_date=check_date, + creation_token=creation_token, + contractor_payments=utils.get_pydantic_model( + contractor_payments, + List[ + models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments + ], + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/companies/{company_id}/contractor_payment_groups", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-v1-companies-company_id-contractor_payment_groups", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.ContractorPaymentGroup, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def create_async( + self, + *, + company_id: str, + check_date: date, + contractor_payments: Union[ + List[ + models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments + ], + List[ + models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPaymentsTypedDict + ], + ], + x_gusto_api_version: Optional[ + models.PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion + ] = models.PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + creation_token: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ContractorPaymentGroup: + r"""Create a contractor payment group + + Pay a group of contractors. Information needed depends on the contractor's wage type (hourly vs fixed) + + scope: `payrolls:run` + + + :param company_id: The UUID of the company + :param check_date: The payment check date + :param contractor_payments: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param creation_token: Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequest( + x_gusto_api_version=x_gusto_api_version, + company_id=company_id, + request_body=models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody( + check_date=check_date, + creation_token=creation_token, + contractor_payments=utils.get_pydantic_model( + contractor_payments, + List[ + models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments + ], + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/companies/{company_id}/contractor_payment_groups", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-v1-companies-company_id-contractor_payment_groups", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.ContractorPaymentGroup, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def preview( + self, + *, + company_id: str, contractor_payments: Union[ List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments + models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments ], List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPaymentsTypedDict + models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict ], ], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - creation_token: Optional[str] = None, + models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion + ] = models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + check_date: Optional[date] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ContractorPaymentGroup: - r"""Create a contractor payment group + ) -> models.ContractorPaymentGroupPreview: + r"""Preview a contractor payment group - Pay a group of contractors. Information needed depends on the contractor's wage type (hourly vs fixed) + Preview a contractor payment group before creating it. This endpoint allows you to see what the payment group would look like with the provided parameters without actually creating it. + + scope: `contractor_payment_groups:write` - scope: `payrolls:run` :param company_id: The UUID of the company - :param check_date: The payment check date :param contractor_payments: :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param creation_token: Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. + :param check_date: Date when payments should be processed :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -58,24 +534,23 @@ def create( else: base_url = self._get_url(base_url, url_variables) - request = models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequest( - company_id=company_id, + request = models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest( x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody( - check_date=check_date, - creation_token=creation_token, + company_id=company_id, + request_body=models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody( contractor_payments=utils.get_pydantic_model( contractor_payments, List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments + models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments ], ), + check_date=check_date, ), ) req = self._build_request( method="POST", - path="/v1/companies/{company_id}/contractor_payment_groups", + path="/v1/companies/{company_id}/contractor_payment_groups/preview", base_url=base_url, url_variables=url_variables, request=request, @@ -91,7 +566,7 @@ def create( False, False, "json", - models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody, + models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody, ), timeout_ms=timeout_ms, ) @@ -106,9 +581,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-v1-companies-company_id-contractor_payment_groups", - oauth2_scopes=[], + operation_id="post-v1-companies-company_id-contractor_payment_groups-preview", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -120,65 +596,60 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) + return unmarshal_json_response( + models.ContractorPaymentGroupPreview, http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundErrorObjectData, http_res + ) + raise models.NotFoundErrorObject(response_data, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def create_async( + async def preview_async( self, *, company_id: str, - check_date: date, contractor_payments: Union[ List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments + models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments ], List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPaymentsTypedDict + models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict ], ], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - creation_token: Optional[str] = None, + models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion + ] = models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + check_date: Optional[date] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ContractorPaymentGroup: - r"""Create a contractor payment group + ) -> models.ContractorPaymentGroupPreview: + r"""Preview a contractor payment group - Pay a group of contractors. Information needed depends on the contractor's wage type (hourly vs fixed) + Preview a contractor payment group before creating it. This endpoint allows you to see what the payment group would look like with the provided parameters without actually creating it. + + scope: `contractor_payment_groups:write` - scope: `payrolls:run` :param company_id: The UUID of the company - :param check_date: The payment check date :param contractor_payments: :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param creation_token: Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. + :param check_date: Date when payments should be processed :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -194,24 +665,23 @@ async def create_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequest( - company_id=company_id, + request = models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest( x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody( - check_date=check_date, - creation_token=creation_token, + company_id=company_id, + request_body=models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody( contractor_payments=utils.get_pydantic_model( contractor_payments, List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments + models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments ], ), + check_date=check_date, ), ) req = self._build_request_async( method="POST", - path="/v1/companies/{company_id}/contractor_payment_groups", + path="/v1/companies/{company_id}/contractor_payment_groups/preview", base_url=base_url, url_variables=url_variables, request=request, @@ -227,7 +697,7 @@ async def create_async( False, False, "json", - models.PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody, + models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody, ), timeout_ms=timeout_ms, ) @@ -242,9 +712,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-v1-companies-company_id-contractor_payment_groups", - oauth2_scopes=[], + operation_id="post-v1-companies-company_id-contractor_payment_groups-preview", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -256,59 +727,48 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) + return unmarshal_json_response( + models.ContractorPaymentGroupPreview, http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundErrorObjectData, http_res + ) + raise models.NotFoundErrorObject(response_data, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def get_list( + def get( self, *, - company_id: str, - start_date: Optional[str] = None, - end_date: Optional[str] = None, - page: Optional[int] = None, - per: Optional[int] = None, + contractor_payment_group_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion + ] = models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.ContractorPaymentGroupMinimal]: - r"""Get contractor payment groups for a company + ) -> models.ContractorPaymentGroup: + r"""Get a contractor payment group - Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. + Returns a contractor payment group with all associated contractor payments. scope: `payrolls:read` - :param company_id: The UUID of the company - :param start_date: The time period for which to retrieve contractor payment groups. Defaults to 6 months ago. - :param end_date: The time period for which to retrieve contractor payment groups. Defaults to today's date. - :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. - :param per: Number of objects per page. For majority of endpoints will default to 25 + + :param contractor_payment_group_uuid: The UUID of the contractor payment group :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -325,18 +785,14 @@ def get_list( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesCompanyIDContractorPaymentGroupsRequest( - company_id=company_id, - start_date=start_date, - end_date=end_date, - page=page, - per=per, + request = models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest( + contractor_payment_group_uuid=contractor_payment_group_uuid, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request( method="GET", - path="/v1/companies/{company_id}/contractor_payment_groups", + path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}", base_url=base_url, url_variables=url_variables, request=request, @@ -360,9 +816,10 @@ def get_list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-company_id-contractor_payment_groups", - oauth2_scopes=[], + operation_id="get-v1-contractor_payment_groups-contractor_payment_group_id", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -372,57 +829,43 @@ def get_list( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.ContractorPaymentGroupMinimal] + return unmarshal_json_response(models.ContractorPaymentGroup, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundErrorObjectData, http_res ) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.NotFoundErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def get_list_async( + async def get_async( self, *, - company_id: str, - start_date: Optional[str] = None, - end_date: Optional[str] = None, - page: Optional[int] = None, - per: Optional[int] = None, + contractor_payment_group_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion + ] = models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.ContractorPaymentGroupMinimal]: - r"""Get contractor payment groups for a company + ) -> models.ContractorPaymentGroup: + r"""Get a contractor payment group - Returns a list of minimal contractor payment groups within a given time period, including totals but not associated contractor payments. + Returns a contractor payment group with all associated contractor payments. scope: `payrolls:read` - :param company_id: The UUID of the company - :param start_date: The time period for which to retrieve contractor payment groups. Defaults to 6 months ago. - :param end_date: The time period for which to retrieve contractor payment groups. Defaults to today's date. - :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. - :param per: Number of objects per page. For majority of endpoints will default to 25 + + :param contractor_payment_group_uuid: The UUID of the contractor payment group :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -439,18 +882,14 @@ async def get_list_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesCompanyIDContractorPaymentGroupsRequest( - company_id=company_id, - start_date=start_date, - end_date=end_date, - page=page, - per=per, + request = models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest( + contractor_payment_group_uuid=contractor_payment_group_uuid, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request_async( method="GET", - path="/v1/companies/{company_id}/contractor_payment_groups", + path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}", base_url=base_url, url_variables=url_variables, request=request, @@ -474,9 +913,10 @@ async def get_list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-company_id-contractor_payment_groups", - oauth2_scopes=[], + operation_id="get-v1-contractor_payment_groups-contractor_payment_group_id", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -486,63 +926,44 @@ async def get_list_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.ContractorPaymentGroupMinimal] + return unmarshal_json_response(models.ContractorPaymentGroup, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundErrorObjectData, http_res ) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.NotFoundErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def preview( + def delete( self, *, - company_id: str, - check_date: date, - contractor_payments: Union[ - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments - ], - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict - ], - ], + contractor_payment_group_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - creation_token: Optional[str] = None, + models.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion + ] = models.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ContractorPaymentGroup: - r"""Preview a contractor payment group + ): + r"""Cancel a contractor payment group - Preview a group of contractor payments. Request will validate inputs and return preview of the contractor payment group including the expected debit_date. Uuid will be null in the response. + Cancels a contractor payment group and all associated contractor payments. All contractor payments must be cancellable, unfunded. - scope: `payrolls:read` + scope: `payrolls:run` - :param company_id: The UUID of the company - :param check_date: The payment check date - :param contractor_payments: + + :param contractor_payment_group_uuid: The UUID of the contractor payment group :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param creation_token: Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -558,41 +979,24 @@ def preview( else: base_url = self._get_url(base_url, url_variables) - request = models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest( - company_id=company_id, + request = models.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequest( + contractor_payment_group_uuid=contractor_payment_group_uuid, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody( - check_date=check_date, - creation_token=creation_token, - contractor_payments=utils.get_pydantic_model( - contractor_payments, - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments - ], - ), - ), ) req = self._build_request( - method="POST", - path="/v1/companies/{company_id}/contractor_payment_groups/preview", + method="DELETE", + path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody, - ), timeout_ms=timeout_ms, ) @@ -606,9 +1010,10 @@ def preview( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-v1-companies-company_id-contractor_payment_groups-preview", - oauth2_scopes=[], + operation_id="delete-v1-contractor_payment_groups-contractor_payment_group_id", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -619,66 +1024,43 @@ def preview( ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def preview_async( + async def delete_async( self, *, - company_id: str, - check_date: date, - contractor_payments: Union[ - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments - ], - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict - ], - ], + contractor_payment_group_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - creation_token: Optional[str] = None, + models.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion + ] = models.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ContractorPaymentGroup: - r"""Preview a contractor payment group + ): + r"""Cancel a contractor payment group - Preview a group of contractor payments. Request will validate inputs and return preview of the contractor payment group including the expected debit_date. Uuid will be null in the response. + Cancels a contractor payment group and all associated contractor payments. All contractor payments must be cancellable, unfunded. - scope: `payrolls:read` + scope: `payrolls:run` - :param company_id: The UUID of the company - :param check_date: The payment check date - :param contractor_payments: + + :param contractor_payment_group_uuid: The UUID of the contractor payment group :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param creation_token: Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -694,41 +1076,24 @@ async def preview_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest( - company_id=company_id, + request = models.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequest( + contractor_payment_group_uuid=contractor_payment_group_uuid, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody( - check_date=check_date, - creation_token=creation_token, - contractor_payments=utils.get_pydantic_model( - contractor_payments, - List[ - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments - ], - ), - ), ) req = self._build_request_async( - method="POST", - path="/v1/companies/{company_id}/contractor_payment_groups/preview", + method="DELETE", + path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody, - ), timeout_ms=timeout_ms, ) @@ -742,9 +1107,10 @@ async def preview_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-v1-companies-company_id-contractor_payment_groups-preview", - oauth2_scopes=[], + operation_id="delete-v1-contractor_payment_groups-contractor_payment_group_id", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -755,50 +1121,43 @@ async def preview_async( ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def get( + def fund( self, *, contractor_payment_group_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion + ] = models.PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.ContractorPaymentGroup: - r"""Fetch a contractor payment group + r"""Fund a contractor payment group [DEMO] - Returns a contractor payment group with all associated contractor payments. + > 🚧 Demo action + > This action is only available in the Demo environment + + Simulate funding a contractor payment group. Funding only occurs automatically in the production environment when bank transactions are generated. Use this action in the demo environment to transition a contractor payment group's `status` from `Unfunded` to `Funded`. A `Funded` status is required for generating a contractor payment receipt. + + scope: `payrolls:run` - scope: `payrolls:read` :param contractor_payment_group_uuid: The UUID of the contractor payment group :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. @@ -817,14 +1176,16 @@ def get( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest( - contractor_payment_group_uuid=contractor_payment_group_uuid, - x_gusto_api_version=x_gusto_api_version, + request = ( + models.PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequest( + contractor_payment_group_uuid=contractor_payment_group_uuid, + x_gusto_api_version=x_gusto_api_version, + ) ) req = self._build_request( - method="GET", - path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}", + method="PUT", + path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}/fund", base_url=base_url, url_variables=url_variables, request=request, @@ -848,57 +1209,62 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-contractor_payment_groups-contractor_payment_group_id", - oauth2_scopes=[], + operation_id="put-v1-contractor_payment_groups-contractor_payment_group_id-fund", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.ContractorPaymentGroup, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundErrorObjectData, http_res + ) + raise models.NotFoundErrorObject(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def get_async( + async def fund_async( self, *, contractor_payment_group_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion + ] = models.PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.ContractorPaymentGroup: - r"""Fetch a contractor payment group + r"""Fund a contractor payment group [DEMO] - Returns a contractor payment group with all associated contractor payments. + > 🚧 Demo action + > This action is only available in the Demo environment + + Simulate funding a contractor payment group. Funding only occurs automatically in the production environment when bank transactions are generated. Use this action in the demo environment to transition a contractor payment group's `status` from `Unfunded` to `Funded`. A `Funded` status is required for generating a contractor payment receipt. + + scope: `payrolls:run` - scope: `payrolls:read` :param contractor_payment_group_uuid: The UUID of the contractor payment group :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. @@ -917,14 +1283,16 @@ async def get_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest( - contractor_payment_group_uuid=contractor_payment_group_uuid, - x_gusto_api_version=x_gusto_api_version, + request = ( + models.PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequest( + contractor_payment_group_uuid=contractor_payment_group_uuid, + x_gusto_api_version=x_gusto_api_version, + ) ) req = self._build_request_async( - method="GET", - path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}", + method="PUT", + path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}/fund", base_url=base_url, url_variables=url_variables, request=request, @@ -948,59 +1316,61 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-contractor_payment_groups-contractor_payment_group_id", - oauth2_scopes=[], + operation_id="put-v1-contractor_payment_groups-contractor_payment_group_id-fund", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.ContractorPaymentGroup, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundErrorObjectData, http_res + ) + raise models.NotFoundErrorObject(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def delete( + def get_v1_contractor_payment_groups_id_partner_disbursements( self, *, - contractor_payment_group_uuid: str, + id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] = models.GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Cancel a contractor payment group + ) -> models.ContractorPaymentGroupPartnerDisbursements: + r"""Get partner disbursements for a contractor payment group - Cancels a contractor payment group and all associated contractor payments. All contractor payments must be cancellable, unfunded. + Get partner disbursements for a specific contractor payment group. - scope: `payrolls:run` + scope: `partner_disbursements:read` - :param contractor_payment_group_uuid: The UUID of the contractor payment group + + :param id: The UUID of the contractor payment group :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1017,14 +1387,14 @@ def delete( else: base_url = self._get_url(base_url, url_variables) - request = models.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequest( - contractor_payment_group_uuid=contractor_payment_group_uuid, + request = models.GetV1ContractorPaymentGroupsIDPartnerDisbursementsRequest( + id=id, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request( - method="DELETE", - path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}", + method="GET", + path="/v1/contractor_payment_groups/{id}/partner_disbursements", base_url=base_url, url_variables=url_variables, request=request, @@ -1048,65 +1418,58 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="delete-v1-contractor_payment_groups-contractor_payment_group_id", - oauth2_scopes=[], + operation_id="get-v1-contractor_payment_groups-id-partner_disbursements", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "204", "*"): - return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ContractorPaymentGroupPartnerDisbursements, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def delete_async( + async def get_v1_contractor_payment_groups_id_partner_disbursements_async( self, *, - contractor_payment_group_uuid: str, + id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] = models.GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Cancel a contractor payment group + ) -> models.ContractorPaymentGroupPartnerDisbursements: + r"""Get partner disbursements for a contractor payment group - Cancels a contractor payment group and all associated contractor payments. All contractor payments must be cancellable, unfunded. + Get partner disbursements for a specific contractor payment group. - scope: `payrolls:run` + scope: `partner_disbursements:read` - :param contractor_payment_group_uuid: The UUID of the contractor payment group + + :param id: The UUID of the contractor payment group :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1123,14 +1486,14 @@ async def delete_async( else: base_url = self._get_url(base_url, url_variables) - request = models.DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequest( - contractor_payment_group_uuid=contractor_payment_group_uuid, + request = models.GetV1ContractorPaymentGroupsIDPartnerDisbursementsRequest( + id=id, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request_async( - method="DELETE", - path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}", + method="GET", + path="/v1/contractor_payment_groups/{id}/partner_disbursements", base_url=base_url, url_variables=url_variables, request=request, @@ -1154,69 +1517,67 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="delete-v1-contractor_payment_groups-contractor_payment_group_id", - oauth2_scopes=[], + operation_id="get-v1-contractor_payment_groups-id-partner_disbursements", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "204", "*"): - return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ContractorPaymentGroupPartnerDisbursements, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def fund( + def patch_v1_contractor_payment_groups_id_partner_disbursements( self, *, - contractor_payment_group_uuid: str, + id: str, + disbursements: Union[ + List[ + models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements + ], + List[ + models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursementsTypedDict + ], + ], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] = models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ContractorPaymentGroup: - r"""Fund a contractor payment group [DEMO] + ) -> models.ContractorPaymentGroupPartnerDisbursements: + r"""Update partner disbursements for a contractor payment group - > 🚧 Demo action - > - > This action is only available in the Demo environment + Update partner disbursements for a specific contractor payment group. - Simulate funding a contractor payment group. Funding only occurs automatically in the production environment when bank transactions are generated. Use this action in the demo environment to transition a contractor payment group's `status` from `Unfunded` to `Funded`. A `Funded` status is required for generating a contractor payment receipt. + scope: `partner_disbursements:write` - scope: `payrolls:run` - :param contractor_payment_group_uuid: The UUID of the contractor payment group + :param id: The UUID of the contractor payment group + :param disbursements: :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1233,16 +1594,22 @@ def fund( else: base_url = self._get_url(base_url, url_variables) - request = ( - models.PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequest( - contractor_payment_group_uuid=contractor_payment_group_uuid, - x_gusto_api_version=x_gusto_api_version, - ) + request = models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequest( + id=id, + x_gusto_api_version=x_gusto_api_version, + request_body=models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBody( + disbursements=utils.get_pydantic_model( + disbursements, + List[ + models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements + ], + ), + ), ) req = self._build_request( - method="PUT", - path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}/fund", + method="PATCH", + path="/v1/contractor_payment_groups/{id}/partner_disbursements", base_url=base_url, url_variables=url_variables, request=request, @@ -1253,6 +1620,15 @@ def fund( accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "json", + Optional[ + models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBody + ], + ), timeout_ms=timeout_ms, ) @@ -1266,9 +1642,10 @@ def fund( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-v1-contractor_payment_groups-contractor_payment_group_id-fund", - oauth2_scopes=[], + operation_id="patch-v1-contractor_payment_groups-id-partner_disbursements", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1280,55 +1657,57 @@ def fund( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) + return unmarshal_json_response( + models.ContractorPaymentGroupPartnerDisbursements, http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundErrorObjectData, http_res + ) + raise models.NotFoundErrorObject(response_data, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def fund_async( + async def patch_v1_contractor_payment_groups_id_partner_disbursements_async( self, *, - contractor_payment_group_uuid: str, + id: str, + disbursements: Union[ + List[ + models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements + ], + List[ + models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursementsTypedDict + ], + ], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] = models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ContractorPaymentGroup: - r"""Fund a contractor payment group [DEMO] + ) -> models.ContractorPaymentGroupPartnerDisbursements: + r"""Update partner disbursements for a contractor payment group - > 🚧 Demo action - > - > This action is only available in the Demo environment + Update partner disbursements for a specific contractor payment group. - Simulate funding a contractor payment group. Funding only occurs automatically in the production environment when bank transactions are generated. Use this action in the demo environment to transition a contractor payment group's `status` from `Unfunded` to `Funded`. A `Funded` status is required for generating a contractor payment receipt. + scope: `partner_disbursements:write` - scope: `payrolls:run` - :param contractor_payment_group_uuid: The UUID of the contractor payment group + :param id: The UUID of the contractor payment group + :param disbursements: :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1345,16 +1724,22 @@ async def fund_async( else: base_url = self._get_url(base_url, url_variables) - request = ( - models.PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequest( - contractor_payment_group_uuid=contractor_payment_group_uuid, - x_gusto_api_version=x_gusto_api_version, - ) + request = models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequest( + id=id, + x_gusto_api_version=x_gusto_api_version, + request_body=models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBody( + disbursements=utils.get_pydantic_model( + disbursements, + List[ + models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements + ], + ), + ), ) req = self._build_request_async( - method="PUT", - path="/v1/contractor_payment_groups/{contractor_payment_group_uuid}/fund", + method="PATCH", + path="/v1/contractor_payment_groups/{id}/partner_disbursements", base_url=base_url, url_variables=url_variables, request=request, @@ -1365,6 +1750,15 @@ async def fund_async( accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "json", + Optional[ + models.PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBody + ], + ), timeout_ms=timeout_ms, ) @@ -1378,9 +1772,10 @@ async def fund_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-v1-contractor_payment_groups-contractor_payment_group_id-fund", - oauth2_scopes=[], + operation_id="patch-v1-contractor_payment_groups-id-partner_disbursements", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1392,28 +1787,24 @@ async def fund_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentGroup) + return unmarshal_json_response( + models.ContractorPaymentGroupPartnerDisbursements, http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundErrorObjectData, http_res + ) + raise models.NotFoundErrorObject(response_data, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/contractorpaymentmethod_sdk.py b/gusto_embedded/src/gusto_embedded/contractorpaymentmethod_sdk.py index 98ee0d0f..b86d07ad 100644 --- a/gusto_embedded/src/gusto_embedded/contractorpaymentmethod_sdk.py +++ b/gusto_embedded/src/gusto_embedded/contractorpaymentmethod_sdk.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -75,9 +76,10 @@ def get_bank_accounts( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid-bank_accounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,28 +90,15 @@ def get_bank_accounts( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.ContractorBankAccount] - ) + return unmarshal_json_response(List[models.ContractorBankAccount], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_bank_accounts_async( self, @@ -177,9 +166,10 @@ async def get_bank_accounts_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid-bank_accounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -190,28 +180,15 @@ async def get_bank_accounts_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.ContractorBankAccount] - ) + return unmarshal_json_response(List[models.ContractorBankAccount], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -281,9 +258,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid-payment_method", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -294,26 +272,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentMethod) + return unmarshal_json_response(models.ContractorPaymentMethod, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -383,9 +350,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid-payment_method", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -396,26 +364,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentMethod) + return unmarshal_json_response(models.ContractorPaymentMethod, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -499,9 +456,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractors-contractor_id-payment_method", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -513,31 +471,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentMethod) + return unmarshal_json_response(models.ContractorPaymentMethod, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -621,9 +568,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractors-contractor_id-payment_method", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -635,28 +583,17 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentMethod) + return unmarshal_json_response(models.ContractorPaymentMethod, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/contractorpaymentmethods.py b/gusto_embedded/src/gusto_embedded/contractorpaymentmethods.py index f36fd87c..dca3151d 100644 --- a/gusto_embedded/src/gusto_embedded/contractorpaymentmethods.py +++ b/gusto_embedded/src/gusto_embedded/contractorpaymentmethods.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Mapping, Optional @@ -98,9 +99,10 @@ def create_bank_account( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-contractors-contractor_uuid-bank_accounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -112,31 +114,20 @@ def create_bank_account( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorBankAccount) + return unmarshal_json_response(models.ContractorBankAccount, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_bank_account_async( self, @@ -227,9 +218,10 @@ async def create_bank_account_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-contractors-contractor_uuid-bank_accounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -241,28 +233,17 @@ async def create_bank_account_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorBankAccount) + return unmarshal_json_response(models.ContractorBankAccount, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/contractorpayments.py b/gusto_embedded/src/gusto_embedded/contractorpayments.py index ddaf376b..ade8641b 100644 --- a/gusto_embedded/src/gusto_embedded/contractorpayments.py +++ b/gusto_embedded/src/gusto_embedded/contractorpayments.py @@ -6,6 +6,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -83,9 +84,10 @@ def get_receipt( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor_payments-contractor_payment_uuid-receipt", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -96,26 +98,15 @@ def get_receipt( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentReceipt) + return unmarshal_json_response(models.ContractorPaymentReceipt, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_receipt_async( self, @@ -190,9 +181,10 @@ async def get_receipt_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor_payments-contractor_payment_uuid-receipt", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -203,26 +195,15 @@ async def get_receipt_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPaymentReceipt) + return unmarshal_json_response(models.ContractorPaymentReceipt, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def fund( self, @@ -294,9 +275,10 @@ def fund( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor_payments-contractor_payment_uuid-fund", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -308,31 +290,20 @@ def fund( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPayment) + return unmarshal_json_response(models.ContractorPayment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def fund_async( self, @@ -404,9 +375,10 @@ async def fund_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractor_payments-contractor_payment_uuid-fund", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -418,31 +390,20 @@ async def fund_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPayment) + return unmarshal_json_response(models.ContractorPayment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create( self, @@ -542,9 +503,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-contractor_payments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -556,31 +518,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPayment) + return unmarshal_json_response(models.ContractorPayment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -680,9 +631,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-contractor_payments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -694,31 +646,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPayment) + return unmarshal_json_response(models.ContractorPayment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list( self, @@ -804,9 +745,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-contractor_payments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -817,29 +759,17 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, - models.GetV1CompaniesCompanyIDContractorPaymentsResponseBody, + return unmarshal_json_response( + models.GetV1CompaniesCompanyIDContractorPaymentsResponseBody, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -925,9 +855,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-contractor_payments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -938,29 +869,17 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, - models.GetV1CompaniesCompanyIDContractorPaymentsResponseBody, + return unmarshal_json_response( + models.GetV1CompaniesCompanyIDContractorPaymentsResponseBody, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -1032,9 +951,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-contractor_payment-contractor-payment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1045,26 +965,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPayment) + return unmarshal_json_response(models.ContractorPayment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -1136,9 +1045,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-contractor_payment-contractor-payment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1149,26 +1059,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorPayment) + return unmarshal_json_response(models.ContractorPayment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -1241,9 +1140,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-companies-company_id-contractor_payment-contractor-payment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1257,29 +1157,18 @@ def delete( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1352,9 +1241,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-companies-company_id-contractor_payment-contractor-payment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1368,29 +1258,18 @@ async def delete_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def preview( self, @@ -1484,9 +1363,10 @@ def preview( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-contractor_payments-preview", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1498,37 +1378,26 @@ def preview( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, + return unmarshal_json_response( models.GetCompaniesCompanyUUIDContractorPaymentsPreviewResponseBody, + http_res, ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, + response_data = unmarshal_json_response( models.GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBodyData, + http_res, ) raise models.GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBody( - data=response_data + response_data, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def preview_async( self, @@ -1622,9 +1491,10 @@ async def preview_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-contractor_payments-preview", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1636,34 +1506,23 @@ async def preview_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, + return unmarshal_json_response( models.GetCompaniesCompanyUUIDContractorPaymentsPreviewResponseBody, + http_res, ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, + response_data = unmarshal_json_response( models.GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBodyData, + http_res, ) raise models.GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBody( - data=response_data + response_data, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/contractors.py b/gusto_embedded/src/gusto_embedded/contractors.py index 3580ef09..0437cae8 100644 --- a/gusto_embedded/src/gusto_embedded/contractors.py +++ b/gusto_embedded/src/gusto_embedded/contractors.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -131,9 +132,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_uuid-contractors", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -145,31 +147,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -293,9 +284,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_uuid-contractors", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -307,31 +299,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list( self, @@ -340,6 +321,7 @@ def list( page: Optional[int] = None, per: Optional[int] = None, search_term: Optional[str] = None, + sort_by: Optional[models.ContractorsSortBy] = None, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -358,6 +340,7 @@ def list( :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 :param search_term: A string to search for in the object's names + :param sort_by: Sort contractors. Options: type, onboarding_status, name, created_at :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -379,6 +362,7 @@ def list( page=page, per=per, search_term=search_term, + sort_by=sort_by, x_gusto_api_version=x_gusto_api_version, ) @@ -408,9 +392,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_uuid-contractors", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -421,26 +406,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Contractor]) + return unmarshal_json_response(List[models.Contractor], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -449,6 +423,7 @@ async def list_async( page: Optional[int] = None, per: Optional[int] = None, search_term: Optional[str] = None, + sort_by: Optional[models.ContractorsSortBy] = None, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -467,6 +442,7 @@ async def list_async( :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 :param search_term: A string to search for in the object's names + :param sort_by: Sort contractors. Options: type, onboarding_status, name, created_at :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -488,6 +464,7 @@ async def list_async( page=page, per=per, search_term=search_term, + sort_by=sort_by, x_gusto_api_version=x_gusto_api_version, ) @@ -517,9 +494,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_uuid-contractors", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -530,26 +508,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Contractor]) + return unmarshal_json_response(List[models.Contractor], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -617,9 +584,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -630,26 +598,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -717,9 +674,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -730,26 +688,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -880,9 +827,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractors-contractor_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -894,31 +842,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -1049,9 +986,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractors-contractor_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1063,31 +1001,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Contractor) + return unmarshal_json_response(models.Contractor, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -1155,9 +1082,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-contractors-contractor_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1171,23 +1099,12 @@ def delete( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1255,9 +1172,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-contractors-contractor_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1271,23 +1189,12 @@ async def delete_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_onboarding_status( self, @@ -1386,9 +1293,10 @@ def get_onboarding_status( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid-onboarding_status", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1399,28 +1307,15 @@ def get_onboarding_status( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.ContractorOnboardingStatus - ) + return unmarshal_json_response(models.ContractorOnboardingStatus, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_onboarding_status_async( self, @@ -1519,9 +1414,10 @@ async def get_onboarding_status_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid-onboarding_status", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1532,28 +1428,15 @@ async def get_onboarding_status_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.ContractorOnboardingStatus - ) + return unmarshal_json_response(models.ContractorOnboardingStatus, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_onboarding_status( self, @@ -1645,9 +1528,10 @@ def update_onboarding_status( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractors-contractor_uuid-onboarding_status", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1659,33 +1543,20 @@ def update_onboarding_status( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.ContractorOnboardingStatus - ) + return unmarshal_json_response(models.ContractorOnboardingStatus, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_onboarding_status_async( self, @@ -1777,9 +1648,10 @@ async def update_onboarding_status_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractors-contractor_uuid-onboarding_status", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1791,33 +1663,20 @@ async def update_onboarding_status_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.ContractorOnboardingStatus - ) + return unmarshal_json_response(models.ContractorOnboardingStatus, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_address( self, @@ -1885,9 +1744,10 @@ def get_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid-address", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1898,26 +1758,15 @@ def get_address( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorAddress) + return unmarshal_json_response(models.ContractorAddress, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_address_async( self, @@ -1985,9 +1834,10 @@ async def get_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-contractors-contractor_uuid-address", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1998,26 +1848,15 @@ async def get_address_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorAddress) + return unmarshal_json_response(models.ContractorAddress, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_address( self, @@ -2112,9 +1951,10 @@ def update_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractors-contractor_uuid-address", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2126,31 +1966,20 @@ def update_address( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorAddress) + return unmarshal_json_response(models.ContractorAddress, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_address_async( self, @@ -2245,9 +2074,10 @@ async def update_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-contractors-contractor_uuid-address", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2259,28 +2089,275 @@ async def update_address_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ContractorAddress) + return unmarshal_json_response(models.ContractorAddress, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_v1_companies_company_id_contractors_payment_details( + self, + *, + company_id: str, + contractor_uuid: Optional[str] = None, + contractor_payment_group_uuid: Optional[str] = None, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContractorPaymentDetailsList]: + r"""List contractor payment details + + Get payment details for contractors in a company. This endpoint returns a list of all contractors + associated with the specified company, including their payment methods and bank account details + if they are paid via direct deposit. + + For contractors paid by direct deposit, the response includes their bank account information + with sensitive data masked for security. The payment details also include information about + how their payments are split if they have multiple bank accounts configured. + + For contractors paid by check, only the basic payment method information is returned. + + ### Response Details + - For direct deposit contractors: + - Bank account details (masked) + - Payment splits configuration + - Routing numbers + - Account types + - For check payments: + - Basic payment method designation + + ### Common Use Cases + - Fetching contractor payment information for payroll processing + - Verifying contractor payment methods + - Reviewing payment split configurations + + `encrypted_account_number` is available only with the additional scope `contractor_payment_methods:read:account_numbers`. + + scope: `contractor_payment_methods:read` + + + :param company_id: The UUID of the company. This identifies the company whose contractor payment details you want to retrieve. + :param contractor_uuid: Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor. + :param contractor_payment_group_uuid: Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest( + company_id=company_id, + contractor_uuid=contractor_uuid, + contractor_payment_group_uuid=contractor_payment_group_uuid, + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request( + method="GET", + path="/v1/companies/{company_id}/contractors/payment_details", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-contractors-payment_details", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.ContractorPaymentDetailsList], http_res ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_companies_company_id_contractors_payment_details_async( + self, + *, + company_id: str, + contractor_uuid: Optional[str] = None, + contractor_payment_group_uuid: Optional[str] = None, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.ContractorPaymentDetailsList]: + r"""List contractor payment details + + Get payment details for contractors in a company. This endpoint returns a list of all contractors + associated with the specified company, including their payment methods and bank account details + if they are paid via direct deposit. + + For contractors paid by direct deposit, the response includes their bank account information + with sensitive data masked for security. The payment details also include information about + how their payments are split if they have multiple bank accounts configured. + + For contractors paid by check, only the basic payment method information is returned. + + ### Response Details + - For direct deposit contractors: + - Bank account details (masked) + - Payment splits configuration + - Routing numbers + - Account types + - For check payments: + - Basic payment method designation - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, + ### Common Use Cases + - Fetching contractor payment information for payroll processing + - Verifying contractor payment methods + - Reviewing payment split configurations + + `encrypted_account_number` is available only with the additional scope `contractor_payment_methods:read:account_numbers`. + + scope: `contractor_payment_methods:read` + + + :param company_id: The UUID of the company. This identifies the company whose contractor payment details you want to retrieve. + :param contractor_uuid: Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor. + :param contractor_payment_group_uuid: Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest( + company_id=company_id, + contractor_uuid=contractor_uuid, + contractor_payment_group_uuid=contractor_payment_group_uuid, + x_gusto_api_version=x_gusto_api_version, ) + + req = self._build_request_async( + method="GET", + path="/v1/companies/{company_id}/contractors/payment_details", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-contractors-payment_details", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.ContractorPaymentDetailsList], http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/departments.py b/gusto_embedded/src/gusto_embedded/departments.py index b952dd05..0b581d0c 100644 --- a/gusto_embedded/src/gusto_embedded/departments.py +++ b/gusto_embedded/src/gusto_embedded/departments.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -87,9 +88,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -101,31 +103,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -205,9 +196,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -219,31 +211,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_all( self, @@ -311,9 +292,10 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -324,26 +306,15 @@ def get_all( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Department]) + return unmarshal_json_response(List[models.Department], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_all_async( self, @@ -411,9 +382,10 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -424,26 +396,15 @@ async def get_all_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Department]) + return unmarshal_json_response(List[models.Department], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -512,9 +473,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -525,26 +487,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -613,9 +564,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -626,26 +578,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -728,9 +669,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -742,31 +684,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -849,9 +780,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-departments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -863,31 +795,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -956,9 +877,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -972,29 +894,18 @@ def delete( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1063,9 +974,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1079,29 +991,18 @@ async def delete_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def add_people( self, @@ -1203,9 +1104,10 @@ def add_people( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-add-people-to-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1216,26 +1118,15 @@ def add_people( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def add_people_async( self, @@ -1337,9 +1228,10 @@ async def add_people_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-add-people-to-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1350,26 +1242,15 @@ async def add_people_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def remove_people( self, @@ -1472,9 +1353,10 @@ def remove_people( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-remove-people-from-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1485,26 +1367,15 @@ def remove_people( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def remove_people_async( self, @@ -1607,9 +1478,10 @@ async def remove_people_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-remove-people-from-department", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1620,23 +1492,12 @@ async def remove_people_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Department) + return unmarshal_json_response(models.Department, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/earningtypes.py b/gusto_embedded/src/gusto_embedded/earningtypes.py index 9285f2a1..480ecd2f 100644 --- a/gusto_embedded/src/gusto_embedded/earningtypes.py +++ b/gusto_embedded/src/gusto_embedded/earningtypes.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Mapping, Optional @@ -89,9 +90,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-earning_types", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -103,31 +105,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningType) + return unmarshal_json_response(models.EarningType, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -209,9 +200,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-earning_types", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -223,31 +215,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningType) + return unmarshal_json_response(models.EarningType, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list( self, @@ -321,9 +302,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-earning_types", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -334,26 +316,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningTypeList) + return unmarshal_json_response(models.EarningTypeList, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -427,9 +398,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-earning_types", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -440,26 +412,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningTypeList) + return unmarshal_json_response(models.EarningTypeList, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -542,9 +503,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-earning_types-earning_type_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -556,31 +518,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningType) + return unmarshal_json_response(models.EarningType, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -663,9 +614,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-earning_types-earning_type_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -677,31 +629,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EarningType) + return unmarshal_json_response(models.EarningType, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -772,9 +713,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-companies-company_id-earning_types-earning_type_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -788,23 +730,12 @@ def delete( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -875,9 +806,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-companies-company_id-earning_types-earning_type_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -891,20 +823,9 @@ async def delete_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/employeeaddresses.py b/gusto_embedded/src/gusto_embedded/employeeaddresses.py index cad75567..d1a7710d 100644 --- a/gusto_embedded/src/gusto_embedded/employeeaddresses.py +++ b/gusto_embedded/src/gusto_embedded/employeeaddresses.py @@ -6,6 +6,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -15,8 +16,8 @@ def get( *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -30,6 +31,7 @@ def get( scope: `employees:read` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -78,9 +80,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-home_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -90,35 +93,30 @@ def get( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeAddress]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.EmployeeAddress], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -132,6 +130,7 @@ async def get_async( scope: `employees:read` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -180,9 +179,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-home_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -192,41 +192,36 @@ async def get_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeAddress]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.EmployeeAddress], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_1: Optional[str] = None, street_2: OptionalNullable[str] = UNSET, city: Optional[str] = None, state: Optional[str] = None, zip_code: Optional[str] = None, - effective_date: Optional[date] = None, + effective_date: OptionalNullable[date] = UNSET, courtesy_withholding: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -241,6 +236,7 @@ def create( scope: `employees:write` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param street_1: @@ -312,9 +308,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-home_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -326,45 +323,34 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_1: Optional[str] = None, street_2: OptionalNullable[str] = UNSET, city: Optional[str] = None, state: Optional[str] = None, zip_code: Optional[str] = None, - effective_date: Optional[date] = None, + effective_date: OptionalNullable[date] = UNSET, courtesy_withholding: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -379,6 +365,7 @@ async def create_async( scope: `employees:write` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param street_1: @@ -450,9 +437,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-home_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -464,39 +452,28 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def retrieve_home_address( self, *, home_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -510,6 +487,7 @@ def retrieve_home_address( scope: `employees:read` + :param home_address_uuid: The UUID of the home address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -558,9 +536,10 @@ def retrieve_home_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -570,35 +549,30 @@ def retrieve_home_address( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def retrieve_home_address_async( self, *, home_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -612,6 +586,7 @@ async def retrieve_home_address_async( scope: `employees:read` + :param home_address_uuid: The UUID of the home address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -660,9 +635,10 @@ async def retrieve_home_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -672,27 +648,22 @@ async def retrieve_home_address_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -700,14 +671,14 @@ def update( home_address_uuid: str, version: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_1: Optional[str] = None, street_2: OptionalNullable[str] = UNSET, city: Optional[str] = None, state: Optional[str] = None, zip_code: Optional[str] = None, - effective_date: Optional[date] = None, + effective_date: OptionalNullable[date] = UNSET, courtesy_withholding: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -722,8 +693,9 @@ def update( scope: `employees:write` + :param home_address_uuid: The UUID of the home address - :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param street_1: :param street_2: @@ -748,8 +720,8 @@ def update( base_url = self._get_url(base_url, url_variables) request = models.PutV1HomeAddressesHomeAddressUUIDRequest( - home_address_uuid=home_address_uuid, x_gusto_api_version=x_gusto_api_version, + home_address_uuid=home_address_uuid, request_body=models.PutV1HomeAddressesHomeAddressUUIDRequestBody( version=version, street_1=street_1, @@ -795,9 +767,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -809,31 +782,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -841,14 +803,14 @@ async def update_async( home_address_uuid: str, version: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, street_1: Optional[str] = None, street_2: OptionalNullable[str] = UNSET, city: Optional[str] = None, state: Optional[str] = None, zip_code: Optional[str] = None, - effective_date: Optional[date] = None, + effective_date: OptionalNullable[date] = UNSET, courtesy_withholding: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -863,8 +825,9 @@ async def update_async( scope: `employees:write` + :param home_address_uuid: The UUID of the home address - :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param street_1: :param street_2: @@ -889,8 +852,8 @@ async def update_async( base_url = self._get_url(base_url, url_variables) request = models.PutV1HomeAddressesHomeAddressUUIDRequest( - home_address_uuid=home_address_uuid, x_gusto_api_version=x_gusto_api_version, + home_address_uuid=home_address_uuid, request_body=models.PutV1HomeAddressesHomeAddressUUIDRequestBody( version=version, street_1=street_1, @@ -936,9 +899,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -950,39 +914,28 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(models.EmployeeAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, *, home_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -990,10 +943,11 @@ def delete( ): r"""Delete an employee's home address - Used for deleting an employee's home address. Cannot delete the employee's active home address. + Used for deleting an employee's home address. Cannot delete the employee's active home address. scope: `employees:write` + :param home_address_uuid: The UUID of the home address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -1012,8 +966,8 @@ def delete( base_url = self._get_url(base_url, url_variables) request = models.DeleteV1HomeAddressesHomeAddressUUIDRequest( - home_address_uuid=home_address_uuid, x_gusto_api_version=x_gusto_api_version, + home_address_uuid=home_address_uuid, ) req = self._build_request( @@ -1026,7 +980,7 @@ def delete( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value="*/*", http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, @@ -1042,9 +996,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1054,41 +1009,24 @@ def delete( retry_config=retry_config, ) - response_data: Any = None if utils.match_response(http_res, "204", "*"): return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData - ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + if utils.match_response(http_res, ["404", "422", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, *, home_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] = models.DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1096,10 +1034,11 @@ async def delete_async( ): r"""Delete an employee's home address - Used for deleting an employee's home address. Cannot delete the employee's active home address. + Used for deleting an employee's home address. Cannot delete the employee's active home address. scope: `employees:write` + :param home_address_uuid: The UUID of the home address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -1118,8 +1057,8 @@ async def delete_async( base_url = self._get_url(base_url, url_variables) request = models.DeleteV1HomeAddressesHomeAddressUUIDRequest( - home_address_uuid=home_address_uuid, x_gusto_api_version=x_gusto_api_version, + home_address_uuid=home_address_uuid, ) req = self._build_request_async( @@ -1132,7 +1071,7 @@ async def delete_async( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value="*/*", http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, @@ -1148,9 +1087,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-home_addresses-home_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1160,41 +1100,24 @@ async def delete_async( retry_config=retry_config, ) - response_data: Any = None if utils.match_response(http_res, "204", "*"): return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData - ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + if utils.match_response(http_res, ["404", "422", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_work_addresses( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1202,11 +1125,12 @@ def get_work_addresses( ) -> List[models.EmployeeWorkAddress]: r"""Get an employee's work addresses - Returns a list of an employee's work addresses. Each address includes its effective date and a boolean - signifying if it is the currently active work address. + Returns a list of an employee's work addresses. Each address includes its effective + date and a boolean signifying if it is the currently active work address. scope: `employees:read` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -1255,9 +1179,10 @@ def get_work_addresses( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-work_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1267,35 +1192,30 @@ def get_work_addresses( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeWorkAddress]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.EmployeeWorkAddress], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_work_addresses_async( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1303,11 +1223,12 @@ async def get_work_addresses_async( ) -> List[models.EmployeeWorkAddress]: r"""Get an employee's work addresses - Returns a list of an employee's work addresses. Each address includes its effective date and a boolean - signifying if it is the currently active work address. + Returns a list of an employee's work addresses. Each address includes its effective + date and a boolean signifying if it is the currently active work address. scope: `employees:read` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -1356,9 +1277,10 @@ async def get_work_addresses_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-work_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1368,35 +1290,30 @@ async def get_work_addresses_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeWorkAddress]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.EmployeeWorkAddress], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create_work_address( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid: Optional[str] = None, effective_date: Optional[date] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1410,6 +1327,7 @@ def create_work_address( scope: `employees:manage` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param location_uuid: Reference to a company location @@ -1471,9 +1389,10 @@ def create_work_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-work_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1485,39 +1404,28 @@ def create_work_address( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_work_address_async( self, *, employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid: Optional[str] = None, effective_date: Optional[date] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1531,6 +1439,7 @@ async def create_work_address_async( scope: `employees:manage` + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param location_uuid: Reference to a company location @@ -1592,9 +1501,10 @@ async def create_work_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-work_addresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1606,39 +1516,28 @@ async def create_work_address_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def retrieve_work_address( self, *, work_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1650,6 +1549,7 @@ def retrieve_work_address( scope: `employees:read` + :param work_address_uuid: The UUID of the work address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -1698,9 +1598,10 @@ def retrieve_work_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1710,35 +1611,30 @@ def retrieve_work_address( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def retrieve_work_address_async( self, *, work_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1750,6 +1646,7 @@ async def retrieve_work_address_async( scope: `employees:read` + :param work_address_uuid: The UUID of the work address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -1798,9 +1695,10 @@ async def retrieve_work_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1810,27 +1708,22 @@ async def retrieve_work_address_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_work_address( self, @@ -1838,8 +1731,8 @@ def update_work_address( work_address_uuid: str, version: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid: Optional[str] = None, effective_date: Optional[date] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1853,8 +1746,9 @@ def update_work_address( scope: `employees:manage` + :param work_address_uuid: The UUID of the work address - :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param location_uuid: Reference to a company location :param effective_date: @@ -1877,9 +1771,9 @@ def update_work_address( work_address_uuid=work_address_uuid, x_gusto_api_version=x_gusto_api_version, request_body=models.PutV1WorkAddressesWorkAddressUUIDRequestBody( + version=version, location_uuid=location_uuid, effective_date=effective_date, - version=version, ), ) @@ -1916,9 +1810,10 @@ def update_work_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1930,31 +1825,20 @@ def update_work_address( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_work_address_async( self, @@ -1962,8 +1846,8 @@ async def update_work_address_async( work_address_uuid: str, version: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, location_uuid: Optional[str] = None, effective_date: Optional[date] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1977,8 +1861,9 @@ async def update_work_address_async( scope: `employees:manage` + :param work_address_uuid: The UUID of the work address - :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param location_uuid: Reference to a company location :param effective_date: @@ -2001,9 +1886,9 @@ async def update_work_address_async( work_address_uuid=work_address_uuid, x_gusto_api_version=x_gusto_api_version, request_body=models.PutV1WorkAddressesWorkAddressUUIDRequestBody( + version=version, location_uuid=location_uuid, effective_date=effective_date, - version=version, ), ) @@ -2040,9 +1925,10 @@ async def update_work_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2054,39 +1940,28 @@ async def update_work_address_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeWorkAddress) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(models.EmployeeWorkAddress, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_work_address( self, *, work_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2094,10 +1969,11 @@ def delete_work_address( ): r"""Delete an employee's work address - Used for deleting an employee's work address. Cannot delete the employee's active work address. + Used for deleting an employee's work address. Cannot delete the employee's active work address. scope: `employees:manage` + :param work_address_uuid: The UUID of the work address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -2146,9 +2022,10 @@ def delete_work_address( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2161,38 +2038,27 @@ def delete_work_address( response_data: Any = None if utils.match_response(http_res, "204", "*"): return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_work_address_async( self, *, work_address_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] = models.DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2200,10 +2066,11 @@ async def delete_work_address_async( ): r"""Delete an employee's work address - Used for deleting an employee's work address. Cannot delete the employee's active work address. + Used for deleting an employee's work address. Cannot delete the employee's active work address. scope: `employees:manage` + :param work_address_uuid: The UUID of the work address :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -2252,9 +2119,10 @@ async def delete_work_address_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-work_addresses-work_address_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2267,27 +2135,16 @@ async def delete_work_address_async( response_data: Any = None if utils.match_response(http_res, "204", "*"): return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/employeebenefits.py b/gusto_embedded/src/gusto_embedded/employeebenefits.py index c2017cbd..923fce72 100644 --- a/gusto_embedded/src/gusto_embedded/employeebenefits.py +++ b/gusto_embedded/src/gusto_embedded/employeebenefits.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -47,7 +48,9 @@ def create( ) -> models.EmployeeBenefit: r"""Create an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -143,9 +146,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -157,31 +161,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -221,7 +214,9 @@ async def create_async( ) -> models.EmployeeBenefit: r"""Create an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only create employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -317,9 +312,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -331,31 +327,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -433,9 +418,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -446,26 +432,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -543,9 +518,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-employee_benefits", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -556,26 +532,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBenefit]) + return unmarshal_json_response(List[models.EmployeeBenefit], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def retrieve( self, @@ -645,9 +610,10 @@ def retrieve( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -658,26 +624,15 @@ def retrieve( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def retrieve_async( self, @@ -747,9 +702,10 @@ async def retrieve_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -760,26 +716,15 @@ async def retrieve_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -819,7 +764,9 @@ def update( ) -> models.EmployeeBenefit: r"""Update an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only update employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -913,9 +860,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -927,31 +875,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -991,7 +928,9 @@ async def update_async( ) -> models.EmployeeBenefit: r"""Update an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only update employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -1085,9 +1024,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1099,31 +1039,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBenefit) + return unmarshal_json_response(models.EmployeeBenefit, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -1139,7 +1068,9 @@ def delete( ): r"""Delete an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only delete employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -1191,9 +1122,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1207,23 +1139,12 @@ def delete( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1239,7 +1160,9 @@ async def delete_async( ): r"""Delete an employee benefit - Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee’s enrollment. + Employee benefits represent an employee enrolled in a particular company benefit. It includes information specific to that employee's enrollment. + + When the application has the `employee_benefits:write:benefit_type_limited` data scope, the application can only delete employee benefits for benefit types that are permitted for the application. scope: `employee_benefits:write` @@ -1291,9 +1214,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employee_benefits-employee_benefit_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1307,23 +1231,12 @@ async def delete_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_ytd_benefit_amounts_from_different_company( self, @@ -1397,9 +1310,10 @@ def get_ytd_benefit_amounts_from_different_company( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-employee-ytd-benefit-amounts-from-different-company", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1410,28 +1324,17 @@ def get_ytd_benefit_amounts_from_different_company( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.YtdBenefitAmountsFromDifferentCompany] + return unmarshal_json_response( + List[models.YtdBenefitAmountsFromDifferentCompany], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_ytd_benefit_amounts_from_different_company_async( self, @@ -1505,9 +1408,10 @@ async def get_ytd_benefit_amounts_from_different_company_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-employee-ytd-benefit-amounts-from-different-company", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1518,28 +1422,17 @@ async def get_ytd_benefit_amounts_from_different_company_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.YtdBenefitAmountsFromDifferentCompany] + return unmarshal_json_response( + List[models.YtdBenefitAmountsFromDifferentCompany], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create_ytd_benefit_amounts_from_different_company( self, @@ -1630,9 +1523,10 @@ def create_ytd_benefit_amounts_from_different_company( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-employee-ytd-benefit-amounts-from-different-company", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1646,29 +1540,18 @@ def create_ytd_benefit_amounts_from_different_company( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_ytd_benefit_amounts_from_different_company_async( self, @@ -1759,9 +1642,10 @@ async def create_ytd_benefit_amounts_from_different_company_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-employee-ytd-benefit-amounts-from-different-company", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1775,26 +1659,15 @@ async def create_ytd_benefit_amounts_from_different_company_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/employeeemployments.py b/gusto_embedded/src/gusto_embedded/employeeemployments.py index 564be922..d86f0b26 100644 --- a/gusto_embedded/src/gusto_embedded/employeeemployments.py +++ b/gusto_embedded/src/gusto_embedded/employeeemployments.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -92,9 +93,10 @@ def create_termination( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -106,31 +108,20 @@ def create_termination( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Termination) + return unmarshal_json_response(models.Termination, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_termination_async( self, @@ -215,9 +206,10 @@ async def create_termination_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -229,31 +221,20 @@ async def create_termination_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Termination) + return unmarshal_json_response(models.Termination, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_terminations( self, @@ -323,9 +304,10 @@ def get_terminations( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -336,26 +318,15 @@ def get_terminations( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Termination]) + return unmarshal_json_response(List[models.Termination], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_terminations_async( self, @@ -425,9 +396,10 @@ async def get_terminations_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -438,26 +410,15 @@ async def get_terminations_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Termination]) + return unmarshal_json_response(List[models.Termination], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_termination( self, @@ -525,9 +486,10 @@ def delete_termination( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -541,29 +503,18 @@ def delete_termination( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_termination_async( self, @@ -631,9 +582,10 @@ async def delete_termination_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-terminations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -647,29 +599,18 @@ async def delete_termination_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_termination( self, @@ -757,9 +698,10 @@ def update_termination( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-terminations-employee_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -771,31 +713,20 @@ def update_termination( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Termination) + return unmarshal_json_response(models.Termination, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_termination_async( self, @@ -883,9 +814,10 @@ async def update_termination_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-terminations-employee_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -897,31 +829,20 @@ async def update_termination_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Termination) + return unmarshal_json_response(models.Termination, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create_rehire( self, @@ -1009,9 +930,10 @@ def create_rehire( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1023,31 +945,20 @@ def create_rehire( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_rehire_async( self, @@ -1135,9 +1046,10 @@ async def create_rehire_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1149,31 +1061,20 @@ async def create_rehire_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def rehire( self, @@ -1270,9 +1171,10 @@ def rehire( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1284,31 +1186,20 @@ def rehire( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def rehire_async( self, @@ -1405,9 +1296,10 @@ async def rehire_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1419,31 +1311,20 @@ async def rehire_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_rehire( self, @@ -1511,9 +1392,10 @@ def get_rehire( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1525,31 +1407,20 @@ def get_rehire( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_rehire_async( self, @@ -1617,9 +1488,10 @@ async def get_rehire_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1631,31 +1503,20 @@ async def get_rehire_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Rehire) + return unmarshal_json_response(models.Rehire, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_rehire( self, @@ -1723,9 +1584,10 @@ def delete_rehire( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1739,29 +1601,18 @@ def delete_rehire( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_rehire_async( self, @@ -1829,9 +1680,10 @@ async def delete_rehire_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-rehire", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1845,29 +1697,18 @@ async def delete_rehire_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_history( self, @@ -1936,9 +1777,10 @@ def get_history( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-employment_history", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1950,33 +1792,20 @@ def get_history( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.EmploymentHistoryList] - ) + return unmarshal_json_response(List[models.EmploymentHistoryList], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_history_async( self, @@ -2045,9 +1874,10 @@ async def get_history_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-employment_history", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2059,30 +1889,17 @@ async def get_history_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.EmploymentHistoryList] - ) + return unmarshal_json_response(List[models.EmploymentHistoryList], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/employeeforms.py b/gusto_embedded/src/gusto_embedded/employeeforms.py index 463553f7..169b8231 100644 --- a/gusto_embedded/src/gusto_embedded/employeeforms.py +++ b/gusto_embedded/src/gusto_embedded/employeeforms.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -91,9 +92,10 @@ def generate_w2( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-sandbox-generate_w2", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -105,33 +107,20 @@ def generate_w2( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.PostV1SandboxGenerateW2Form - ) + return unmarshal_json_response(models.PostV1SandboxGenerateW2Form, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def generate_w2_async( self, @@ -215,9 +204,10 @@ async def generate_w2_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-sandbox-generate_w2", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -229,33 +219,20 @@ async def generate_w2_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.PostV1SandboxGenerateW2Form - ) + return unmarshal_json_response(models.PostV1SandboxGenerateW2Form, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list( self, @@ -323,9 +300,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employee-forms", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -336,26 +314,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Form]) + return unmarshal_json_response(List[models.Form], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -423,9 +390,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employee-forms", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -436,26 +404,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Form]) + return unmarshal_json_response(List[models.Form], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -526,9 +483,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employee-form", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -539,26 +497,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form) + return unmarshal_json_response(models.Form, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -629,9 +576,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employee-form", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -642,26 +590,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form) + return unmarshal_json_response(models.Form, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_pdf( self, @@ -732,9 +669,10 @@ def get_pdf( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employee-form-pdf", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -745,26 +683,15 @@ def get_pdf( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.FormPdf) + return unmarshal_json_response(models.FormPdf, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_pdf_async( self, @@ -835,9 +762,10 @@ async def get_pdf_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employee-form-pdf", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -848,26 +776,15 @@ async def get_pdf_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.FormPdf) + return unmarshal_json_response(models.FormPdf, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def sign( self, @@ -1070,9 +987,10 @@ def sign( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employee-form-sign", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1084,31 +1002,20 @@ def sign( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form) + return unmarshal_json_response(models.Form, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def sign_async( self, @@ -1311,9 +1218,10 @@ async def sign_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employee-form-sign", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1325,28 +1233,17 @@ async def sign_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Form) + return unmarshal_json_response(models.Form, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/employeepaymentmethod_sdk.py b/gusto_embedded/src/gusto_embedded/employeepaymentmethod_sdk.py index 7ea029b5..97b3a339 100644 --- a/gusto_embedded/src/gusto_embedded/employeepaymentmethod_sdk.py +++ b/gusto_embedded/src/gusto_embedded/employeepaymentmethod_sdk.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -98,9 +99,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-bank_accounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -112,31 +114,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBankAccount) + return unmarshal_json_response(models.EmployeeBankAccount, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -227,9 +218,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-bank_accounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -241,31 +233,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBankAccount) + return unmarshal_json_response(models.EmployeeBankAccount, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_bank_account( self, @@ -337,9 +318,10 @@ def delete_bank_account( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-bank_accounts-bank_account_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -353,23 +335,12 @@ def delete_bank_account( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_bank_account_async( self, @@ -441,9 +412,10 @@ async def delete_bank_account_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-bank_accounts-bank_account_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -457,23 +429,12 @@ async def delete_bank_account_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_bank_account( self, @@ -565,9 +526,10 @@ def update_bank_account( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-bank_accounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -579,31 +541,20 @@ def update_bank_account( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBankAccount) + return unmarshal_json_response(models.EmployeeBankAccount, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_bank_account_async( self, @@ -695,9 +646,10 @@ async def update_bank_account_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-bank_accounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -709,31 +661,20 @@ async def update_bank_account_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeBankAccount) + return unmarshal_json_response(models.EmployeeBankAccount, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -803,9 +744,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-payment_method", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -816,26 +758,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeePaymentMethod) + return unmarshal_json_response(models.EmployeePaymentMethod, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -905,9 +836,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-payment_method", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -918,26 +850,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeePaymentMethod) + return unmarshal_json_response(models.EmployeePaymentMethod, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -950,7 +871,10 @@ def update( ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, split_by: Optional[models.PutV1EmployeesEmployeeIDPaymentMethodSplitBy] = None, splits: Optional[ - Union[List[models.Splits], List[models.SplitsTypedDict]] + Union[ + List[models.PutV1EmployeesEmployeeIDPaymentMethodSplits], + List[models.PutV1EmployeesEmployeeIDPaymentMethodSplitsTypedDict], + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -966,9 +890,9 @@ def update( :param employee_id: The UUID of the employee :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. - :param type: The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required. + :param type: The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param split_by: Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. + :param split_by: Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last `split` amount must be `null` to capture the remainder. :param splits: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -992,7 +916,10 @@ def update( version=version, type=type_, split_by=split_by, - splits=utils.get_pydantic_model(splits, Optional[List[models.Splits]]), + splits=utils.get_pydantic_model( + splits, + Optional[List[models.PutV1EmployeesEmployeeIDPaymentMethodSplits]], + ), ), ) @@ -1029,9 +956,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-payment_method", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1043,31 +971,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeePaymentMethod) + return unmarshal_json_response(models.EmployeePaymentMethod, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -1080,7 +997,10 @@ async def update_async( ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, split_by: Optional[models.PutV1EmployeesEmployeeIDPaymentMethodSplitBy] = None, splits: Optional[ - Union[List[models.Splits], List[models.SplitsTypedDict]] + Union[ + List[models.PutV1EmployeesEmployeeIDPaymentMethodSplits], + List[models.PutV1EmployeesEmployeeIDPaymentMethodSplitsTypedDict], + ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1096,9 +1016,9 @@ async def update_async( :param employee_id: The UUID of the employee :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field. - :param type: The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required. + :param type: The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param split_by: Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder. + :param split_by: Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last `split` amount must be `null` to capture the remainder. :param splits: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1122,7 +1042,10 @@ async def update_async( version=version, type=type_, split_by=split_by, - splits=utils.get_pydantic_model(splits, Optional[List[models.Splits]]), + splits=utils.get_pydantic_model( + splits, + Optional[List[models.PutV1EmployeesEmployeeIDPaymentMethodSplits]], + ), ), ) @@ -1159,9 +1082,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-payment_method", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1173,28 +1097,17 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeePaymentMethod) + return unmarshal_json_response(models.EmployeePaymentMethod, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/employeepaymentmethods.py b/gusto_embedded/src/gusto_embedded/employeepaymentmethods.py index 214e5c03..d5344ae7 100644 --- a/gusto_embedded/src/gusto_embedded/employeepaymentmethods.py +++ b/gusto_embedded/src/gusto_embedded/employeepaymentmethods.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import List, Mapping, Optional @@ -81,9 +82,10 @@ def get_bank_accounts( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-bank_accounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -94,26 +96,15 @@ def get_bank_accounts( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBankAccount]) + return unmarshal_json_response(List[models.EmployeeBankAccount], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def get_bank_accounts_async( self, @@ -187,9 +178,10 @@ async def get_bank_accounts_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-bank_accounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -200,23 +192,12 @@ async def get_bank_accounts_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeBankAccount]) + return unmarshal_json_response(List[models.EmployeeBankAccount], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/employees.py b/gusto_embedded/src/gusto_embedded/employees.py index 9f46127a..dbdd1e5c 100644 --- a/gusto_embedded/src/gusto_embedded/employees.py +++ b/gusto_embedded/src/gusto_embedded/employees.py @@ -6,6 +6,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -17,16 +18,23 @@ def list( x_gusto_api_version: Optional[ models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion ] = models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + location_uuid: Optional[str] = None, + payroll_uuid: Optional[str] = None, search_term: Optional[str] = None, + sort_by: Optional[str] = None, include: Optional[List[models.Include]] = None, + onboarded: Optional[bool] = None, + onboarded_active: Optional[bool] = None, terminated: Optional[bool] = None, + terminated_today: Optional[bool] = None, + uuids: Optional[List[str]] = None, page: Optional[int] = None, per: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.Employee]: + ) -> List[models.ShowEmployees]: r"""Get employees of a company Get all of the employees, onboarding, active and terminated, for a given company. @@ -36,9 +44,16 @@ def list( :param company_id: The UUID of the company :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param location_uuid: Filter employees by a specific primary work location + :param payroll_uuid: Filter employees by a specific payroll :param search_term: A string to search for in the object's names - :param include: Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - custom_fields: Include employees' custom fields - :param terminated: Filters employees by the provided boolean + :param sort_by: Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status + :param include: Include the requested attribute(s) in each employee response. Multiple options are comma separated. + :param onboarded: Filters employees by those who have completed onboarding + :param onboarded_active: Filters employees who are ready to work (onboarded AND active today) + :param terminated: Filters employees by those who have been or are scheduled to be terminated + :param terminated_today: Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated) + :param uuids: Optional subset of employees to fetch. :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 :param retries: Override the default retry configuration for this method @@ -59,9 +74,16 @@ def list( request = models.GetV1CompaniesCompanyIDEmployeesRequest( x_gusto_api_version=x_gusto_api_version, company_id=company_id, + location_uuid=location_uuid, + payroll_uuid=payroll_uuid, search_term=search_term, + sort_by=sort_by, include=include, + onboarded=onboarded, + onboarded_active=onboarded_active, terminated=terminated, + terminated_today=terminated_today, + uuids=uuids, page=page, per=per, ) @@ -92,9 +114,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -106,31 +129,20 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Employee]) + return unmarshal_json_response(List[models.ShowEmployees], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -139,16 +151,23 @@ async def list_async( x_gusto_api_version: Optional[ models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion ] = models.GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + location_uuid: Optional[str] = None, + payroll_uuid: Optional[str] = None, search_term: Optional[str] = None, + sort_by: Optional[str] = None, include: Optional[List[models.Include]] = None, + onboarded: Optional[bool] = None, + onboarded_active: Optional[bool] = None, terminated: Optional[bool] = None, + terminated_today: Optional[bool] = None, + uuids: Optional[List[str]] = None, page: Optional[int] = None, per: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.Employee]: + ) -> List[models.ShowEmployees]: r"""Get employees of a company Get all of the employees, onboarding, active and terminated, for a given company. @@ -158,9 +177,16 @@ async def list_async( :param company_id: The UUID of the company :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param location_uuid: Filter employees by a specific primary work location + :param payroll_uuid: Filter employees by a specific payroll :param search_term: A string to search for in the object's names - :param include: Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - custom_fields: Include employees' custom fields - :param terminated: Filters employees by the provided boolean + :param sort_by: Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status + :param include: Include the requested attribute(s) in each employee response. Multiple options are comma separated. + :param onboarded: Filters employees by those who have completed onboarding + :param onboarded_active: Filters employees who are ready to work (onboarded AND active today) + :param terminated: Filters employees by those who have been or are scheduled to be terminated + :param terminated_today: Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated) + :param uuids: Optional subset of employees to fetch. :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 :param retries: Override the default retry configuration for this method @@ -181,9 +207,16 @@ async def list_async( request = models.GetV1CompaniesCompanyIDEmployeesRequest( x_gusto_api_version=x_gusto_api_version, company_id=company_id, + location_uuid=location_uuid, + payroll_uuid=payroll_uuid, search_term=search_term, + sort_by=sort_by, include=include, + onboarded=onboarded, + onboarded_active=onboarded_active, terminated=terminated, + terminated_today=terminated_today, + uuids=uuids, page=page, per=per, ) @@ -214,9 +247,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -228,31 +262,20 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Employee]) + return unmarshal_json_response(List[models.ShowEmployees], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create( self, @@ -265,6 +288,7 @@ def create( ] = models.PostV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, middle_initial: Optional[str] = None, email: Optional[str] = None, + work_email: Optional[str] = None, date_of_birth: Optional[date] = None, ssn: Optional[str] = None, preferred_first_name: Optional[str] = None, @@ -287,6 +311,7 @@ def create( :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param middle_initial: :param email: The employee's personal email address. + :param work_email: The employee's work email address. :param date_of_birth: :param ssn: :param preferred_first_name: @@ -314,6 +339,7 @@ def create( middle_initial=middle_initial, last_name=last_name, email=email, + work_email=work_email, date_of_birth=date_of_birth, ssn=ssn, preferred_first_name=preferred_first_name, @@ -354,9 +380,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -368,31 +395,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -405,6 +421,7 @@ async def create_async( ] = models.PostV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, middle_initial: Optional[str] = None, email: Optional[str] = None, + work_email: Optional[str] = None, date_of_birth: Optional[date] = None, ssn: Optional[str] = None, preferred_first_name: Optional[str] = None, @@ -427,6 +444,7 @@ async def create_async( :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param middle_initial: :param email: The employee's personal email address. + :param work_email: The employee's work email address. :param date_of_birth: :param ssn: :param preferred_first_name: @@ -454,6 +472,7 @@ async def create_async( middle_initial=middle_initial, last_name=last_name, email=email, + work_email=work_email, date_of_birth=date_of_birth, ssn=ssn, preferred_first_name=preferred_first_name, @@ -494,9 +513,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -508,32 +528,239 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_v1_companies_company_id_employees_payment_details( + self, + *, + company_id: str, + employee_uuid: Optional[str] = None, + payroll_uuid: Optional[str] = None, + page: Optional[int] = None, + per: Optional[int] = None, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.EmployeePaymentDetail]: + r"""Get employee payment details for a company + + Fetches payment details for employees in a given company. Results are paginated. + + Use the `employee_uuid` query parameter to filter for a single employee. + Use the `payroll_uuid` query parameter to filter for employees on a specific payroll. + Providing both `employee_uuid` and `payroll_uuid` will result in a 400 error. + An empty array is returned if the company has no employees or if no employees match the filter criteria. + + The `encrypted_account_number` in the `splits` array is only visible if the `employee_payment_methods:read:account_number` scope is present. + + Base scope: `employee_payment_methods:read` + + :param company_id: The UUID of the company + :param employee_uuid: The UUID of a specific employee to fetch payment details for. + :param payroll_uuid: The UUID of a specific payroll to fetch payment details for employees on that payroll. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1CompaniesCompanyIDEmployeesPaymentDetailsRequest( + company_id=company_id, + employee_uuid=employee_uuid, + payroll_uuid=payroll_uuid, + page=page, + per=per, + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request( + method="GET", + path="/v1/companies/{company_id}/employees/payment_details", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-employees-payment_details", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.EmployeePaymentDetail], http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_companies_company_id_employees_payment_details_async( + self, + *, + company_id: str, + employee_uuid: Optional[str] = None, + payroll_uuid: Optional[str] = None, + page: Optional[int] = None, + per: Optional[int] = None, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.EmployeePaymentDetail]: + r"""Get employee payment details for a company + + Fetches payment details for employees in a given company. Results are paginated. + + Use the `employee_uuid` query parameter to filter for a single employee. + Use the `payroll_uuid` query parameter to filter for employees on a specific payroll. + Providing both `employee_uuid` and `payroll_uuid` will result in a 400 error. + An empty array is returned if the company has no employees or if no employees match the filter criteria. + + The `encrypted_account_number` in the `splits` array is only visible if the `employee_payment_methods:read:account_number` scope is present. + + Base scope: `employee_payment_methods:read` + + :param company_id: The UUID of the company + :param employee_uuid: The UUID of a specific employee to fetch payment details for. + :param payroll_uuid: The UUID of a specific payroll to fetch payment details for employees on that payroll. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, + request = models.GetV1CompaniesCompanyIDEmployeesPaymentDetailsRequest( + company_id=company_id, + employee_uuid=employee_uuid, + payroll_uuid=payroll_uuid, + page=page, + per=per, + x_gusto_api_version=x_gusto_api_version, ) + req = self._build_request_async( + method="GET", + path="/v1/companies/{company_id}/employees/payment_details", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-employees-payment_details", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.EmployeePaymentDetail], http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + def create_historical( self, *, @@ -661,9 +888,10 @@ def create_historical( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-historical_employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -675,31 +903,20 @@ def create_historical( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_historical_async( self, @@ -828,9 +1045,10 @@ async def create_historical_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-historical_employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -842,31 +1060,20 @@ async def create_historical_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -890,7 +1097,7 @@ def get( :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param include: Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - custom_fields: Include employees' custom fields + :param include: Include the requested attribute(s) in each employee response. Multiple options are comma separated. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -938,9 +1145,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -950,27 +1158,22 @@ def get( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.Employee, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -994,7 +1197,7 @@ async def get_async( :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param include: Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - custom_fields: Include employees' custom fields + :param include: Include the requested attribute(s) in each employee response. Multiple options are comma separated. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1042,9 +1245,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1054,38 +1258,36 @@ async def get_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.Employee, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, *, employee_id: str, version: str, - x_gusto_api_version: Optional[str] = None, + x_gusto_api_version: Optional[ + models.PutV1EmployeesHeaderXGustoAPIVersion + ] = models.PutV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, first_name: Optional[str] = None, middle_initial: OptionalNullable[str] = UNSET, last_name: Optional[str] = None, email: Optional[str] = None, + work_email: Optional[str] = None, date_of_birth: Optional[str] = None, ssn: Optional[str] = None, preferred_first_name: OptionalNullable[str] = UNSET, @@ -1104,11 +1306,12 @@ def update( :param employee_id: The UUID of the employee :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. - :param x_gusto_api_version: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param first_name: :param middle_initial: :param last_name: :param email: + :param work_email: :param date_of_birth: :param ssn: :param preferred_first_name: @@ -1137,6 +1340,7 @@ def update( middle_initial=middle_initial, last_name=last_name, email=email, + work_email=work_email, date_of_birth=date_of_birth, ssn=ssn, preferred_first_name=preferred_first_name, @@ -1177,9 +1381,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1191,42 +1396,34 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, ["404", "409", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, *, employee_id: str, version: str, - x_gusto_api_version: Optional[str] = None, + x_gusto_api_version: Optional[ + models.PutV1EmployeesHeaderXGustoAPIVersion + ] = models.PutV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, first_name: Optional[str] = None, middle_initial: OptionalNullable[str] = UNSET, last_name: Optional[str] = None, email: Optional[str] = None, + work_email: Optional[str] = None, date_of_birth: Optional[str] = None, ssn: Optional[str] = None, preferred_first_name: OptionalNullable[str] = UNSET, @@ -1245,11 +1442,12 @@ async def update_async( :param employee_id: The UUID of the employee :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. - :param x_gusto_api_version: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param first_name: :param middle_initial: :param last_name: :param email: + :param work_email: :param date_of_birth: :param ssn: :param preferred_first_name: @@ -1278,6 +1476,7 @@ async def update_async( middle_initial=middle_initial, last_name=last_name, email=email, + work_email=work_email, date_of_birth=date_of_birth, ssn=ssn, preferred_first_name=preferred_first_name, @@ -1318,9 +1517,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1332,31 +1532,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, ["404", "409", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -1427,9 +1616,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employee", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1443,23 +1633,12 @@ def delete( return if utils.match_response(http_res, ["404", "422", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1530,9 +1709,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employee", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1546,23 +1726,12 @@ async def delete_async( return if utils.match_response(http_res, ["404", "422", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_custom_fields( self, @@ -1636,9 +1805,10 @@ def get_custom_fields( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-custom_fields", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1649,28 +1819,17 @@ def get_custom_fields( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.GetV1EmployeesEmployeeIDCustomFieldsResponseBody + return unmarshal_json_response( + models.GetV1EmployeesEmployeeIDCustomFieldsResponseBody, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_custom_fields_async( self, @@ -1744,9 +1903,10 @@ async def get_custom_fields_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-custom_fields", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1757,28 +1917,17 @@ async def get_custom_fields_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.GetV1EmployeesEmployeeIDCustomFieldsResponseBody + return unmarshal_json_response( + models.GetV1EmployeesEmployeeIDCustomFieldsResponseBody, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_onboarding_documents_config( self, @@ -1858,9 +2007,10 @@ def update_onboarding_documents_config( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-onboarding_documents_config", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1871,28 +2021,15 @@ def update_onboarding_documents_config( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.EmployeeOnboardingDocument - ) + return unmarshal_json_response(models.EmployeeOnboardingDocument, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_onboarding_documents_config_async( self, @@ -1972,9 +2109,10 @@ async def update_onboarding_documents_config_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-onboarding_documents_config", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1985,28 +2123,15 @@ async def update_onboarding_documents_config_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.EmployeeOnboardingDocument - ) + return unmarshal_json_response(models.EmployeeOnboardingDocument, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_onboarding_status( self, @@ -2111,9 +2236,10 @@ def get_onboarding_status( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-onboarding_status", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2123,27 +2249,22 @@ def get_onboarding_status( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeOnboardingStatus) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.EmployeeOnboardingStatus, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_onboarding_status_async( self, @@ -2248,9 +2369,10 @@ async def get_onboarding_status_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-onboarding_status", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2260,27 +2382,22 @@ async def get_onboarding_status_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeOnboardingStatus) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.EmployeeOnboardingStatus, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_onboarding_status( self, @@ -2370,9 +2487,10 @@ def update_onboarding_status( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-onboarding_status", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2384,31 +2502,20 @@ def update_onboarding_status( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeOnboardingStatus) + return unmarshal_json_response(models.EmployeeOnboardingStatus, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_onboarding_status_async( self, @@ -2498,9 +2605,10 @@ async def update_onboarding_status_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-onboarding_status", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2512,31 +2620,20 @@ async def update_onboarding_status_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeOnboardingStatus) + return unmarshal_json_response(models.EmployeeOnboardingStatus, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_time_off_activities( self, @@ -2607,9 +2704,10 @@ def get_time_off_activities( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-version-employees-time_off_activities", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2620,26 +2718,15 @@ def get_time_off_activities( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffActivity) + return unmarshal_json_response(models.TimeOffActivity, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_time_off_activities_async( self, @@ -2710,9 +2797,10 @@ async def get_time_off_activities_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-version-employees-time_off_activities", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2723,23 +2811,12 @@ async def get_time_off_activities_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffActivity) + return unmarshal_json_response(models.TimeOffActivity, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/employeetaxsetup.py b/gusto_embedded/src/gusto_embedded/employeetaxsetup.py index ca52e880..eeab1217 100644 --- a/gusto_embedded/src/gusto_embedded/employeetaxsetup.py +++ b/gusto_embedded/src/gusto_embedded/employeetaxsetup.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -75,9 +76,10 @@ def get_federal_taxes( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-federal_taxes", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,26 +90,15 @@ def get_federal_taxes( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeFederalTax) + return unmarshal_json_response(models.EmployeeFederalTax, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_federal_taxes_async( self, @@ -175,9 +166,10 @@ async def get_federal_taxes_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-federal_taxes", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -188,26 +180,15 @@ async def get_federal_taxes_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeFederalTax) + return unmarshal_json_response(models.EmployeeFederalTax, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_federal_taxes( self, @@ -308,9 +289,10 @@ def update_federal_taxes( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-federal_taxes", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -322,31 +304,20 @@ def update_federal_taxes( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeFederalTax) + return unmarshal_json_response(models.EmployeeFederalTax, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_federal_taxes_async( self, @@ -447,9 +418,10 @@ async def update_federal_taxes_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-federal_taxes", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -461,44 +433,33 @@ async def update_federal_taxes_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.EmployeeFederalTax) + return unmarshal_json_response(models.EmployeeFederalTax, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_state_taxes( self, *, employee_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.EmployeeStateTax]: + ) -> List[models.EmployeeStateTaxesList]: r"""Get an employee's state taxes Get attributes relevant for an employee's state taxes. @@ -535,8 +496,8 @@ def get_state_taxes( base_url = self._get_url(base_url, url_variables) request = models.GetV1EmployeesEmployeeIDStateTaxesRequest( - employee_uuid=employee_uuid, x_gusto_api_version=x_gusto_api_version, + employee_uuid=employee_uuid, ) req = self._build_request( @@ -565,9 +526,10 @@ def get_state_taxes( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-state_taxes", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -577,40 +539,37 @@ def get_state_taxes( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeStateTax]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response( + List[models.EmployeeStateTaxesList], http_res ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_state_taxes_async( self, *, employee_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.EmployeeStateTax]: + ) -> List[models.EmployeeStateTaxesList]: r"""Get an employee's state taxes Get attributes relevant for an employee's state taxes. @@ -647,8 +606,8 @@ async def get_state_taxes_async( base_url = self._get_url(base_url, url_variables) request = models.GetV1EmployeesEmployeeIDStateTaxesRequest( - employee_uuid=employee_uuid, x_gusto_api_version=x_gusto_api_version, + employee_uuid=employee_uuid, ) req = self._build_request_async( @@ -677,9 +636,10 @@ async def get_state_taxes_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-state_taxes", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -689,27 +649,24 @@ async def get_state_taxes_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeStateTax]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response( + List[models.EmployeeStateTaxesList], http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_state_taxes( self, @@ -717,13 +674,13 @@ def update_state_taxes( employee_uuid: str, states: Union[List[models.States], List[models.StatesTypedDict]], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion + ] = models.PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.EmployeeStateTax]: + ) -> List[models.EmployeeStateTaxesList]: r"""Update an employee's state taxes Update attributes relevant for an employee's state taxes. @@ -732,6 +689,7 @@ def update_state_taxes( scope: `employee_state_taxes:write` + :param employee_uuid: The UUID of the employee :param states: :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. @@ -751,9 +709,9 @@ def update_state_taxes( base_url = self._get_url(base_url, url_variables) request = models.PutV1EmployeesEmployeeIDStateTaxesRequest( - employee_uuid=employee_uuid, x_gusto_api_version=x_gusto_api_version, - request_body=models.PutV1EmployeesEmployeeIDStateTaxesRequestBody( + employee_uuid=employee_uuid, + employee_state_taxes_request=models.EmployeeStateTaxesRequest( states=utils.get_pydantic_model(states, List[models.States]), ), ) @@ -772,11 +730,11 @@ def update_state_taxes( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, + request.employee_state_taxes_request, False, False, "json", - models.PutV1EmployeesEmployeeIDStateTaxesRequestBody, + models.EmployeeStateTaxesRequest, ), timeout_ms=timeout_ms, ) @@ -791,9 +749,10 @@ def update_state_taxes( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-state_taxes", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -805,31 +764,22 @@ def update_state_taxes( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeStateTax]) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response( + List[models.EmployeeStateTaxesList], http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_state_taxes_async( self, @@ -837,13 +787,13 @@ async def update_state_taxes_async( employee_uuid: str, states: Union[List[models.States], List[models.StatesTypedDict]], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion + ] = models.PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.EmployeeStateTax]: + ) -> List[models.EmployeeStateTaxesList]: r"""Update an employee's state taxes Update attributes relevant for an employee's state taxes. @@ -852,6 +802,7 @@ async def update_state_taxes_async( scope: `employee_state_taxes:write` + :param employee_uuid: The UUID of the employee :param states: :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. @@ -871,9 +822,9 @@ async def update_state_taxes_async( base_url = self._get_url(base_url, url_variables) request = models.PutV1EmployeesEmployeeIDStateTaxesRequest( - employee_uuid=employee_uuid, x_gusto_api_version=x_gusto_api_version, - request_body=models.PutV1EmployeesEmployeeIDStateTaxesRequestBody( + employee_uuid=employee_uuid, + employee_state_taxes_request=models.EmployeeStateTaxesRequest( states=utils.get_pydantic_model(states, List[models.States]), ), ) @@ -892,11 +843,11 @@ async def update_state_taxes_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, + request.employee_state_taxes_request, False, False, "json", - models.PutV1EmployeesEmployeeIDStateTaxesRequestBody, + models.EmployeeStateTaxesRequest, ), timeout_ms=timeout_ms, ) @@ -911,9 +862,10 @@ async def update_state_taxes_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-state_taxes", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -925,28 +877,19 @@ async def update_state_taxes_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.EmployeeStateTax]) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response( + List[models.EmployeeStateTaxesList], http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/events.py b/gusto_embedded/src/gusto_embedded/events.py index 6fa281fa..6999b3ca 100644 --- a/gusto_embedded/src/gusto_embedded/events.py +++ b/gusto_embedded/src/gusto_embedded/events.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import List, Mapping, Optional, Union @@ -93,6 +94,7 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-events", oauth2_scopes=None, @@ -104,26 +106,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Event]) + return unmarshal_json_response(List[models.Event], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -209,6 +200,7 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-events", oauth2_scopes=None, @@ -220,23 +212,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Event]) + return unmarshal_json_response(List[models.Event], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/externalpayrolls.py b/gusto_embedded/src/gusto_embedded/externalpayrolls.py index d86a9a2e..76a3195a 100644 --- a/gusto_embedded/src/gusto_embedded/externalpayrolls.py +++ b/gusto_embedded/src/gusto_embedded/externalpayrolls.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -93,9 +94,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-external-payroll", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -107,31 +109,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ExternalPayroll) + return unmarshal_json_response(models.ExternalPayroll, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -217,9 +208,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-external-payroll", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -231,31 +223,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ExternalPayroll) + return unmarshal_json_response(models.ExternalPayroll, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -323,9 +304,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-external-payrolls", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -336,28 +318,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.ExternalPayrollBasic] - ) + return unmarshal_json_response(List[models.ExternalPayrollBasic], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -425,9 +394,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-external-payrolls", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -438,28 +408,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.ExternalPayrollBasic] - ) + return unmarshal_json_response(List[models.ExternalPayrollBasic], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def retrieve( self, @@ -530,9 +487,10 @@ def retrieve( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-external-payroll", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -543,26 +501,15 @@ def retrieve( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ExternalPayroll) + return unmarshal_json_response(models.ExternalPayroll, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def retrieve_async( self, @@ -633,9 +580,10 @@ async def retrieve_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-external-payroll", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -646,26 +594,15 @@ async def retrieve_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ExternalPayroll) + return unmarshal_json_response(models.ExternalPayroll, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -736,9 +673,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-external-payroll", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -752,23 +690,12 @@ def delete( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -839,9 +766,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-external-payroll", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -855,23 +783,12 @@ async def delete_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -965,9 +882,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-external-payroll", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -979,31 +897,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ExternalPayroll) + return unmarshal_json_response(models.ExternalPayroll, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -1097,9 +1004,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-external-payroll", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1111,31 +1019,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ExternalPayroll) + return unmarshal_json_response(models.ExternalPayroll, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def calculate_taxes( self, @@ -1208,9 +1105,10 @@ def calculate_taxes( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-external-payroll-calculate-taxes", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1221,28 +1119,17 @@ def calculate_taxes( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.ExternalPayrollTaxSuggestions] + return unmarshal_json_response( + List[models.ExternalPayrollTaxSuggestions], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def calculate_taxes_async( self, @@ -1315,9 +1202,10 @@ async def calculate_taxes_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-external-payroll-calculate-taxes", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1328,28 +1216,17 @@ async def calculate_taxes_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.ExternalPayrollTaxSuggestions] + return unmarshal_json_response( + List[models.ExternalPayrollTaxSuggestions], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list_tax_liabilities( self, @@ -1417,9 +1294,10 @@ def list_tax_liabilities( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-tax-liabilities", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1430,28 +1308,17 @@ def list_tax_liabilities( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[List[models.TaxLiabilitiesSelections]] + return unmarshal_json_response( + List[List[models.TaxLiabilitiesSelections]], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_tax_liabilities_async( self, @@ -1519,9 +1386,10 @@ async def list_tax_liabilities_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-tax-liabilities", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1532,28 +1400,17 @@ async def list_tax_liabilities_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[List[models.TaxLiabilitiesSelections]] + return unmarshal_json_response( + List[List[models.TaxLiabilitiesSelections]], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_tax_liabilities( self, @@ -1640,9 +1497,10 @@ def update_tax_liabilities( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-tax-liabilities", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1654,33 +1512,22 @@ def update_tax_liabilities( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[List[models.TaxLiabilitiesSelections]] + return unmarshal_json_response( + List[List[models.TaxLiabilitiesSelections]], http_res ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_tax_liabilities_async( self, @@ -1767,9 +1614,10 @@ async def update_tax_liabilities_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-tax-liabilities", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1781,33 +1629,22 @@ async def update_tax_liabilities_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[List[models.TaxLiabilitiesSelections]] + return unmarshal_json_response( + List[List[models.TaxLiabilitiesSelections]], http_res ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def finalize_tax_liabilities( self, @@ -1875,9 +1712,10 @@ def finalize_tax_liabilities( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-tax-liabilities-finish", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1891,29 +1729,18 @@ def finalize_tax_liabilities( if utils.match_response(http_res, "202", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def finalize_tax_liabilities_async( self, @@ -1981,9 +1808,10 @@ async def finalize_tax_liabilities_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-tax-liabilities-finish", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1997,26 +1825,15 @@ async def finalize_tax_liabilities_async( if utils.match_response(http_res, "202", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/federaltaxdetails_sdk.py b/gusto_embedded/src/gusto_embedded/federaltaxdetails_sdk.py index 96b5cadb..53485565 100644 --- a/gusto_embedded/src/gusto_embedded/federaltaxdetails_sdk.py +++ b/gusto_embedded/src/gusto_embedded/federaltaxdetails_sdk.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Mapping, Optional @@ -75,9 +76,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-federal_tax_details", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,26 +90,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.FederalTaxDetails) + return unmarshal_json_response(models.FederalTaxDetails, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -175,9 +166,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-federal_tax_details", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -188,26 +180,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.FederalTaxDetails) + return unmarshal_json_response(models.FederalTaxDetails, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -303,9 +284,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-federal_tax_details", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -317,31 +299,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.FederalTaxDetails) + return unmarshal_json_response(models.FederalTaxDetails, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -437,9 +408,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-federal_tax_details", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -451,28 +423,17 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.FederalTaxDetails) + return unmarshal_json_response(models.FederalTaxDetails, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/flows.py b/gusto_embedded/src/gusto_embedded/flows.py index f01be17f..3836372b 100644 --- a/gusto_embedded/src/gusto_embedded/flows.py +++ b/gusto_embedded/src/gusto_embedded/flows.py @@ -5,7 +5,8 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env -from typing import Any, Mapping, Optional +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Dict, Mapping, Optional class Flows(BaseSDK): @@ -19,6 +20,7 @@ def create( ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, entity_uuid: Optional[str] = None, entity_type: Optional[models.PostV1CompanyFlowsEntityType] = None, + options: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -35,6 +37,7 @@ def create( :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param entity_uuid: UUID of the target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details. :param entity_type: the type of target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details. + :param options: Optional configuration object that varies based on the flow_type. This can contain arbitrary key-value pairs specific to the flow being generated (e.g., { \"provider\": \"guideline\" }). :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -57,6 +60,7 @@ def create( flow_type=flow_type, entity_uuid=entity_uuid, entity_type=entity_type, + options=options, ), ) @@ -93,9 +97,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-company-flows", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -107,31 +112,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Flow) + return unmarshal_json_response(models.Flow, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -143,6 +137,7 @@ async def create_async( ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, entity_uuid: Optional[str] = None, entity_type: Optional[models.PostV1CompanyFlowsEntityType] = None, + options: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -159,6 +154,7 @@ async def create_async( :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param entity_uuid: UUID of the target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details. :param entity_type: the type of target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details. + :param options: Optional configuration object that varies based on the flow_type. This can contain arbitrary key-value pairs specific to the flow being generated (e.g., { \"provider\": \"guideline\" }). :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -181,6 +177,7 @@ async def create_async( flow_type=flow_type, entity_uuid=entity_uuid, entity_type=entity_type, + options=options, ), ) @@ -217,9 +214,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-company-flows", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -231,28 +229,17 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Flow) + return unmarshal_json_response(models.Flow, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/garnishments.py b/gusto_embedded/src/gusto_embedded/garnishments.py index 645c9001..70b68d18 100644 --- a/gusto_embedded/src/gusto_embedded/garnishments.py +++ b/gusto_embedded/src/gusto_embedded/garnishments.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -128,9 +129,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-garnishments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -142,31 +144,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -287,9 +278,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-employees-employee_id-garnishments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -301,31 +293,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list( self, @@ -399,9 +380,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-garnishments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -412,26 +394,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Garnishment]) + return unmarshal_json_response(List[models.Garnishment], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -505,9 +476,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-garnishments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -518,26 +490,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Garnishment]) + return unmarshal_json_response(List[models.Garnishment], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -605,9 +566,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-garnishments-garnishment_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -618,26 +580,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -705,9 +656,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-garnishments-garnishment_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -718,26 +670,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -856,9 +797,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-garnishments-garnishment_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -870,31 +812,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -1013,9 +944,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-garnishments-garnishment_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1027,31 +959,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Garnishment) + return unmarshal_json_response(models.Garnishment, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_child_support_data( self, @@ -1116,9 +1037,10 @@ def get_child_support_data( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-garnishments-child_support", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1129,26 +1051,15 @@ def get_child_support_data( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ChildSupportData) + return unmarshal_json_response(models.ChildSupportData, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_child_support_data_async( self, @@ -1213,9 +1124,10 @@ async def get_child_support_data_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-garnishments-child_support", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1226,23 +1138,12 @@ async def get_child_support_data_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ChildSupportData) + return unmarshal_json_response(models.ChildSupportData, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/generateddocuments.py b/gusto_embedded/src/gusto_embedded/generateddocuments.py index 3a40190f..7fe5ad3d 100644 --- a/gusto_embedded/src/gusto_embedded/generateddocuments.py +++ b/gusto_embedded/src/gusto_embedded/generateddocuments.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional @@ -78,9 +79,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-generated_documents-document_type-request_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -91,26 +93,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.GeneratedDocument) + return unmarshal_json_response(models.GeneratedDocument, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -181,9 +172,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-generated_documents-document_type-request_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -194,23 +186,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.GeneratedDocument) + return unmarshal_json_response(models.GeneratedDocument, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/historicalemployees.py b/gusto_embedded/src/gusto_embedded/historicalemployees.py index accc91b0..36de458c 100644 --- a/gusto_embedded/src/gusto_embedded/historicalemployees.py +++ b/gusto_embedded/src/gusto_embedded/historicalemployees.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union @@ -152,9 +153,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-historical_employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -165,26 +167,15 @@ def update( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -329,9 +320,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-historical_employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -342,23 +334,12 @@ async def update_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Employee) + return unmarshal_json_response(models.Employee, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/holidaypaypolicies.py b/gusto_embedded/src/gusto_embedded/holidaypaypolicies.py index 6e61e168..730f72a6 100644 --- a/gusto_embedded/src/gusto_embedded/holidaypaypolicies.py +++ b/gusto_embedded/src/gusto_embedded/holidaypaypolicies.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -75,9 +76,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-holiday_pay_policy", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,26 +90,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.HolidayPayPolicy) + return unmarshal_json_response(models.HolidayPayPolicy, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -175,9 +166,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-holiday_pay_policy", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -188,26 +180,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.HolidayPayPolicy) + return unmarshal_json_response(models.HolidayPayPolicy, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create( self, @@ -297,9 +278,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-companies-company_uuid-holiday_pay_policy", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -311,31 +293,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.HolidayPayPolicy) + return unmarshal_json_response(models.HolidayPayPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -425,9 +396,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-companies-company_uuid-holiday_pay_policy", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -439,31 +411,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.HolidayPayPolicy) + return unmarshal_json_response(models.HolidayPayPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -556,9 +517,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-companies-company_uuid-holiday_pay_policy", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -570,31 +532,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.HolidayPayPolicy) + return unmarshal_json_response(models.HolidayPayPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -687,9 +638,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-companies-company_uuid-holiday_pay_policy", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -701,31 +653,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.HolidayPayPolicy) + return unmarshal_json_response(models.HolidayPayPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -793,9 +734,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-companies-company_uuid-holiday_pay_policy", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -809,29 +751,18 @@ def delete( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -899,9 +830,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-companies-company_uuid-holiday_pay_policy", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -915,29 +847,18 @@ async def delete_async( if utils.match_response(http_res, "204", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def add_employees( self, @@ -1032,9 +953,10 @@ def add_employees( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-companies-company_uuid-holiday_pay_policy-add", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1046,31 +968,20 @@ def add_employees( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.HolidayPayPolicy) + return unmarshal_json_response(models.HolidayPayPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def add_employees_async( self, @@ -1165,9 +1076,10 @@ async def add_employees_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-companies-company_uuid-holiday_pay_policy-add", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1179,31 +1091,20 @@ async def add_employees_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.HolidayPayPolicy) + return unmarshal_json_response(models.HolidayPayPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def remove_employees( self, @@ -1300,9 +1201,10 @@ def remove_employees( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-companies-company_uuid-holiday_pay_policy-remove", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1314,31 +1216,20 @@ def remove_employees( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.HolidayPayPolicy) + return unmarshal_json_response(models.HolidayPayPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def remove_employees_async( self, @@ -1435,9 +1326,10 @@ async def remove_employees_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-companies-company_uuid-holiday_pay_policy-remove", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1449,31 +1341,20 @@ async def remove_employees_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.HolidayPayPolicy) + return unmarshal_json_response(models.HolidayPayPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def preview_paid_holidays( self, @@ -1553,9 +1434,10 @@ def preview_paid_holidays( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-paid_holidays", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1567,31 +1449,20 @@ def preview_paid_holidays( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PaidHolidays) + return unmarshal_json_response(models.PaidHolidays, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def preview_paid_holidays_async( self, @@ -1671,9 +1542,10 @@ async def preview_paid_holidays_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-paid_holidays", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1685,28 +1557,17 @@ async def preview_paid_holidays_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PaidHolidays) + return unmarshal_json_response(models.PaidHolidays, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/httpclient.py b/gusto_embedded/src/gusto_embedded/httpclient.py index ad528d8d..89560b56 100644 --- a/gusto_embedded/src/gusto_embedded/httpclient.py +++ b/gusto_embedded/src/gusto_embedded/httpclient.py @@ -107,7 +107,6 @@ def close_clients( # to them from the owning SDK instance and they can be reaped. owner.client = None owner.async_client = None - if sync_client is not None and not sync_client_supplied: try: sync_client.close() @@ -115,42 +114,12 @@ def close_clients( pass if async_client is not None and not async_client_supplied: - # First, try the simplest approach - use asyncio.run() - # This works when we're not in an async context try: - asyncio.run(async_client.aclose()) - except RuntimeError as e: - # If we get "RuntimeError: This event loop is already running", - # it means we're in an async context - if "already running" in str(e): - try: - # We're in an async context, so get the running loop - loop = asyncio.get_running_loop() - # Create a task but don't wait for it - loop.create_task(async_client.aclose()) - except Exception: - # If we can't get the loop or create a task, just ignore - # The GC will eventually clean up the resources - pass - # If we get "RuntimeError: There is no current event loop in thread", - # we're not in an async context, but asyncio.run() failed for some reason - # In this case, we can try to create a new event loop explicitly - elif "no current event loop" in str(e): - try: - # Create a new event loop and run the coroutine - loop = asyncio.new_event_loop() - asyncio.set_event_loop(loop) - try: - loop.run_until_complete(async_client.aclose()) - finally: - loop.close() - asyncio.set_event_loop(None) - except Exception: - # If this also fails, just ignore - pass - # For any other RuntimeError, just ignore - else: + loop = asyncio.get_running_loop() + asyncio.run_coroutine_threadsafe(async_client.aclose(), loop) + except RuntimeError: + try: + asyncio.run(async_client.aclose()) + except RuntimeError: + # best effort pass - except Exception: - # For any other exception, just ignore - pass diff --git a/gusto_embedded/src/gusto_embedded/i9verification.py b/gusto_embedded/src/gusto_embedded/i9verification.py index 2e5cdd73..63e2e3ab 100644 --- a/gusto_embedded/src/gusto_embedded/i9verification.py +++ b/gusto_embedded/src/gusto_embedded/i9verification.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -77,9 +78,10 @@ def get_authorization( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-i9_authorization", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -90,26 +92,15 @@ def get_authorization( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.I9Authorization) + return unmarshal_json_response(models.I9Authorization, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_authorization_async( self, @@ -179,9 +170,10 @@ async def get_authorization_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-i9_authorization", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -192,26 +184,15 @@ async def get_authorization_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.I9Authorization) + return unmarshal_json_response(models.I9Authorization, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -326,9 +307,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-i9_authorization", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -340,31 +322,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.I9Authorization) + return unmarshal_json_response(models.I9Authorization, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -479,9 +450,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-i9_authorization", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -493,31 +465,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.I9Authorization) + return unmarshal_json_response(models.I9Authorization, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_document_options( self, @@ -585,9 +546,10 @@ def get_document_options( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-i9_authorization-document_options", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -598,28 +560,17 @@ def get_document_options( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.I9AuthorizationDocumentOption] + return unmarshal_json_response( + List[models.I9AuthorizationDocumentOption], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_document_options_async( self, @@ -687,9 +638,10 @@ async def get_document_options_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-i9_authorization-document_options", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -700,28 +652,17 @@ async def get_document_options_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.I9AuthorizationDocumentOption] + return unmarshal_json_response( + List[models.I9AuthorizationDocumentOption], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_documents( self, @@ -789,9 +730,10 @@ def get_documents( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-i9_authorization-documents", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -802,28 +744,17 @@ def get_documents( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.I9AuthorizationDocument] + return unmarshal_json_response( + List[models.I9AuthorizationDocument], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_documents_async( self, @@ -891,9 +822,10 @@ async def get_documents_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-i9_authorization-documents", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -904,28 +836,17 @@ async def get_documents_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.I9AuthorizationDocument] + return unmarshal_json_response( + List[models.I9AuthorizationDocument], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create_documents( self, @@ -1012,9 +933,10 @@ def create_documents( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-i9_authorization-documents", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1026,33 +948,22 @@ def create_documents( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.I9AuthorizationDocument] + return unmarshal_json_response( + List[models.I9AuthorizationDocument], http_res ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_documents_async( self, @@ -1139,9 +1050,10 @@ async def create_documents_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-i9_authorization-documents", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1153,33 +1065,22 @@ async def create_documents_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.I9AuthorizationDocument] + return unmarshal_json_response( + List[models.I9AuthorizationDocument], http_res ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_document( self, @@ -1252,9 +1153,10 @@ def delete_document( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-i9_authorization-documents-document_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1268,23 +1170,12 @@ def delete_document( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_document_async( self, @@ -1357,9 +1248,10 @@ async def delete_document_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-employees-employee_id-i9_authorization-documents-document_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1373,23 +1265,12 @@ async def delete_document_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def employer_sign( self, @@ -1487,9 +1368,10 @@ def employer_sign( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-i9_authorization-employer_sign", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1501,31 +1383,20 @@ def employer_sign( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.I9Authorization) + return unmarshal_json_response(models.I9Authorization, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def employer_sign_async( self, @@ -1623,9 +1494,10 @@ async def employer_sign_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-employees-employee_id-i9_authorization-employer_sign", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1637,28 +1509,17 @@ async def employer_sign_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.I9Authorization) + return unmarshal_json_response(models.I9Authorization, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/industryselection.py b/gusto_embedded/src/gusto_embedded/industryselection.py index 2dde4a49..f334c855 100644 --- a/gusto_embedded/src/gusto_embedded/industryselection.py +++ b/gusto_embedded/src/gusto_embedded/industryselection.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -75,9 +76,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-industry", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,26 +90,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Industry) + return unmarshal_json_response(models.Industry, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -175,9 +166,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-industry", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -188,26 +180,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Industry) + return unmarshal_json_response(models.Industry, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -293,9 +274,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company-industry", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -307,31 +289,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Industry) + return unmarshal_json_response(models.Industry, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -417,9 +388,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company-industry", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -431,28 +403,17 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Industry) + return unmarshal_json_response(models.Industry, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/information_requests.py b/gusto_embedded/src/gusto_embedded/information_requests.py index dedda311..d7a89c0e 100644 --- a/gusto_embedded/src/gusto_embedded/information_requests.py +++ b/gusto_embedded/src/gusto_embedded/information_requests.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import List, Mapping, Optional @@ -75,9 +76,10 @@ def get_information_requests( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-information-requests", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,26 +90,15 @@ def get_information_requests( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.InformationRequest]) + return unmarshal_json_response(List[models.InformationRequest], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def get_information_requests_async( self, @@ -175,9 +166,10 @@ async def get_information_requests_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-information-requests", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -188,23 +180,12 @@ async def get_information_requests_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.InformationRequest]) + return unmarshal_json_response(List[models.InformationRequest], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/introspection.py b/gusto_embedded/src/gusto_embedded/introspection.py index fde370f8..f7f9d733 100644 --- a/gusto_embedded/src/gusto_embedded/introspection.py +++ b/gusto_embedded/src/gusto_embedded/introspection.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional @@ -70,9 +71,10 @@ def get_info( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-token-info", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -83,28 +85,15 @@ def get_info( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.GetV1TokenInfoResponseBody - ) + return unmarshal_json_response(models.GetV1TokenInfoResponseBody, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def get_info_async( self, @@ -167,9 +156,10 @@ async def get_info_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-token-info", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -180,28 +170,15 @@ async def get_info_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.GetV1TokenInfoResponseBody - ) + return unmarshal_json_response(models.GetV1TokenInfoResponseBody, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) def refresh_token( self, @@ -292,9 +269,10 @@ def refresh_token( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="refresh-access-token", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -305,26 +283,15 @@ def refresh_token( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Authentication) + return unmarshal_json_response(models.Authentication, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) async def refresh_token_async( self, @@ -415,9 +382,10 @@ async def refresh_token_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="refresh-access-token", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -428,23 +396,12 @@ async def refresh_token_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Authentication) + return unmarshal_json_response(models.Authentication, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/invoices.py b/gusto_embedded/src/gusto_embedded/invoices.py index 6ef31065..d8e1796c 100644 --- a/gusto_embedded/src/gusto_embedded/invoices.py +++ b/gusto_embedded/src/gusto_embedded/invoices.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Mapping, Optional, Union @@ -95,6 +96,7 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-invoices-invoice-period", oauth2_scopes=None, @@ -107,31 +109,20 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.InvoiceData) + return unmarshal_json_response(models.InvoiceData, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -219,6 +210,7 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-invoices-invoice-period", oauth2_scopes=None, @@ -231,28 +223,17 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.InvoiceData) + return unmarshal_json_response(models.InvoiceData, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/jobsandcompensations.py b/gusto_embedded/src/gusto_embedded/jobsandcompensations.py index dc12480e..de193caf 100644 --- a/gusto_embedded/src/gusto_embedded/jobsandcompensations.py +++ b/gusto_embedded/src/gusto_embedded/jobsandcompensations.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -99,9 +100,10 @@ def create_job( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -113,31 +115,20 @@ def create_job( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_job_async( self, @@ -229,9 +220,10 @@ async def create_job_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -243,31 +235,20 @@ async def create_job_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_jobs( self, @@ -344,9 +325,10 @@ def get_jobs( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-jobs", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -357,26 +339,15 @@ def get_jobs( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Job]) + return unmarshal_json_response(List[models.Job], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_jobs_async( self, @@ -453,9 +424,10 @@ async def get_jobs_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-employees-employee_id-jobs", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -466,26 +438,15 @@ async def get_jobs_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Job]) + return unmarshal_json_response(List[models.Job], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_job( self, @@ -556,9 +517,10 @@ def get_job( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -569,26 +531,15 @@ def get_job( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_job_async( self, @@ -659,9 +610,10 @@ async def get_job_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -672,26 +624,15 @@ async def get_job_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -786,9 +727,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -800,31 +742,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -919,9 +850,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -933,31 +865,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Job) + return unmarshal_json_response(models.Job, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -1025,9 +946,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1041,23 +963,12 @@ def delete( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1125,9 +1036,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-jobs-job_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1141,23 +1053,12 @@ async def delete_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_compensations( self, @@ -1238,9 +1139,10 @@ def get_compensations( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-jobs-job_id-compensations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1251,26 +1153,15 @@ def get_compensations( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Compensation]) + return unmarshal_json_response(List[models.Compensation], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_compensations_async( self, @@ -1351,9 +1242,10 @@ async def get_compensations_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-jobs-job_id-compensations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1364,26 +1256,15 @@ async def get_compensations_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Compensation]) + return unmarshal_json_response(List[models.Compensation], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create_compensation( self, @@ -1488,9 +1369,10 @@ def create_compensation( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1502,31 +1384,20 @@ def create_compensation( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_compensation_async( self, @@ -1631,9 +1502,10 @@ async def create_compensation_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1645,31 +1517,20 @@ async def create_compensation_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_compensation( self, @@ -1738,9 +1599,10 @@ def get_compensation( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1751,26 +1613,15 @@ def get_compensation( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_compensation_async( self, @@ -1839,9 +1690,10 @@ async def get_compensation_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1852,26 +1704,15 @@ async def get_compensation_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_compensation( self, @@ -1976,9 +1817,10 @@ def update_compensation( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1990,31 +1832,20 @@ def update_compensation( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_compensation_async( self, @@ -2119,9 +1950,10 @@ async def update_compensation_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2133,31 +1965,20 @@ async def update_compensation_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Compensation) + return unmarshal_json_response(models.Compensation, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_compensation( self, @@ -2226,9 +2047,10 @@ def delete_compensation( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2242,23 +2064,12 @@ def delete_compensation( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_compensation_async( self, @@ -2327,9 +2138,10 @@ async def delete_compensation_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-compensations-compensation_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2343,20 +2155,9 @@ async def delete_compensation_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/locations.py b/gusto_embedded/src/gusto_embedded/locations.py index 5f439fbe..a039354f 100644 --- a/gusto_embedded/src/gusto_embedded/locations.py +++ b/gusto_embedded/src/gusto_embedded/locations.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -110,9 +111,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-locations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -124,31 +126,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -251,9 +242,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-locations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -265,31 +257,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -365,9 +346,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-locations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -378,26 +360,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Location]) + return unmarshal_json_response(List[models.Location], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -473,9 +444,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-locations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -486,26 +458,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Location]) + return unmarshal_json_response(List[models.Location], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def retrieve( self, @@ -574,9 +535,10 @@ def retrieve( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-locations-location_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -588,31 +550,20 @@ def retrieve( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def retrieve_async( self, @@ -681,9 +632,10 @@ async def retrieve_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-locations-location_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -695,31 +647,20 @@ async def retrieve_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -827,9 +768,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-locations-location_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -841,31 +783,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, ["404", "409", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -973,9 +904,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-locations-location_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -987,31 +919,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Location) + return unmarshal_json_response(models.Location, http_res) if utils.match_response(http_res, ["404", "409", "422"], "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_minimum_wages( self, @@ -1083,9 +1004,10 @@ def get_minimum_wages( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-locations-location_uuid-minimum_wages", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1097,31 +1019,20 @@ def get_minimum_wages( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.MinimumWage]) + return unmarshal_json_response(List[models.MinimumWage], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_minimum_wages_async( self, @@ -1193,9 +1104,10 @@ async def get_minimum_wages_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-locations-location_uuid-minimum_wages", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1207,28 +1119,17 @@ async def get_minimum_wages_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.MinimumWage]) + return unmarshal_json_response(List[models.MinimumWage], http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/models/__init__.py b/gusto_embedded/src/gusto_embedded/models/__init__.py index af226249..e357c300 100644 --- a/gusto_embedded/src/gusto_embedded/models/__init__.py +++ b/gusto_embedded/src/gusto_embedded/models/__init__.py @@ -1,2241 +1,2601 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from .accruing_time_off_hour import AccruingTimeOffHour, AccruingTimeOffHourTypedDict -from .accruing_time_off_hour_object import ( - AccruingTimeOffHourObject, - AccruingTimeOffHourObjectTypedDict, -) -from .ach_transaction import ( - AchTransaction, - AchTransactionRecipientType, - AchTransactionTypedDict, - PaymentDirection, - PaymentEventType, - PaymentStatus, -) -from .admin import Admin, AdminTypedDict -from .apierror import APIError -from .authentication import Authentication, AuthenticationTypedDict -from .benefit_summary import ( - BenefitSummary, - BenefitSummaryEmployees, - BenefitSummaryEmployeesTypedDict, - BenefitSummaryPayPeriod, - BenefitSummaryPayPeriodTypedDict, - BenefitSummaryTypedDict, - PayrollBenefits, - PayrollBenefitsTypedDict, -) -from .benefit_type_requirements import ( - BenefitTypeRequirements, - BenefitTypeRequirementsCatchUpDefaultValue, - BenefitTypeRequirementsCatchUpDefaultValueTypedDict, - BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValue, - BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValueTypedDict, - BenefitTypeRequirementsContribution, - BenefitTypeRequirementsContributionTypedDict, - BenefitTypeRequirementsCoverageAmountDefaultValue, - BenefitTypeRequirementsCoverageAmountDefaultValueTypedDict, - BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValue, - BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValueTypedDict, - BenefitTypeRequirementsDeductAsPercentageDefaultValue, - BenefitTypeRequirementsDeductAsPercentageDefaultValueTypedDict, - BenefitTypeRequirementsDefaultValue, - BenefitTypeRequirementsDefaultValueTypedDict, - BenefitTypeRequirementsLimitOptionDefaultValue, - BenefitTypeRequirementsLimitOptionDefaultValueTypedDict, - BenefitTypeRequirementsTypedDict, - CatchUp, - CatchUpTypedDict, - CompanyContributionAnnualMaximum, - CompanyContributionAnnualMaximumTypedDict, - CoverageAmount, - CoverageAmountTypedDict, - CoverageSalaryMultiplier, - CoverageSalaryMultiplierTypedDict, - DeductAsPercentage, - DeductAsPercentageTypedDict, - DefaultValue, - DefaultValueTypedDict, - EmployeeDeduction, - EmployeeDeductionTypedDict, - LimitOption, - LimitOptionTypedDict, -) -from .child_support_data import ( - Agencies, - AgenciesTypedDict, - ChildSupportData, - ChildSupportDataTypedDict, - FipsCodes, - FipsCodesTypedDict, - Key, - RequiredAttributes, - RequiredAttributesTypedDict, -) -from .company import ( - Company, - CompanyHomeAddress, - CompanyHomeAddressTypedDict, - CompanyPaidTimeOff, - CompanyPaidTimeOffTypedDict, - CompanyStatus, - CompanyTypedDict, - Compensations, - CompensationsTypedDict, - EntityType, - Fixed, - FixedTypedDict, - FundingType, - Hourly, - HourlyTypedDict, - PayScheduleType, - PrimaryPayrollAdmin, - PrimaryPayrollAdminTypedDict, - PrimarySignatory, - PrimarySignatoryTypedDict, - Tier, -) -from .company_address import CompanyAddress, CompanyAddressTypedDict -from .company_attachment import Category, CompanyAttachment, CompanyAttachmentTypedDict -from .company_bank_account import ( - AccountType, - CompanyBankAccount, - CompanyBankAccountTypedDict, - PlaidStatus, - VerificationStatus, - VerificationType, -) -from .company_benefit import CompanyBenefit, CompanyBenefitTypedDict, Source -from .company_benefit_with_employee_benefits import ( - CompanyBenefitWithEmployeeBenefits, - CompanyBenefitWithEmployeeBenefitsContribution, - CompanyBenefitWithEmployeeBenefitsContributionTypedDict, - CompanyBenefitWithEmployeeBenefitsSource, - CompanyBenefitWithEmployeeBenefitsTypedDict, - CompanyBenefitWithEmployeeBenefitsValue, - CompanyBenefitWithEmployeeBenefitsValue2, - CompanyBenefitWithEmployeeBenefitsValue2TypedDict, - CompanyBenefitWithEmployeeBenefitsValueTiers, - CompanyBenefitWithEmployeeBenefitsValueTiersTypedDict, - CompanyBenefitWithEmployeeBenefitsValueTypedDict, - EmployeeBenefitsModel, - EmployeeBenefitsModelTypedDict, -) -from .company_custom_field import CompanyCustomField, CompanyCustomFieldTypedDict -from .company_custom_field_list import ( - CompanyCustomFieldList, - CompanyCustomFieldListTypedDict, -) -from .company_onboarding_status import ( - CompanyOnboardingStatus, - CompanyOnboardingStatusTypedDict, - ID, - OnboardingStep, - OnboardingStepTypedDict, - Requirements, -) -from .company_suspension import ( - CompanySuspension, - CompanySuspensionTypedDict, - ReconcileTaxMethod, - TaxRefunds, - TaxRefundsTypedDict, -) -from .compensation import ( - Compensation, - CompensationTypedDict, - MinimumWages, - MinimumWagesTypedDict, - PaymentUnit, -) -from .contractor import ( - Address, - AddressTypedDict, - Contractor, - ContractorOnboardingStatus1, - ContractorPaymentMethod1, - ContractorType, - ContractorTypedDict, - WageType, -) -from .contractor_address import ContractorAddress, ContractorAddressTypedDict -from .contractor_bank_account import ( - ContractorBankAccount, - ContractorBankAccountAccountType, - ContractorBankAccountTypedDict, -) -from .contractor_onboarding_status import ( - ContractorOnboardingStatus, - ContractorOnboardingStatusOnboardingStatus, - ContractorOnboardingStatusOnboardingStep, - ContractorOnboardingStatusOnboardingStepTypedDict, - ContractorOnboardingStatusTypedDict, -) -from .contractor_payment import ( - ContractorPayment, - ContractorPaymentPaymentMethod, - ContractorPaymentStatus, - ContractorPaymentTypedDict, - ContractorPaymentWageType, -) -from .contractor_payment_for_group import ( - ContractorPaymentForGroup, - ContractorPaymentForGroupPaymentMethod, - ContractorPaymentForGroupStatus, - ContractorPaymentForGroupTypedDict, - ContractorPaymentForGroupWageType, -) -from .contractor_payment_group import ( - ContractorPaymentGroup, - ContractorPaymentGroupStatus, - ContractorPaymentGroupTotals, - ContractorPaymentGroupTotalsTypedDict, - ContractorPaymentGroupTypedDict, -) -from .contractor_payment_group_minimal import ( - ContractorPaymentGroupMinimal, - ContractorPaymentGroupMinimalStatus, - ContractorPaymentGroupMinimalTotals, - ContractorPaymentGroupMinimalTotalsTypedDict, - ContractorPaymentGroupMinimalTypedDict, -) -from .contractor_payment_method import ( - ContractorPaymentMethod, - ContractorPaymentMethodSplitBy, - ContractorPaymentMethodType, - ContractorPaymentMethodTypedDict, -) -from .contractor_payment_receipt import ( - ContractorPaymentReceipt, - ContractorPaymentReceiptLicensee, - ContractorPaymentReceiptLicenseeTypedDict, - ContractorPaymentReceiptTotals, - ContractorPaymentReceiptTotalsTypedDict, - ContractorPaymentReceiptTypedDict, - ContractorPaymentsModel, - ContractorPaymentsModelTypedDict, -) -from .contractor_payment_summary import ( - ContractorPaymentSummary, - ContractorPaymentSummaryContractorPayments, - ContractorPaymentSummaryContractorPaymentsTypedDict, - ContractorPaymentSummaryTypedDict, - Total, - TotalTypedDict, -) -from .contractor_payment_summary_by_dates import ( - ContractorPaymentSummaryByDates, - ContractorPaymentSummaryByDatesContractorPayments, - ContractorPaymentSummaryByDatesContractorPaymentsTypedDict, - ContractorPaymentSummaryByDatesTotal, - ContractorPaymentSummaryByDatesTotalTypedDict, - ContractorPaymentSummaryByDatesTypedDict, -) -from .create_report import CreateReport, CreateReportTypedDict -from .custom_field_type import CustomFieldType -from .delete_companies_company_uuid_holiday_pay_policyop import ( - DeleteCompaniesCompanyUUIDHolidayPayPolicyRequest, - DeleteCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict, -) -from .delete_departmentop import ( - DeleteDepartmentRequest, - DeleteDepartmentRequestTypedDict, -) -from .delete_v1_companies_company_id_contractor_payment_contractor_paymentop import ( - DeleteV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest, - DeleteV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict, -) -from .delete_v1_companies_company_id_earning_types_earning_type_uuidop import ( - DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest, - DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict, -) -from .delete_v1_companies_company_id_payrollsop import ( - DeleteV1CompaniesCompanyIDPayrollsRequest, - DeleteV1CompaniesCompanyIDPayrollsRequestTypedDict, -) -from .delete_v1_companies_company_uuid_signatories_signatory_uuidop import ( - DeleteV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequest, - DeleteV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestTypedDict, -) -from .delete_v1_company_benefits_company_benefit_idop import ( - Base, - BaseTypedDict, - DeleteV1CompanyBenefitsCompanyBenefitIDErrors, - DeleteV1CompanyBenefitsCompanyBenefitIDErrorsTypedDict, - DeleteV1CompanyBenefitsCompanyBenefitIDRequest, - DeleteV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, - DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody, - DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, -) -from .delete_v1_compensations_compensation_idop import ( - DeleteV1CompensationsCompensationIDRequest, - DeleteV1CompensationsCompensationIDRequestTypedDict, -) -from .delete_v1_contractor_payment_groups_contractor_payment_group_idop import ( - DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequest, - DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict, -) -from .delete_v1_contractors_contractor_uuidop import ( - DeleteV1ContractorsContractorUUIDRequest, - DeleteV1ContractorsContractorUUIDRequestTypedDict, -) -from .delete_v1_employee_benefits_employee_benefit_idop import ( - DeleteV1EmployeeBenefitsEmployeeBenefitIDRequest, - DeleteV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, -) -from .delete_v1_employeeop import ( - DeleteV1EmployeeHeaderXGustoAPIVersion, - DeleteV1EmployeeRequest, - DeleteV1EmployeeRequestTypedDict, -) -from .delete_v1_employees_employee_id_bank_accounts_bank_account_idop import ( - DeleteV1EmployeesEmployeeIDBankAccountsBankAccountIDRequest, - DeleteV1EmployeesEmployeeIDBankAccountsBankAccountIDRequestTypedDict, -) -from .delete_v1_employees_employee_id_i9_authorization_documents_document_idop import ( - DeleteV1EmployeesEmployeeIDI9AuthorizationDocumentsDocumentIDRequest, - DeleteV1EmployeesEmployeeIDI9AuthorizationDocumentsDocumentIDRequestTypedDict, -) -from .delete_v1_employees_employee_id_rehireop import ( - DeleteV1EmployeesEmployeeIDRehireRequest, - DeleteV1EmployeesEmployeeIDRehireRequestTypedDict, -) -from .delete_v1_employees_employee_id_terminationsop import ( - DeleteV1EmployeesEmployeeIDTerminationsRequest, - DeleteV1EmployeesEmployeeIDTerminationsRequestTypedDict, -) -from .delete_v1_external_payrollop import ( - DeleteV1ExternalPayrollRequest, - DeleteV1ExternalPayrollRequestTypedDict, -) -from .delete_v1_home_addresses_home_address_uuidop import ( - DeleteV1HomeAddressesHomeAddressUUIDRequest, - DeleteV1HomeAddressesHomeAddressUUIDRequestTypedDict, -) -from .delete_v1_jobs_job_idop import ( - DeleteV1JobsJobIDRequest, - DeleteV1JobsJobIDRequestTypedDict, -) -from .delete_v1_webhook_subscription_uuidop import ( - DeleteV1WebhookSubscriptionUUIDRequest, - DeleteV1WebhookSubscriptionUUIDRequestTypedDict, - DeleteV1WebhookSubscriptionUUIDSecurity, - DeleteV1WebhookSubscriptionUUIDSecurityTypedDict, -) -from .delete_v1_work_addresses_work_address_uuidop import ( - DeleteV1WorkAddressesWorkAddressUUIDRequest, - DeleteV1WorkAddressesWorkAddressUUIDRequestTypedDict, -) -from .department import ( - ContractorsModel, - ContractorsModelTypedDict, - Department, - DepartmentEmployees, - DepartmentEmployeesTypedDict, - DepartmentTypedDict, -) -from .document import ( - Document, - DocumentTypedDict, - Fields, - FieldsTypedDict, - Pages, - PagesTypedDict, - RecipientType, -) -from .document_pdf import DocumentPdf, DocumentPdfTypedDict -from .document_signed import ( - DocumentSigned, - DocumentSignedRecipientType, - DocumentSignedTypedDict, -) -from .document_type import DocumentType -from .earning_type import EarningType, EarningTypeTypedDict -from .earning_type_list import EarningTypeList, EarningTypeListTypedDict -from .employee import ( - CurrentEmploymentStatus, - Employee, - EmployeeTypedDict, - OnboardingDocumentsConfig, - OnboardingDocumentsConfigTypedDict, - OnboardingStatus, - PaymentMethod, -) -from .employee_address import EmployeeAddress, EmployeeAddressTypedDict -from .employee_bank_account import ( - EmployeeBankAccount, - EmployeeBankAccountAccountType, - EmployeeBankAccountTypedDict, -) -from .employee_benefit import ( - Contribution, - ContributionTypedDict, - DeductionReducesTaxableIncome, - EmployeeBenefit, - EmployeeBenefitTypedDict, - EmployeeBenefitValue, - EmployeeBenefitValueTypedDict, - Tiers, - TiersTypedDict, - Two, - TwoTypedDict, -) -from .employee_benefit_for_company_benefit import ( - EmployeeBenefitForCompanyBenefit, - EmployeeBenefitForCompanyBenefitContribution, - EmployeeBenefitForCompanyBenefitContributionTypedDict, - EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome, - EmployeeBenefitForCompanyBenefitTypedDict, - EmployeeBenefitForCompanyBenefitValue, - EmployeeBenefitForCompanyBenefitValueTypedDict, - Value2, - Value2TypedDict, - ValueTiers, - ValueTiersTypedDict, -) -from .employee_custom_field import EmployeeCustomField, EmployeeCustomFieldTypedDict -from .employee_federal_tax import ( - EmployeeFederalTax, - EmployeeFederalTaxTypedDict, - W4DataType, -) -from .employee_onboarding_document import ( - EmployeeOnboardingDocument, - EmployeeOnboardingDocumentTypedDict, -) -from .employee_onboarding_status import ( - EmployeeOnboardingStatus, - EmployeeOnboardingStatusOnboardingStep, - EmployeeOnboardingStatusOnboardingStepTypedDict, - EmployeeOnboardingStatusTypedDict, -) -from .employee_pay_stubs_list import EmployeePayStubsList, EmployeePayStubsListTypedDict -from .employee_payment_method import ( - EmployeePaymentMethod, - EmployeePaymentMethodType, - EmployeePaymentMethodTypedDict, - SplitBy, -) -from .employee_state_tax import EmployeeStateTax, EmployeeStateTaxTypedDict -from .employee_state_tax_answer import ( - EmployeeStateTaxAnswer, - EmployeeStateTaxAnswerTypedDict, - Value, - ValueTypedDict, -) -from .employee_state_tax_input_question_format import ( - EmployeeStateTaxInputQuestionFormat, - EmployeeStateTaxInputQuestionFormatTypedDict, - EmployeeStateTaxInputQuestionFormatValue, - EmployeeStateTaxInputQuestionFormatValueTypedDict, - Options, - OptionsTypedDict, -) -from .employee_state_tax_question import ( - EmployeeStateTaxQuestion, - EmployeeStateTaxQuestionTypedDict, -) -from .employee_work_address import EmployeeWorkAddress, EmployeeWorkAddressTypedDict -from .employment_history_list import ( - EmploymentHistoryList, - EmploymentHistoryListEmploymentStatus, - EmploymentHistoryListTypedDict, -) -from .entity_error_object import ( - EntityErrorObject, - EntityErrorObjectTypedDict, - Metadata, - MetadataTypedDict, -) -from .event import Event, EventTypedDict, ResourceType -from .external_payroll import ( - ApplicableBenefits, - ApplicableBenefitsTypedDict, - ApplicableEarnings, - ApplicableEarningsTypedDict, - ApplicableTaxes, - ApplicableTaxesTypedDict, - Earnings, - EarningsTypedDict, - ExternalPayroll, - ExternalPayrollBenefits, - ExternalPayrollBenefitsTypedDict, - ExternalPayrollItems, - ExternalPayrollItemsTypedDict, - ExternalPayrollMetadata, - ExternalPayrollMetadataTypedDict, - ExternalPayrollTaxes, - ExternalPayrollTaxesTypedDict, - ExternalPayrollTypedDict, - Status, -) -from .external_payroll_basic import ( - ExternalPayrollBasic, - ExternalPayrollBasicStatus, - ExternalPayrollBasicTypedDict, -) -from .external_payroll_tax_suggestions import ( - ExternalPayrollTaxSuggestions, - ExternalPayrollTaxSuggestionsTypedDict, - TaxSuggestions, - TaxSuggestionsTypedDict, -) -from .fast_payment_limit_required_body import ( - FastPaymentLimitRequiredBody, - FastPaymentLimitRequiredBodyTypedDict, -) -from .federal_tax_details import FederalTaxDetails, FederalTaxDetailsTypedDict -from .flow import Flow, FlowTypedDict -from .flsa_status_type import FlsaStatusType -from .form import Form, FormTypedDict -from .form_1099 import Form1099, Form1099TypedDict -from .form_pdf import FormPdf, FormPdfTypedDict -from .garnishment import Garnishment, GarnishmentType, GarnishmentTypedDict -from .garnishment_child_support import ( - GarnishmentChildSupport, - GarnishmentChildSupportTypedDict, - PaymentPeriod, -) -from .generated_document import ( - GeneratedDocument, - GeneratedDocumentStatus, - GeneratedDocumentTypedDict, -) -from .get_ach_transactionsop import ( - GetAchTransactionsRequest, - GetAchTransactionsRequestTypedDict, -) -from .get_companies_company_uuid_contractor_payments_previewop import ( - CheckDate, - CheckDateTypedDict, - GetCompaniesCompanyUUIDContractorPaymentsPreviewBase, - GetCompaniesCompanyUUIDContractorPaymentsPreviewBaseTypedDict, - GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPayments, - GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBody, - GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBodyData, - GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsTypedDict, - GetCompaniesCompanyUUIDContractorPaymentsPreviewErrors, - GetCompaniesCompanyUUIDContractorPaymentsPreviewErrorsTypedDict, - GetCompaniesCompanyUUIDContractorPaymentsPreviewRequest, - GetCompaniesCompanyUUIDContractorPaymentsPreviewRequestBody, - GetCompaniesCompanyUUIDContractorPaymentsPreviewRequestBodyTypedDict, - GetCompaniesCompanyUUIDContractorPaymentsPreviewRequestTypedDict, - GetCompaniesCompanyUUIDContractorPaymentsPreviewResponseBody, - GetCompaniesCompanyUUIDContractorPaymentsPreviewResponseBodyTypedDict, -) -from .get_companies_company_uuid_holiday_pay_policyop import ( - GetCompaniesCompanyUUIDHolidayPayPolicyRequest, - GetCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict, -) -from .get_companies_company_uuid_paid_holidaysop import ( - GetCompaniesCompanyUUIDPaidHolidaysRequest, - GetCompaniesCompanyUUIDPaidHolidaysRequestBody, - GetCompaniesCompanyUUIDPaidHolidaysRequestBodyTypedDict, - GetCompaniesCompanyUUIDPaidHolidaysRequestTypedDict, -) -from .get_companies_company_uuid_report_templates_report_typeop import ( - GetCompaniesCompanyUUIDReportTemplatesReportTypeRequest, - GetCompaniesCompanyUUIDReportTemplatesReportTypeRequestTypedDict, -) -from .get_companies_company_uuid_suspensionsop import ( - GetCompaniesCompanyUUIDSuspensionsRequest, - GetCompaniesCompanyUUIDSuspensionsRequestTypedDict, -) -from .get_companies_company_uuid_time_off_policiesop import ( - GetCompaniesCompanyUUIDTimeOffPoliciesRequest, - GetCompaniesCompanyUUIDTimeOffPoliciesRequestTypedDict, -) -from .get_companies_company_uuid_wire_in_request_uuidop import ( - GetCompaniesCompanyUUIDWireInRequestUUIDRequest, - GetCompaniesCompanyUUIDWireInRequestUUIDRequestTypedDict, -) -from .get_companies_departmentsop import ( - GetCompaniesDepartmentsRequest, - GetCompaniesDepartmentsRequestTypedDict, -) -from .get_departmentop import GetDepartmentRequest, GetDepartmentRequestTypedDict -from .get_employee_ytd_benefit_amounts_from_different_companyop import ( - GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, - GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict, -) -from .get_eventsop import ( - GetEventsRequest, - GetEventsRequestTypedDict, - GetEventsSecurity, - GetEventsSecurityTypedDict, -) -from .get_information_requestsop import ( - GetInformationRequestsRequest, - GetInformationRequestsRequestTypedDict, -) -from .get_invoices_invoice_periodop import ( - GetInvoicesInvoicePeriodRequest, - GetInvoicesInvoicePeriodRequestTypedDict, - GetInvoicesInvoicePeriodSecurity, - GetInvoicesInvoicePeriodSecurityTypedDict, -) -from .get_notifications_notification_uuidop import ( - GetNotificationsNotificationUUIDRequest, - GetNotificationsNotificationUUIDRequestTypedDict, -) -from .get_recovery_casesop import ( - GetRecoveryCasesRequest, - GetRecoveryCasesRequestTypedDict, -) -from .get_reports_report_uuidop import ( - GetReportsReportUUIDRequest, - GetReportsReportUUIDRequestTypedDict, -) -from .get_time_off_policies_time_off_policy_uuidop import ( - GetTimeOffPoliciesTimeOffPolicyUUIDRequest, - GetTimeOffPoliciesTimeOffPolicyUUIDRequestTypedDict, -) -from .get_v1_benefits_benefit_idop import ( - GetV1BenefitsBenefitIDRequest, - GetV1BenefitsBenefitIDRequestTypedDict, -) -from .get_v1_benefits_benefits_id_requirementsop import ( - GetV1BenefitsBenefitsIDRequirementsRequest, - GetV1BenefitsBenefitsIDRequirementsRequestTypedDict, -) -from .get_v1_benefits_company_benefit_id_summaryop import ( - GetV1BenefitsCompanyBenefitIDSummaryRequest, - GetV1BenefitsCompanyBenefitIDSummaryRequestTypedDict, -) -from .get_v1_benefitsop import GetV1BenefitsRequest, GetV1BenefitsRequestTypedDict -from .get_v1_companies_attachment_urlop import ( - GetV1CompaniesAttachmentURLRequest, - GetV1CompaniesAttachmentURLRequestTypedDict, - GetV1CompaniesAttachmentURLResponseBody, - GetV1CompaniesAttachmentURLResponseBodyTypedDict, -) -from .get_v1_companies_attachmentop import ( - GetV1CompaniesAttachmentRequest, - GetV1CompaniesAttachmentRequestTypedDict, -) -from .get_v1_companies_attachmentsop import ( - GetV1CompaniesAttachmentsRequest, - GetV1CompaniesAttachmentsRequestTypedDict, -) -from .get_v1_companies_company_id_adminsop import ( - GetV1CompaniesCompanyIDAdminsRequest, - GetV1CompaniesCompanyIDAdminsRequestTypedDict, -) -from .get_v1_companies_company_id_bank_accountsop import ( - GetV1CompaniesCompanyIDBankAccountsRequest, - GetV1CompaniesCompanyIDBankAccountsRequestTypedDict, -) -from .get_v1_companies_company_id_company_benefitsop import ( - GetV1CompaniesCompanyIDCompanyBenefitsRequest, - GetV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict, -) -from .get_v1_companies_company_id_contractor_payment_contractor_paymentop import ( - GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest, - GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict, -) -from .get_v1_companies_company_id_contractor_payment_groupsop import ( - GetV1CompaniesCompanyIDContractorPaymentGroupsRequest, - GetV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict, -) -from .get_v1_companies_company_id_contractor_paymentsop import ( - GetV1CompaniesCompanyIDContractorPaymentsRequest, - GetV1CompaniesCompanyIDContractorPaymentsRequestTypedDict, - GetV1CompaniesCompanyIDContractorPaymentsResponseBody, - GetV1CompaniesCompanyIDContractorPaymentsResponseBodyTypedDict, -) -from .get_v1_companies_company_id_custom_fieldsop import ( - GetV1CompaniesCompanyIDCustomFieldsRequest, - GetV1CompaniesCompanyIDCustomFieldsRequestTypedDict, -) -from .get_v1_companies_company_id_earning_typesop import ( - GetV1CompaniesCompanyIDEarningTypesRequest, - GetV1CompaniesCompanyIDEarningTypesRequestTypedDict, -) -from .get_v1_companies_company_id_employeesop import ( - GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion, - GetV1CompaniesCompanyIDEmployeesRequest, - GetV1CompaniesCompanyIDEmployeesRequestTypedDict, - Include, -) -from .get_v1_companies_company_id_federal_tax_detailsop import ( - GetV1CompaniesCompanyIDFederalTaxDetailsRequest, - GetV1CompaniesCompanyIDFederalTaxDetailsRequestTypedDict, -) -from .get_v1_companies_company_id_locationsop import ( - GetV1CompaniesCompanyIDLocationsRequest, - GetV1CompaniesCompanyIDLocationsRequestTypedDict, -) -from .get_v1_companies_company_id_pay_periodsop import ( - GetV1CompaniesCompanyIDPayPeriodsRequest, - GetV1CompaniesCompanyIDPayPeriodsRequestTypedDict, -) -from .get_v1_companies_company_id_pay_schedules_assignmentsop import ( - GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequest, - GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequestTypedDict, -) -from .get_v1_companies_company_id_pay_schedules_pay_schedule_idop import ( - GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequest, - GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestTypedDict, -) -from .get_v1_companies_company_id_pay_schedules_previewop import ( - GetV1CompaniesCompanyIDPaySchedulesPreviewRequest, - GetV1CompaniesCompanyIDPaySchedulesPreviewRequestTypedDict, - GetV1CompaniesCompanyIDPaySchedulesPreviewResponseBody, - GetV1CompaniesCompanyIDPaySchedulesPreviewResponseBodyTypedDict, - PayPeriods, - PayPeriodsTypedDict, - QueryParamFrequency, -) -from .get_v1_companies_company_id_pay_schedulesop import ( - GetV1CompaniesCompanyIDPaySchedulesRequest, - GetV1CompaniesCompanyIDPaySchedulesRequestTypedDict, -) -from .get_v1_companies_company_id_payroll_reversalsop import ( - GetV1CompaniesCompanyIDPayrollReversalsRequest, - GetV1CompaniesCompanyIDPayrollReversalsRequestTypedDict, -) -from .get_v1_companies_company_id_payrolls_payroll_idop import ( - GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude, - GetV1CompaniesCompanyIDPayrollsPayrollIDRequest, - GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict, -) -from .get_v1_companies_company_id_payrollsop import ( - GetV1CompaniesCompanyIDPayrollsQueryParamInclude, - GetV1CompaniesCompanyIDPayrollsRequest, - GetV1CompaniesCompanyIDPayrollsRequestTypedDict, - PayrollTypes, - ProcessingStatuses, -) -from .get_v1_companies_company_id_unprocessed_termination_pay_periodsop import ( - GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequest, - GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequestTypedDict, -) -from .get_v1_companies_company_uuid_contractorsop import ( - GetV1CompaniesCompanyUUIDContractorsRequest, - GetV1CompaniesCompanyUUIDContractorsRequestTypedDict, -) -from .get_v1_companies_company_uuid_signatoriesop import ( - GetV1CompaniesCompanyUUIDSignatoriesRequest, - GetV1CompaniesCompanyUUIDSignatoriesRequestTypedDict, -) -from .get_v1_companies_company_uuid_tax_requirements_stateop import ( - GetV1CompaniesCompanyUUIDTaxRequirementsStateRequest, - GetV1CompaniesCompanyUUIDTaxRequirementsStateRequestTypedDict, -) -from .get_v1_companies_company_uuid_tax_requirementsop import ( - GetV1CompaniesCompanyUUIDTaxRequirementsRequest, - GetV1CompaniesCompanyUUIDTaxRequirementsRequestTypedDict, - ResponseBody, - ResponseBodyTypedDict, -) -from .get_v1_companies_payroll_blockers_company_uuidop import ( - GetV1CompaniesPayrollBlockersCompanyUUIDRequest, - GetV1CompaniesPayrollBlockersCompanyUUIDRequestTypedDict, -) -from .get_v1_companiesop import GetV1CompaniesRequest, GetV1CompaniesRequestTypedDict -from .get_v1_company_benefits_company_benefit_id_employee_benefitsop import ( - GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest, - GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict, -) -from .get_v1_company_benefits_company_benefit_idop import ( - GetV1CompanyBenefitsCompanyBenefitIDRequest, - GetV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, -) -from .get_v1_company_external_payrollsop import ( - GetV1CompanyExternalPayrollsRequest, - GetV1CompanyExternalPayrollsRequestTypedDict, -) -from .get_v1_company_finish_onboardingop import ( - GetV1CompanyFinishOnboardingRequest, - GetV1CompanyFinishOnboardingRequestTypedDict, -) -from .get_v1_company_form_pdfop import ( - GetV1CompanyFormPdfRequest, - GetV1CompanyFormPdfRequestTypedDict, -) -from .get_v1_company_formop import ( - GetV1CompanyFormRequest, - GetV1CompanyFormRequestTypedDict, -) -from .get_v1_company_formsop import ( - GetV1CompanyFormsRequest, - GetV1CompanyFormsRequestTypedDict, -) -from .get_v1_company_industryop import ( - GetV1CompanyIndustryRequest, - GetV1CompanyIndustryRequestTypedDict, -) -from .get_v1_company_onboarding_statusop import ( - GetV1CompanyOnboardingStatusRequest, - GetV1CompanyOnboardingStatusRequestTypedDict, -) -from .get_v1_company_payment_configsop import ( - GetV1CompanyPaymentConfigsRequest, - GetV1CompanyPaymentConfigsRequestTypedDict, -) -from .get_v1_compensations_compensation_idop import ( - GetV1CompensationsCompensationIDRequest, - GetV1CompensationsCompensationIDRequestTypedDict, -) -from .get_v1_contractor_document_pdfop import ( - GetV1ContractorDocumentPdfRequest, - GetV1ContractorDocumentPdfRequestTypedDict, -) -from .get_v1_contractor_documentop import ( - GetV1ContractorDocumentRequest, - GetV1ContractorDocumentRequestTypedDict, -) -from .get_v1_contractor_documentsop import ( - GetV1ContractorDocumentsRequest, - GetV1ContractorDocumentsRequestTypedDict, -) -from .get_v1_contractor_form_pdfop import ( - GetV1ContractorFormPdfRequest, - GetV1ContractorFormPdfRequestTypedDict, -) -from .get_v1_contractor_formop import ( - GetV1ContractorFormRequest, - GetV1ContractorFormRequestTypedDict, -) -from .get_v1_contractor_formsop import ( - GetV1ContractorFormsRequest, - GetV1ContractorFormsRequestTypedDict, -) -from .get_v1_contractor_payment_groups_contractor_payment_group_idop import ( - GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest, - GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict, -) -from .get_v1_contractor_payments_contractor_payment_uuid_fundop import ( - GetV1ContractorPaymentsContractorPaymentUUIDFundRequest, - GetV1ContractorPaymentsContractorPaymentUUIDFundRequestTypedDict, -) -from .get_v1_contractor_payments_contractor_payment_uuid_receiptop import ( - GetV1ContractorPaymentsContractorPaymentUUIDReceiptRequest, - GetV1ContractorPaymentsContractorPaymentUUIDReceiptRequestTypedDict, -) -from .get_v1_contractors_contractor_uuid_addressop import ( - GetV1ContractorsContractorUUIDAddressRequest, - GetV1ContractorsContractorUUIDAddressRequestTypedDict, -) -from .get_v1_contractors_contractor_uuid_bank_accountsop import ( - GetV1ContractorsContractorUUIDBankAccountsRequest, - GetV1ContractorsContractorUUIDBankAccountsRequestTypedDict, -) -from .get_v1_contractors_contractor_uuid_onboarding_statusop import ( - GetV1ContractorsContractorUUIDOnboardingStatusRequest, - GetV1ContractorsContractorUUIDOnboardingStatusRequestTypedDict, -) -from .get_v1_contractors_contractor_uuid_payment_methodop import ( - GetV1ContractorsContractorUUIDPaymentMethodRequest, - GetV1ContractorsContractorUUIDPaymentMethodRequestTypedDict, -) -from .get_v1_contractors_contractor_uuidop import ( - GetV1ContractorsContractorUUIDRequest, - GetV1ContractorsContractorUUIDRequestTypedDict, -) -from .get_v1_employee_benefits_employee_benefit_idop import ( - GetV1EmployeeBenefitsEmployeeBenefitIDRequest, - GetV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, -) -from .get_v1_employee_form_pdfop import ( - GetV1EmployeeFormPdfRequest, - GetV1EmployeeFormPdfRequestTypedDict, -) -from .get_v1_employee_formop import ( - GetV1EmployeeFormRequest, - GetV1EmployeeFormRequestTypedDict, -) -from .get_v1_employee_formsop import ( - GetV1EmployeeFormsRequest, - GetV1EmployeeFormsRequestTypedDict, -) -from .get_v1_employees_employee_id_bank_accountsop import ( - GetV1EmployeesEmployeeIDBankAccountsRequest, - GetV1EmployeesEmployeeIDBankAccountsRequestTypedDict, -) -from .get_v1_employees_employee_id_custom_fieldsop import ( - GetV1EmployeesEmployeeIDCustomFieldsRequest, - GetV1EmployeesEmployeeIDCustomFieldsRequestTypedDict, - GetV1EmployeesEmployeeIDCustomFieldsResponseBody, - GetV1EmployeesEmployeeIDCustomFieldsResponseBodyTypedDict, -) -from .get_v1_employees_employee_id_employee_benefitsop import ( - GetV1EmployeesEmployeeIDEmployeeBenefitsRequest, - GetV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict, -) -from .get_v1_employees_employee_id_employment_historyop import ( - GetV1EmployeesEmployeeIDEmploymentHistoryHeaderXGustoAPIVersion, - GetV1EmployeesEmployeeIDEmploymentHistoryRequest, - GetV1EmployeesEmployeeIDEmploymentHistoryRequestTypedDict, -) -from .get_v1_employees_employee_id_federal_taxesop import ( - GetV1EmployeesEmployeeIDFederalTaxesRequest, - GetV1EmployeesEmployeeIDFederalTaxesRequestTypedDict, -) -from .get_v1_employees_employee_id_garnishmentsop import ( - GetV1EmployeesEmployeeIDGarnishmentsRequest, - GetV1EmployeesEmployeeIDGarnishmentsRequestTypedDict, -) -from .get_v1_employees_employee_id_home_addressesop import ( - GetV1EmployeesEmployeeIDHomeAddressesRequest, - GetV1EmployeesEmployeeIDHomeAddressesRequestTypedDict, -) -from .get_v1_employees_employee_id_i9_authorization_document_optionsop import ( - GetV1EmployeesEmployeeIDI9AuthorizationDocumentOptionsRequest, - GetV1EmployeesEmployeeIDI9AuthorizationDocumentOptionsRequestTypedDict, -) -from .get_v1_employees_employee_id_i9_authorization_documentsop import ( - GetV1EmployeesEmployeeIDI9AuthorizationDocumentsRequest, - GetV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestTypedDict, -) -from .get_v1_employees_employee_id_i9_authorizationop import ( - GetV1EmployeesEmployeeIDI9AuthorizationRequest, - GetV1EmployeesEmployeeIDI9AuthorizationRequestTypedDict, -) -from .get_v1_employees_employee_id_jobsop import ( - GetV1EmployeesEmployeeIDJobsQueryParamInclude, - GetV1EmployeesEmployeeIDJobsRequest, - GetV1EmployeesEmployeeIDJobsRequestTypedDict, -) -from .get_v1_employees_employee_id_onboarding_statusop import ( - GetV1EmployeesEmployeeIDOnboardingStatusHeaderXGustoAPIVersion, - GetV1EmployeesEmployeeIDOnboardingStatusRequest, - GetV1EmployeesEmployeeIDOnboardingStatusRequestTypedDict, -) -from .get_v1_employees_employee_id_payment_methodop import ( - GetV1EmployeesEmployeeIDPaymentMethodRequest, - GetV1EmployeesEmployeeIDPaymentMethodRequestTypedDict, -) -from .get_v1_employees_employee_id_rehireop import ( - GetV1EmployeesEmployeeIDRehireRequest, - GetV1EmployeesEmployeeIDRehireRequestTypedDict, -) -from .get_v1_employees_employee_id_state_taxesop import ( - GetV1EmployeesEmployeeIDStateTaxesRequest, - GetV1EmployeesEmployeeIDStateTaxesRequestTypedDict, -) -from .get_v1_employees_employee_id_terminationsop import ( - GetV1EmployeesEmployeeIDTerminationsRequest, - GetV1EmployeesEmployeeIDTerminationsRequestTypedDict, -) -from .get_v1_employees_employee_id_work_addressesop import ( - GetV1EmployeesEmployeeIDWorkAddressesRequest, - GetV1EmployeesEmployeeIDWorkAddressesRequestTypedDict, -) -from .get_v1_employees_employee_uuid_pay_stubsop import ( - GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion, - GetV1EmployeesEmployeeUUIDPayStubsRequest, - GetV1EmployeesEmployeeUUIDPayStubsRequestTypedDict, -) -from .get_v1_employeesop import ( - GetV1EmployeesHeaderXGustoAPIVersion, - GetV1EmployeesRequest, - GetV1EmployeesRequestTypedDict, - QueryParamInclude, -) -from .get_v1_external_payroll_calculate_taxesop import ( - GetV1ExternalPayrollCalculateTaxesRequest, - GetV1ExternalPayrollCalculateTaxesRequestTypedDict, -) -from .get_v1_external_payrollop import ( - GetV1ExternalPayrollRequest, - GetV1ExternalPayrollRequestTypedDict, -) -from .get_v1_garnishments_child_supportop import ( - GetV1GarnishmentsChildSupportRequest, - GetV1GarnishmentsChildSupportRequestTypedDict, -) -from .get_v1_garnishments_garnishment_idop import ( - GetV1GarnishmentsGarnishmentIDRequest, - GetV1GarnishmentsGarnishmentIDRequestTypedDict, -) -from .get_v1_generated_documents_document_type_request_uuidop import ( - GetV1GeneratedDocumentsDocumentTypeRequestUUIDRequest, - GetV1GeneratedDocumentsDocumentTypeRequestUUIDRequestTypedDict, -) -from .get_v1_home_addresses_home_address_uuidop import ( - GetV1HomeAddressesHomeAddressUUIDRequest, - GetV1HomeAddressesHomeAddressUUIDRequestTypedDict, -) -from .get_v1_jobs_job_id_compensationsop import ( - GetV1JobsJobIDCompensationsQueryParamInclude, - GetV1JobsJobIDCompensationsRequest, - GetV1JobsJobIDCompensationsRequestTypedDict, -) -from .get_v1_jobs_job_idop import ( - GetV1JobsJobIDQueryParamInclude, - GetV1JobsJobIDRequest, - GetV1JobsJobIDRequestTypedDict, -) -from .get_v1_locations_location_idop import ( - GetV1LocationsLocationIDRequest, - GetV1LocationsLocationIDRequestTypedDict, - XGustoAPIVersion, -) -from .get_v1_locations_location_uuid_minimum_wagesop import ( - GetV1LocationsLocationUUIDMinimumWagesHeaderXGustoAPIVersion, - GetV1LocationsLocationUUIDMinimumWagesRequest, - GetV1LocationsLocationUUIDMinimumWagesRequestTypedDict, -) -from .get_v1_payment_receipts_payrolls_payroll_uuidop import ( - GetV1PaymentReceiptsPayrollsPayrollUUIDRequest, - GetV1PaymentReceiptsPayrollsPayrollUUIDRequestTypedDict, -) -from .get_v1_payrolls_payroll_uuid_employees_employee_uuid_pay_stubop import ( - GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion, - GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequest, - GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequestTypedDict, -) -from .get_v1_tax_liabilitiesop import ( - GetV1TaxLiabilitiesRequest, - GetV1TaxLiabilitiesRequestTypedDict, -) -from .get_v1_token_infoop import ( - GetV1TokenInfoRequest, - GetV1TokenInfoRequestTypedDict, - GetV1TokenInfoResponseBody, - GetV1TokenInfoResponseBodyTypedDict, - GetV1TokenInfoType, - Resource, - ResourceOwner, - ResourceOwnerTypedDict, - ResourceTypedDict, -) -from .get_v1_webhook_subscription_uuidop import ( - GetV1WebhookSubscriptionUUIDRequest, - GetV1WebhookSubscriptionUUIDRequestTypedDict, - GetV1WebhookSubscriptionUUIDSecurity, - GetV1WebhookSubscriptionUUIDSecurityTypedDict, -) -from .get_v1_webhook_subscription_verification_token_uuidop import ( - GetV1WebhookSubscriptionVerificationTokenUUIDRequest, - GetV1WebhookSubscriptionVerificationTokenUUIDRequestTypedDict, - GetV1WebhookSubscriptionVerificationTokenUUIDSecurity, - GetV1WebhookSubscriptionVerificationTokenUUIDSecurityTypedDict, -) -from .get_v1_webhook_subscriptionsop import ( - GetV1WebhookSubscriptionsRequest, - GetV1WebhookSubscriptionsRequestTypedDict, - GetV1WebhookSubscriptionsSecurity, - GetV1WebhookSubscriptionsSecurityTypedDict, -) -from .get_v1_work_addresses_work_address_uuidop import ( - GetV1WorkAddressesWorkAddressUUIDRequest, - GetV1WorkAddressesWorkAddressUUIDRequestTypedDict, -) -from .get_version_employees_time_off_activitiesop import ( - GetVersionEmployeesTimeOffActivitiesRequest, - GetVersionEmployeesTimeOffActivitiesRequestTypedDict, -) -from .get_wire_in_requests_wire_in_request_uuidop import ( - GetWireInRequestsWireInRequestUUIDRequest, - GetWireInRequestsWireInRequestUUIDRequestTypedDict, -) -from .gross_up_pay import GrossUpPay, GrossUpPayTypedDict -from .historical_employee_body import ( - EmployeeStateTaxes, - EmployeeStateTaxesTypedDict, - HistoricalEmployeeBody, - HistoricalEmployeeBodyHomeAddress, - HistoricalEmployeeBodyHomeAddressTypedDict, - HistoricalEmployeeBodyJob, - HistoricalEmployeeBodyJobTypedDict, - HistoricalEmployeeBodyTermination, - HistoricalEmployeeBodyTerminationTypedDict, - HistoricalEmployeeBodyTypedDict, - WorkAddress, - WorkAddressTypedDict, -) -from .holiday_pay_policy import ( - ColumbusDay, - ColumbusDayTypedDict, - FederalHolidays, - FederalHolidaysTypedDict, - HolidayPayPolicy, - HolidayPayPolicyEmployees, - HolidayPayPolicyEmployeesTypedDict, - HolidayPayPolicyTypedDict, - IndependenceDay, - IndependenceDayTypedDict, - Juneteenth, - JuneteenthTypedDict, - LaborDay, - LaborDayTypedDict, - MemorialDay, - MemorialDayTypedDict, - MlkDay, - MlkDayTypedDict, - NewYearsDay, - NewYearsDayTypedDict, - PresidentsDay, - PresidentsDayTypedDict, - Thanksgiving, - ThanksgivingTypedDict, - VeteransDay, - VeteransDayTypedDict, -) -from .i9_authorization import ( - AuthorizationStatus, - I9Authorization, - I9AuthorizationDocumentType, - I9AuthorizationTypedDict, -) -from .i9_authorization_document import ( - I9AuthorizationDocument, - I9AuthorizationDocumentTypedDict, -) -from .i9_authorization_document_option import ( - I9AuthorizationDocumentOption, - I9AuthorizationDocumentOptionTypedDict, - Section, -) -from .industry import Industry, IndustryTypedDict -from .information_request import ( - InformationRequest, - InformationRequestStatus, - InformationRequestType, - InformationRequestTypedDict, -) -from .invoice_data import ( - ActiveCompanies, - ActiveCompaniesTypedDict, - InvoiceData, - InvoiceDataTypedDict, -) -from .job import Job, JobTypedDict -from .location import Location, LocationTypedDict -from .metadata_with_multiple_entities import ( - MetadataWithMultipleEntities, - MetadataWithMultipleEntitiesTypedDict, -) -from .metadata_with_one_entity import ( - MetadataWithOneEntity, - MetadataWithOneEntityTypedDict, -) -from .minimum_wage import MinimumWage, MinimumWageTypedDict -from .notification import ( - Notification, - NotificationStatus, - NotificationTypedDict, - Resources, - ResourcesTypedDict, -) -from .off_cycle_reason_type import OffCycleReasonType -from .paid_holidays import PaidHolidays, PaidHolidaysTypedDict, Schema, SchemaTypedDict -from .paid_time_off import Name, PaidTimeOff, PaidTimeOffTypedDict -from .pay_period import ( - PayPeriod, - PayPeriodPayroll, - PayPeriodPayrollTypedDict, - PayPeriodTypedDict, - PayrollType, -) -from .pay_schedule_assignment import ( - PayScheduleAssignment, - PayScheduleAssignmentTypedDict, - Type, -) -from .pay_schedule_assignment_body import ( - DepartmentsModel, - DepartmentsModelTypedDict, - EmployeesModel, - EmployeesModelTypedDict, - PayScheduleAssignmentBody, - PayScheduleAssignmentBodyType, - PayScheduleAssignmentBodyTypedDict, -) -from .pay_schedule_assignment_department import ( - PayScheduleAssignmentDepartment, - PayScheduleAssignmentDepartmentTypedDict, -) -from .pay_schedule_assignment_employee import ( - PayScheduleAssignmentEmployee, - PayScheduleAssignmentEmployeeTypedDict, -) -from .pay_schedule_assignment_employee_change import ( - PayScheduleAssignmentEmployeeChange, - PayScheduleAssignmentEmployeeChangeTypedDict, -) -from .pay_schedule_assignment_pay_period import ( - PayScheduleAssignmentPayPeriod, - PayScheduleAssignmentPayPeriodTypedDict, -) -from .pay_schedule_assignment_preview import ( - PayScheduleAssignmentPreview, - PayScheduleAssignmentPreviewType, - PayScheduleAssignmentPreviewTypedDict, -) -from .pay_schedule_assignment_transition_pay_period import ( - PayScheduleAssignmentTransitionPayPeriod, - PayScheduleAssignmentTransitionPayPeriodTypedDict, -) -from .pay_schedule_create_update import ( - PayScheduleCreateUpdate, - PayScheduleCreateUpdateTypedDict, -) -from .pay_schedule_frequency import PayScheduleFrequency -from .pay_schedule_frequency_create_update import PayScheduleFrequencyCreateUpdate -from .pay_schedule_list import PayScheduleList, PayScheduleListTypedDict -from .pay_schedule_object import PayScheduleObject, PayScheduleObjectTypedDict -from .payment_configs import PaymentConfigs, PaymentConfigsTypedDict -from .payment_method_bank_account import ( - PaymentMethodBankAccount, - PaymentMethodBankAccountTypedDict, -) -from .payment_speed_param import PaymentSpeedParam -from .payment_speed_required_body import ( - PaymentSpeedRequiredBody, - PaymentSpeedRequiredBodyTypedDict, -) -from .payroll import Payroll, PayrollTypedDict -from .payroll_blocker import PayrollBlocker, PayrollBlockerTypedDict -from .payroll_blockers_error import ( - Errors, - ErrorsTypedDict, - PayrollBlockersError, - PayrollBlockersErrorData, - PayrollBlockersErrorMetadata, - PayrollBlockersErrorMetadataTypedDict, -) -from .payroll_check import ( - EmployeeCheckNumberMapping, - EmployeeCheckNumberMappingTypedDict, - PayrollCheck, - PayrollCheckTypedDict, -) -from .payroll_company_taxes_type import ( - PayrollCompanyTaxesType, - PayrollCompanyTaxesTypeTypedDict, -) -from .payroll_credit_blockers_type import ( - PayrollCreditBlockersType, - PayrollCreditBlockersTypeMetadata, - PayrollCreditBlockersTypeMetadataTypedDict, - PayrollCreditBlockersTypeStatus, - PayrollCreditBlockersTypeTypedDict, - PayrollCreditBlockersTypeUnblockOptions, - PayrollCreditBlockersTypeUnblockOptionsTypedDict, -) -from .payroll_employee_compensations_type import ( - Benefits, - BenefitsTypedDict, - Deductions, - DeductionsTypedDict, - FixedCompensations, - FixedCompensationsTypedDict, - HourlyCompensations, - HourlyCompensationsTypedDict, - PayrollEmployeeCompensationsType, - PayrollEmployeeCompensationsTypePaidTimeOff, - PayrollEmployeeCompensationsTypePaidTimeOffTypedDict, - PayrollEmployeeCompensationsTypePaymentMethod, - PayrollEmployeeCompensationsTypeTypedDict, - Taxes, - TaxesTypedDict, -) -from .payroll_fixed_compensation_types_type import ( - PayrollFixedCompensationTypesType, - PayrollFixedCompensationTypesTypeTypedDict, -) -from .payroll_minimal import PayrollMinimal, PayrollMinimalTypedDict -from .payroll_pay_period_type import PayrollPayPeriodType, PayrollPayPeriodTypeTypedDict -from .payroll_payment_speed_changed_type import ( - PayrollPaymentSpeedChangedType, - PayrollPaymentSpeedChangedTypeTypedDict, -) -from .payroll_payroll_status_meta_type import ( - PayrollPayrollStatusMetaType, - PayrollPayrollStatusMetaTypeTypedDict, -) -from .payroll_prepared import PayrollPrepared, PayrollPreparedTypedDict -from .payroll_processing_request import ( - PayrollProcessingRequest, - PayrollProcessingRequestStatus, - PayrollProcessingRequestTypedDict, -) -from .payroll_receipt import ( - EmployeeCompensations, - EmployeeCompensationsTypedDict, - Licensee, - LicenseeTypedDict, - PayrollReceipt, - PayrollReceiptTaxes, - PayrollReceiptTaxesTypedDict, - PayrollReceiptTypedDict, - Totals, - TotalsTypedDict, -) -from .payroll_reversal import PayrollReversal, PayrollReversalTypedDict -from .payroll_submission_blockers_type import ( - PayrollSubmissionBlockersType, - PayrollSubmissionBlockersTypeMetadata, - PayrollSubmissionBlockersTypeMetadataTypedDict, - PayrollSubmissionBlockersTypeStatus, - PayrollSubmissionBlockersTypeTypedDict, - UnblockOptions, - UnblockOptionsTypedDict, -) -from .payroll_totals_type import PayrollTotalsType, PayrollTotalsTypeTypedDict -from .payroll_withholding_pay_period_type import PayrollWithholdingPayPeriodType -from .post_companies_company_uuid_holiday_pay_policyop import ( - ChristmasDay, - ChristmasDayTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyColumbusDay, - PostCompaniesCompanyUUIDHolidayPayPolicyColumbusDayTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyFederalHolidays, - PostCompaniesCompanyUUIDHolidayPayPolicyFederalHolidaysTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyIndependenceDay, - PostCompaniesCompanyUUIDHolidayPayPolicyIndependenceDayTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyJuneteenth, - PostCompaniesCompanyUUIDHolidayPayPolicyJuneteenthTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyLaborDay, - PostCompaniesCompanyUUIDHolidayPayPolicyLaborDayTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyMemorialDay, - PostCompaniesCompanyUUIDHolidayPayPolicyMemorialDayTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyMlkDay, - PostCompaniesCompanyUUIDHolidayPayPolicyMlkDayTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyNewYearsDay, - PostCompaniesCompanyUUIDHolidayPayPolicyNewYearsDayTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyPresidentsDay, - PostCompaniesCompanyUUIDHolidayPayPolicyPresidentsDayTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyRequest, - PostCompaniesCompanyUUIDHolidayPayPolicyRequestBody, - PostCompaniesCompanyUUIDHolidayPayPolicyRequestBodyTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyThanksgiving, - PostCompaniesCompanyUUIDHolidayPayPolicyThanksgivingTypedDict, - PostCompaniesCompanyUUIDHolidayPayPolicyVeteransDay, - PostCompaniesCompanyUUIDHolidayPayPolicyVeteransDayTypedDict, -) -from .post_companies_company_uuid_reportsop import ( - Columns, - EmploymentType, - FileType, - Groupings, - PostCompaniesCompanyUUIDReportsEmploymentStatus, - PostCompaniesCompanyUUIDReportsPaymentMethod, - PostCompaniesCompanyUUIDReportsRequest, - PostCompaniesCompanyUUIDReportsRequestBody, - PostCompaniesCompanyUUIDReportsRequestBodyTypedDict, - PostCompaniesCompanyUUIDReportsRequestTypedDict, -) -from .post_companies_company_uuid_suspensionsop import ( - LeavingFor, - PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod, - PostCompaniesCompanyUUIDSuspensionsRequest, - PostCompaniesCompanyUUIDSuspensionsRequestBody, - PostCompaniesCompanyUUIDSuspensionsRequestBodyTypedDict, - PostCompaniesCompanyUUIDSuspensionsRequestTypedDict, - Reason, -) -from .post_companies_company_uuid_time_off_policiesop import ( - PostCompaniesCompanyUUIDTimeOffPoliciesAccrualMethod, - PostCompaniesCompanyUUIDTimeOffPoliciesRequest, - PostCompaniesCompanyUUIDTimeOffPoliciesRequestBody, - PostCompaniesCompanyUUIDTimeOffPoliciesRequestBodyTypedDict, - PostCompaniesCompanyUUIDTimeOffPoliciesRequestTypedDict, -) -from .post_companies_payroll_skip_company_uuidop import ( - PostCompaniesPayrollSkipCompanyUUIDPayrollType, - PostCompaniesPayrollSkipCompanyUUIDRequest, - PostCompaniesPayrollSkipCompanyUUIDRequestBody, - PostCompaniesPayrollSkipCompanyUUIDRequestBodyTypedDict, - PostCompaniesPayrollSkipCompanyUUIDRequestTypedDict, - PostCompaniesPayrollSkipCompanyUUIDResponseBody, - PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion, -) -from .post_departmentsop import ( - PostDepartmentsRequest, - PostDepartmentsRequestBody, - PostDepartmentsRequestBodyTypedDict, - PostDepartmentsRequestTypedDict, -) -from .post_employee_ytd_benefit_amounts_from_different_company import ( - PostEmployeeYtdBenefitAmountsFromDifferentCompany, - PostEmployeeYtdBenefitAmountsFromDifferentCompanyTypedDict, -) -from .post_employee_ytd_benefit_amounts_from_different_companyop import ( - PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, - PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict, -) -from .post_partner_managed_companies_company_uuid_accept_terms_of_serviceop import ( - PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequest, - PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequestBody, - PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequestBodyTypedDict, - PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequestTypedDict, - PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceResponseBody, - PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceResponseBodyTypedDict, -) -from .post_partner_managed_companies_company_uuid_retrieve_terms_of_serviceop import ( - PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequest, - PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequestBody, - PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequestBodyTypedDict, - PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequestTypedDict, - PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceResponseBody, - PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceResponseBodyTypedDict, -) -from .post_payrolls_gross_up_payroll_uuidop import ( - PostPayrollsGrossUpPayrollUUIDRequest, - PostPayrollsGrossUpPayrollUUIDRequestBody, - PostPayrollsGrossUpPayrollUUIDRequestBodyTypedDict, - PostPayrollsGrossUpPayrollUUIDRequestTypedDict, - PostPayrollsGrossUpPayrollUUIDResponseBody, - PostPayrollsGrossUpPayrollUUIDResponseBodyUnion, -) -from .post_v1_companies_attachmentop import ( - PostV1CompaniesAttachmentCategory, - PostV1CompaniesAttachmentDocument, - PostV1CompaniesAttachmentDocumentTypedDict, - PostV1CompaniesAttachmentRequest, - PostV1CompaniesAttachmentRequestBody, - PostV1CompaniesAttachmentRequestBodyTypedDict, - PostV1CompaniesAttachmentRequestTypedDict, -) -from .post_v1_companies_company_id_adminsop import ( - PostV1CompaniesCompanyIDAdminsRequest, - PostV1CompaniesCompanyIDAdminsRequestBody, - PostV1CompaniesCompanyIDAdminsRequestBodyTypedDict, - PostV1CompaniesCompanyIDAdminsRequestTypedDict, -) -from .post_v1_companies_company_id_bank_accountsop import ( - PostV1CompaniesCompanyIDBankAccountsAccountType, - PostV1CompaniesCompanyIDBankAccountsRequest, - PostV1CompaniesCompanyIDBankAccountsRequestBody, - PostV1CompaniesCompanyIDBankAccountsRequestBodyTypedDict, - PostV1CompaniesCompanyIDBankAccountsRequestTypedDict, -) -from .post_v1_companies_company_id_company_benefitsop import ( - PostV1CompaniesCompanyIDCompanyBenefitsRequest, - PostV1CompaniesCompanyIDCompanyBenefitsRequestBody, - PostV1CompaniesCompanyIDCompanyBenefitsRequestBodyTypedDict, - PostV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict, -) -from .post_v1_companies_company_id_contractor_payment_groups_previewop import ( - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBodyTypedDict, - PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestTypedDict, -) -from .post_v1_companies_company_id_contractor_payment_groupsop import ( - PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments, - PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPaymentsTypedDict, - PostV1CompaniesCompanyIDContractorPaymentGroupsPaymentMethod, - PostV1CompaniesCompanyIDContractorPaymentGroupsRequest, - PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody, - PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBodyTypedDict, - PostV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict, -) -from .post_v1_companies_company_id_contractor_paymentsop import ( - PostV1CompaniesCompanyIDContractorPaymentsPaymentMethod, - PostV1CompaniesCompanyIDContractorPaymentsRequest, - PostV1CompaniesCompanyIDContractorPaymentsRequestBody, - PostV1CompaniesCompanyIDContractorPaymentsRequestBodyTypedDict, - PostV1CompaniesCompanyIDContractorPaymentsRequestTypedDict, -) -from .post_v1_companies_company_id_earning_typesop import ( - PostV1CompaniesCompanyIDEarningTypesRequest, - PostV1CompaniesCompanyIDEarningTypesRequestBody, - PostV1CompaniesCompanyIDEarningTypesRequestBodyTypedDict, - PostV1CompaniesCompanyIDEarningTypesRequestTypedDict, -) -from .post_v1_companies_company_id_locationsop import ( - PostV1CompaniesCompanyIDLocationsRequest, - PostV1CompaniesCompanyIDLocationsRequestBody, - PostV1CompaniesCompanyIDLocationsRequestBodyTypedDict, - PostV1CompaniesCompanyIDLocationsRequestTypedDict, -) -from .post_v1_companies_company_id_pay_schedules_assignment_previewop import ( - PostV1CompaniesCompanyIDPaySchedulesAssignmentPreviewRequest, - PostV1CompaniesCompanyIDPaySchedulesAssignmentPreviewRequestTypedDict, -) -from .post_v1_companies_company_id_pay_schedules_assignop import ( - PostV1CompaniesCompanyIDPaySchedulesAssignRequest, - PostV1CompaniesCompanyIDPaySchedulesAssignRequestTypedDict, -) -from .post_v1_companies_company_id_pay_schedulesop import ( - Frequency, - PostV1CompaniesCompanyIDPaySchedulesRequest, - PostV1CompaniesCompanyIDPaySchedulesRequestBody, - PostV1CompaniesCompanyIDPaySchedulesRequestBodyTypedDict, - PostV1CompaniesCompanyIDPaySchedulesRequestTypedDict, -) -from .post_v1_companies_company_id_payrollsop import ( - OffCycleReason, - PostV1CompaniesCompanyIDPayrollsRequest, - PostV1CompaniesCompanyIDPayrollsRequestBody, - PostV1CompaniesCompanyIDPayrollsRequestBodyTypedDict, - PostV1CompaniesCompanyIDPayrollsRequestTypedDict, - WithholdingPayPeriod, -) -from .post_v1_companies_company_uuid_contractorsop import ( - PostV1CompaniesCompanyUUIDContractorsRequest, - PostV1CompaniesCompanyUUIDContractorsRequestBody, - PostV1CompaniesCompanyUUIDContractorsRequestBodyTypedDict, - PostV1CompaniesCompanyUUIDContractorsRequestTypedDict, - PostV1CompaniesCompanyUUIDContractorsType, - PostV1CompaniesCompanyUUIDContractorsWageType, -) -from .post_v1_companies_company_uuid_signatories_inviteop import ( - PostV1CompaniesCompanyUUIDSignatoriesInviteRequest, - PostV1CompaniesCompanyUUIDSignatoriesInviteRequestBody, - PostV1CompaniesCompanyUUIDSignatoriesInviteRequestBodyTypedDict, - PostV1CompaniesCompanyUUIDSignatoriesInviteRequestTypedDict, -) -from .post_v1_company_flowsop import ( - PostV1CompanyFlowsEntityType, - PostV1CompanyFlowsRequest, - PostV1CompanyFlowsRequestBody, - PostV1CompanyFlowsRequestBodyTypedDict, - PostV1CompanyFlowsRequestTypedDict, -) -from .post_v1_company_signatoriesop import ( - PostV1CompanySignatoriesHomeAddress, - PostV1CompanySignatoriesHomeAddressTypedDict, - PostV1CompanySignatoriesRequest, - PostV1CompanySignatoriesRequestBody, - PostV1CompanySignatoriesRequestBodyTypedDict, - PostV1CompanySignatoriesRequestTypedDict, -) -from .post_v1_compensations_compensation_idop import ( - PostV1CompensationsCompensationIDMinimumWages, - PostV1CompensationsCompensationIDMinimumWagesTypedDict, - PostV1CompensationsCompensationIDPaymentUnit, - PostV1CompensationsCompensationIDRequest, - PostV1CompensationsCompensationIDRequestBody, - PostV1CompensationsCompensationIDRequestBodyTypedDict, - PostV1CompensationsCompensationIDRequestTypedDict, -) -from .post_v1_contractors_contractor_uuid_bank_accountsop import ( - PostV1ContractorsContractorUUIDBankAccountsAccountType, - PostV1ContractorsContractorUUIDBankAccountsRequest, - PostV1ContractorsContractorUUIDBankAccountsRequestBody, - PostV1ContractorsContractorUUIDBankAccountsRequestBodyTypedDict, - PostV1ContractorsContractorUUIDBankAccountsRequestTypedDict, -) -from .post_v1_employees_employee_id_bank_accountsop import ( - PostV1EmployeesEmployeeIDBankAccountsAccountType, - PostV1EmployeesEmployeeIDBankAccountsRequest, - PostV1EmployeesEmployeeIDBankAccountsRequestBody, - PostV1EmployeesEmployeeIDBankAccountsRequestBodyTypedDict, - PostV1EmployeesEmployeeIDBankAccountsRequestTypedDict, -) -from .post_v1_employees_employee_id_employee_benefitsop import ( - PostV1EmployeesEmployeeIDEmployeeBenefitsContribution, - PostV1EmployeesEmployeeIDEmployeeBenefitsContributionTypedDict, - PostV1EmployeesEmployeeIDEmployeeBenefitsDeductionReducesTaxableIncome, - PostV1EmployeesEmployeeIDEmployeeBenefitsLimitOption, - PostV1EmployeesEmployeeIDEmployeeBenefitsRequest, - PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBody, - PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBodyTypedDict, - PostV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict, - PostV1EmployeesEmployeeIDEmployeeBenefitsType, - PostV1EmployeesEmployeeIDEmployeeBenefitsValue, - PostV1EmployeesEmployeeIDEmployeeBenefitsValue2, - PostV1EmployeesEmployeeIDEmployeeBenefitsValue2TypedDict, - PostV1EmployeesEmployeeIDEmployeeBenefitsValueTypedDict, -) -from .post_v1_employees_employee_id_garnishmentsop import ( - PostV1EmployeesEmployeeIDGarnishmentsGarnishmentType, - PostV1EmployeesEmployeeIDGarnishmentsRequest, - PostV1EmployeesEmployeeIDGarnishmentsRequestBody, - PostV1EmployeesEmployeeIDGarnishmentsRequestBodyTypedDict, - PostV1EmployeesEmployeeIDGarnishmentsRequestTypedDict, -) -from .post_v1_employees_employee_id_home_addressesop import ( - PostV1EmployeesEmployeeIDHomeAddressesRequest, - PostV1EmployeesEmployeeIDHomeAddressesRequestBody, - PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict, - PostV1EmployeesEmployeeIDHomeAddressesRequestTypedDict, -) -from .post_v1_employees_employee_id_rehireop import ( - PostV1EmployeesEmployeeIDRehireRequest, - PostV1EmployeesEmployeeIDRehireRequestTypedDict, -) -from .post_v1_employees_employee_id_terminationsop import ( - PostV1EmployeesEmployeeIDTerminationsRequest, - PostV1EmployeesEmployeeIDTerminationsRequestBody, - PostV1EmployeesEmployeeIDTerminationsRequestBodyTypedDict, - PostV1EmployeesEmployeeIDTerminationsRequestTypedDict, -) -from .post_v1_employees_employee_id_work_addressesop import ( - PostV1EmployeesEmployeeIDWorkAddressesRequest, - PostV1EmployeesEmployeeIDWorkAddressesRequestBody, - PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict, - PostV1EmployeesEmployeeIDWorkAddressesRequestTypedDict, -) -from .post_v1_employeesop import ( - PostV1EmployeesHeaderXGustoAPIVersion, - PostV1EmployeesRequest, - PostV1EmployeesRequestBody, - PostV1EmployeesRequestBodyTypedDict, - PostV1EmployeesRequestTypedDict, -) -from .post_v1_external_payrollop import ( - PostV1ExternalPayrollRequest, - PostV1ExternalPayrollRequestBody, - PostV1ExternalPayrollRequestBodyTypedDict, - PostV1ExternalPayrollRequestTypedDict, -) -from .post_v1_historical_employeesop import ( - PostV1HistoricalEmployeesRequest, - PostV1HistoricalEmployeesRequestTypedDict, -) -from .post_v1_jobs_job_idop import ( - PostV1JobsJobIDRequest, - PostV1JobsJobIDRequestBody, - PostV1JobsJobIDRequestBodyTypedDict, - PostV1JobsJobIDRequestTypedDict, -) -from .post_v1_partner_managed_companiesop import ( - PostV1PartnerManagedCompaniesCompany, - PostV1PartnerManagedCompaniesCompanyTypedDict, - PostV1PartnerManagedCompaniesRequest, - PostV1PartnerManagedCompaniesRequestBody, - PostV1PartnerManagedCompaniesRequestBodyTypedDict, - PostV1PartnerManagedCompaniesRequestTypedDict, - PostV1PartnerManagedCompaniesResponseBody, - PostV1PartnerManagedCompaniesResponseBodyTypedDict, - PostV1PartnerManagedCompaniesSecurity, - PostV1PartnerManagedCompaniesSecurityTypedDict, - User, - UserTypedDict, -) -from .post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop import ( - PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequest, - PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBody, - PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBodyTypedDict, - PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestTypedDict, -) -from .post_v1_payrolls_payroll_uuid_generated_documents_printable_payroll_checksop import ( - PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequest, - PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBody, - PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBodyTypedDict, - PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestTypedDict, - PrintingFormat, -) -from .post_v1_plaid_processor_tokenop import ( - OwnerType, - PostV1PlaidProcessorTokenRequest, - PostV1PlaidProcessorTokenRequestBody, - PostV1PlaidProcessorTokenRequestBodyTypedDict, - PostV1PlaidProcessorTokenRequestTypedDict, - PostV1PlaidProcessorTokenResponseBody, - PostV1PlaidProcessorTokenResponseBodyTypedDict, -) -from .post_v1_sandbox_generate_1099op import ( - PostV1SandboxGenerate1099Request, - PostV1SandboxGenerate1099RequestBody, - PostV1SandboxGenerate1099RequestBodyTypedDict, - PostV1SandboxGenerate1099RequestTypedDict, -) -from .post_v1_sandbox_generate_w2op import ( - PostV1SandboxGenerateW2Form, - PostV1SandboxGenerateW2FormTypedDict, - PostV1SandboxGenerateW2Request, - PostV1SandboxGenerateW2RequestBody, - PostV1SandboxGenerateW2RequestBodyTypedDict, - PostV1SandboxGenerateW2RequestTypedDict, -) -from .post_v1_webhook_subscriptionop import ( - PostV1WebhookSubscriptionRequest, - PostV1WebhookSubscriptionRequestBody, - PostV1WebhookSubscriptionRequestBodyTypedDict, - PostV1WebhookSubscriptionRequestTypedDict, - PostV1WebhookSubscriptionSecurity, - PostV1WebhookSubscriptionSecurityTypedDict, - PostV1WebhookSubscriptionSubscriptionTypes, -) -from .put_add_people_to_departmentop import ( - PutAddPeopleToDepartmentContractors, - PutAddPeopleToDepartmentContractorsTypedDict, - PutAddPeopleToDepartmentEmployees, - PutAddPeopleToDepartmentEmployeesTypedDict, - PutAddPeopleToDepartmentRequest, - PutAddPeopleToDepartmentRequestBody, - PutAddPeopleToDepartmentRequestBodyTypedDict, - PutAddPeopleToDepartmentRequestTypedDict, -) -from .put_api_v1_companies_company_id_payrolls_payroll_id_cancelop import ( - PutAPIV1CompaniesCompanyIDPayrollsPayrollIDCancelRequest, - PutAPIV1CompaniesCompanyIDPayrollsPayrollIDCancelRequestTypedDict, -) -from .put_companies_company_uuid_holiday_pay_policy_addop import ( - PutCompaniesCompanyUUIDHolidayPayPolicyAddEmployees, - PutCompaniesCompanyUUIDHolidayPayPolicyAddEmployeesTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyAddRequest, - PutCompaniesCompanyUUIDHolidayPayPolicyAddRequestBody, - PutCompaniesCompanyUUIDHolidayPayPolicyAddRequestBodyTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyAddRequestTypedDict, -) -from .put_companies_company_uuid_holiday_pay_policy_removeop import ( - PutCompaniesCompanyUUIDHolidayPayPolicyRemoveEmployees, - PutCompaniesCompanyUUIDHolidayPayPolicyRemoveEmployeesTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequest, - PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequestBody, - PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequestBodyTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequestTypedDict, -) -from .put_companies_company_uuid_holiday_pay_policyop import ( - PutCompaniesCompanyUUIDHolidayPayPolicyChristmasDay, - PutCompaniesCompanyUUIDHolidayPayPolicyChristmasDayTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyColumbusDay, - PutCompaniesCompanyUUIDHolidayPayPolicyColumbusDayTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyFederalHolidays, - PutCompaniesCompanyUUIDHolidayPayPolicyFederalHolidaysTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyIndependenceDay, - PutCompaniesCompanyUUIDHolidayPayPolicyIndependenceDayTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyJuneteenth, - PutCompaniesCompanyUUIDHolidayPayPolicyJuneteenthTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyLaborDay, - PutCompaniesCompanyUUIDHolidayPayPolicyLaborDayTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyMemorialDay, - PutCompaniesCompanyUUIDHolidayPayPolicyMemorialDayTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyMlkDay, - PutCompaniesCompanyUUIDHolidayPayPolicyMlkDayTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyNewYearsDay, - PutCompaniesCompanyUUIDHolidayPayPolicyNewYearsDayTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyPresidentsDay, - PutCompaniesCompanyUUIDHolidayPayPolicyPresidentsDayTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyRequest, - PutCompaniesCompanyUUIDHolidayPayPolicyRequestBody, - PutCompaniesCompanyUUIDHolidayPayPolicyRequestBodyTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyThanksgiving, - PutCompaniesCompanyUUIDHolidayPayPolicyThanksgivingTypedDict, - PutCompaniesCompanyUUIDHolidayPayPolicyVeteransDay, - PutCompaniesCompanyUUIDHolidayPayPolicyVeteransDayTypedDict, -) -from .put_departmentsop import ( - PutDepartmentsRequest, - PutDepartmentsRequestBody, - PutDepartmentsRequestBodyTypedDict, - PutDepartmentsRequestTypedDict, -) -from .put_remove_people_from_departmentop import ( - PutRemovePeopleFromDepartmentContractors, - PutRemovePeopleFromDepartmentContractorsTypedDict, - PutRemovePeopleFromDepartmentEmployees, - PutRemovePeopleFromDepartmentEmployeesTypedDict, - PutRemovePeopleFromDepartmentRequest, - PutRemovePeopleFromDepartmentRequestBody, - PutRemovePeopleFromDepartmentRequestBodyTypedDict, - PutRemovePeopleFromDepartmentRequestTypedDict, -) -from .put_time_off_policies_time_off_policy_uuidop import ( - AccrualMethod, - PutTimeOffPoliciesTimeOffPolicyUUIDRequest, - PutTimeOffPoliciesTimeOffPolicyUUIDRequestBody, - PutTimeOffPoliciesTimeOffPolicyUUIDRequestBodyTypedDict, - PutTimeOffPoliciesTimeOffPolicyUUIDRequestTypedDict, -) -from .put_v1_companies_company_id_bank_accounts_verifyop import ( - PutV1CompaniesCompanyIDBankAccountsVerifyRequest, - PutV1CompaniesCompanyIDBankAccountsVerifyRequestBody, - PutV1CompaniesCompanyIDBankAccountsVerifyRequestBodyTypedDict, - PutV1CompaniesCompanyIDBankAccountsVerifyRequestTypedDict, -) -from .put_v1_companies_company_id_earning_types_earning_type_uuidop import ( - PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest, - PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBody, - PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBodyTypedDict, - PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict, -) -from .put_v1_companies_company_id_federal_tax_detailsop import ( - FilingForm, - PutV1CompaniesCompanyIDFederalTaxDetailsRequest, - PutV1CompaniesCompanyIDFederalTaxDetailsRequestBody, - PutV1CompaniesCompanyIDFederalTaxDetailsRequestBodyTypedDict, - PutV1CompaniesCompanyIDFederalTaxDetailsRequestTypedDict, - TaxPayerType, -) -from .put_v1_companies_company_id_pay_schedules_pay_schedule_idop import ( - PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDFrequency, - PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequest, - PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestBody, - PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestBodyTypedDict, - PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestTypedDict, -) -from .put_v1_companies_company_id_payrolls_payroll_id_calculateop import ( - PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequest, - PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequestTypedDict, - PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBody, - PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion, -) -from .put_v1_companies_company_id_payrolls_payroll_id_prepareop import ( - PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest, - PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestTypedDict, -) -from .put_v1_companies_company_id_payrolls_payroll_id_submitop import ( - PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequest, - PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody, - PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBodyTypedDict, - PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestTypedDict, - PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBody, - PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion, - SubmissionBlockers, - SubmissionBlockersTypedDict, -) -from .put_v1_companies_company_id_payrollsop import ( - PutV1CompaniesCompanyIDPayrollsEmployeeCompensations, - PutV1CompaniesCompanyIDPayrollsEmployeeCompensationsTypedDict, - PutV1CompaniesCompanyIDPayrollsFixedCompensations, - PutV1CompaniesCompanyIDPayrollsFixedCompensationsTypedDict, - PutV1CompaniesCompanyIDPayrollsHourlyCompensations, - PutV1CompaniesCompanyIDPayrollsHourlyCompensationsTypedDict, - PutV1CompaniesCompanyIDPayrollsPaidTimeOff, - PutV1CompaniesCompanyIDPayrollsPaidTimeOffTypedDict, - PutV1CompaniesCompanyIDPayrollsPaymentMethod, - PutV1CompaniesCompanyIDPayrollsRequest, - PutV1CompaniesCompanyIDPayrollsRequestBody, - PutV1CompaniesCompanyIDPayrollsRequestBodyTypedDict, - PutV1CompaniesCompanyIDPayrollsRequestTypedDict, - PutV1CompaniesCompanyIDPayrollsWithholdingPayPeriod, -) -from .put_v1_companies_company_uuid_signatories_signatory_uuidop import ( - PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDHomeAddress, - PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDHomeAddressTypedDict, - PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequest, - PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestBody, - PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestBodyTypedDict, - PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestTypedDict, -) -from .put_v1_companies_company_uuid_tax_requirements_stateop import ( - PutV1CompaniesCompanyUUIDTaxRequirementsStateRequest, - PutV1CompaniesCompanyUUIDTaxRequirementsStateRequestBody, - PutV1CompaniesCompanyUUIDTaxRequirementsStateRequestBodyTypedDict, - PutV1CompaniesCompanyUUIDTaxRequirementsStateRequestTypedDict, - PutV1CompaniesCompanyUUIDTaxRequirementsStateRequirements, - PutV1CompaniesCompanyUUIDTaxRequirementsStateRequirementsTypedDict, - RequirementSets, - RequirementSetsTypedDict, -) -from .put_v1_companiesop import ( - PutV1CompaniesRequest, - PutV1CompaniesRequestBody, - PutV1CompaniesRequestBodyTypedDict, - PutV1CompaniesRequestTypedDict, -) -from .put_v1_company_benefits_company_benefit_id_employee_benefitsop import ( - PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest, - PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBody, - PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBodyTypedDict, - PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict, -) -from .put_v1_company_benefits_company_benefit_idop import ( - PutV1CompanyBenefitsCompanyBenefitIDRequest, - PutV1CompanyBenefitsCompanyBenefitIDRequestBody, - PutV1CompanyBenefitsCompanyBenefitIDRequestBodyTypedDict, - PutV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, -) -from .put_v1_company_form_signop import ( - PutV1CompanyFormSignRequest, - PutV1CompanyFormSignRequestBody, - PutV1CompanyFormSignRequestBodyTypedDict, - PutV1CompanyFormSignRequestTypedDict, -) -from .put_v1_company_industryop import ( - PutV1CompanyIndustryRequest, - PutV1CompanyIndustryRequestBody, - PutV1CompanyIndustryRequestBodyTypedDict, - PutV1CompanyIndustryRequestTypedDict, -) -from .put_v1_company_payment_configsop import ( - PutV1CompanyPaymentConfigsRequest, - PutV1CompanyPaymentConfigsRequestBody, - PutV1CompanyPaymentConfigsRequestBodyTypedDict, - PutV1CompanyPaymentConfigsRequestTypedDict, -) -from .put_v1_compensations_compensation_idop import ( - PutV1CompensationsCompensationIDMinimumWages, - PutV1CompensationsCompensationIDMinimumWagesTypedDict, - PutV1CompensationsCompensationIDPaymentUnit, - PutV1CompensationsCompensationIDRequest, - PutV1CompensationsCompensationIDRequestBody, - PutV1CompensationsCompensationIDRequestBodyTypedDict, - PutV1CompensationsCompensationIDRequestTypedDict, -) -from .put_v1_contractor_document_signop import ( - PutV1ContractorDocumentSignFields, - PutV1ContractorDocumentSignFieldsTypedDict, - PutV1ContractorDocumentSignRequest, - PutV1ContractorDocumentSignRequestBody, - PutV1ContractorDocumentSignRequestBodyTypedDict, - PutV1ContractorDocumentSignRequestTypedDict, -) -from .put_v1_contractor_payment_groups_contractor_payment_group_id_fundop import ( - PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequest, - PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequestTypedDict, -) -from .put_v1_contractors_contractor_id_payment_methodop import ( - PutV1ContractorsContractorIDPaymentMethodRequest, - PutV1ContractorsContractorIDPaymentMethodRequestBody, - PutV1ContractorsContractorIDPaymentMethodRequestBodyTypedDict, - PutV1ContractorsContractorIDPaymentMethodRequestTypedDict, - PutV1ContractorsContractorIDPaymentMethodType, -) -from .put_v1_contractors_contractor_uuid_addressop import ( - PutV1ContractorsContractorUUIDAddressRequest, - PutV1ContractorsContractorUUIDAddressRequestBody, - PutV1ContractorsContractorUUIDAddressRequestBodyTypedDict, - PutV1ContractorsContractorUUIDAddressRequestTypedDict, -) -from .put_v1_contractors_contractor_uuid_onboarding_statusop import ( - PutV1ContractorsContractorUUIDOnboardingStatusOnboardingStatus, - PutV1ContractorsContractorUUIDOnboardingStatusRequest, - PutV1ContractorsContractorUUIDOnboardingStatusRequestBody, - PutV1ContractorsContractorUUIDOnboardingStatusRequestBodyTypedDict, - PutV1ContractorsContractorUUIDOnboardingStatusRequestTypedDict, -) -from .put_v1_contractors_contractor_uuidop import ( - PutV1ContractorsContractorUUIDRequest, - PutV1ContractorsContractorUUIDRequestBody, - PutV1ContractorsContractorUUIDRequestBodyTypedDict, - PutV1ContractorsContractorUUIDRequestTypedDict, - PutV1ContractorsContractorUUIDType, - PutV1ContractorsContractorUUIDWageType, -) -from .put_v1_employee_benefits_employee_benefit_idop import ( - PutV1EmployeeBenefitsEmployeeBenefitIDContribution, - PutV1EmployeeBenefitsEmployeeBenefitIDContributionTypedDict, - PutV1EmployeeBenefitsEmployeeBenefitIDDeductionReducesTaxableIncome, - PutV1EmployeeBenefitsEmployeeBenefitIDLimitOption, - PutV1EmployeeBenefitsEmployeeBenefitIDRequest, - PutV1EmployeeBenefitsEmployeeBenefitIDRequestBody, - PutV1EmployeeBenefitsEmployeeBenefitIDRequestBodyTypedDict, - PutV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, - PutV1EmployeeBenefitsEmployeeBenefitIDType, - PutV1EmployeeBenefitsEmployeeBenefitIDValue, - PutV1EmployeeBenefitsEmployeeBenefitIDValue2, - PutV1EmployeeBenefitsEmployeeBenefitIDValue2TypedDict, - PutV1EmployeeBenefitsEmployeeBenefitIDValueTypedDict, -) -from .put_v1_employee_form_signop import ( - PutV1EmployeeFormSignRequest, - PutV1EmployeeFormSignRequestBody, - PutV1EmployeeFormSignRequestBodyTypedDict, - PutV1EmployeeFormSignRequestTypedDict, -) -from .put_v1_employees_employee_id_bank_accountsop import ( - PutV1EmployeesEmployeeIDBankAccountsAccountType, - PutV1EmployeesEmployeeIDBankAccountsRequest, - PutV1EmployeesEmployeeIDBankAccountsRequestBody, - PutV1EmployeesEmployeeIDBankAccountsRequestBodyTypedDict, - PutV1EmployeesEmployeeIDBankAccountsRequestTypedDict, -) -from .put_v1_employees_employee_id_federal_taxesop import ( - PutV1EmployeesEmployeeIDFederalTaxesRequest, - PutV1EmployeesEmployeeIDFederalTaxesRequestBody, - PutV1EmployeesEmployeeIDFederalTaxesRequestBodyTypedDict, - PutV1EmployeesEmployeeIDFederalTaxesRequestTypedDict, -) -from .put_v1_employees_employee_id_i9_authorization_documentsop import ( - Documents, - DocumentsTypedDict, - PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequest, - PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestBody, - PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestBodyTypedDict, - PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestTypedDict, -) -from .put_v1_employees_employee_id_i9_authorization_employer_signop import ( - PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequest, - PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestBody, - PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestBodyTypedDict, - PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestTypedDict, -) -from .put_v1_employees_employee_id_i9_authorizationop import ( - PutV1EmployeesEmployeeIDI9AuthorizationAuthorizationStatus, - PutV1EmployeesEmployeeIDI9AuthorizationDocumentType, - PutV1EmployeesEmployeeIDI9AuthorizationRequest, - PutV1EmployeesEmployeeIDI9AuthorizationRequestBody, - PutV1EmployeesEmployeeIDI9AuthorizationRequestBodyTypedDict, - PutV1EmployeesEmployeeIDI9AuthorizationRequestTypedDict, -) -from .put_v1_employees_employee_id_onboarding_documents_configop import ( - PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequest, - PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequestBody, - PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequestBodyTypedDict, - PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequestTypedDict, -) -from .put_v1_employees_employee_id_onboarding_statusop import ( - PutV1EmployeesEmployeeIDOnboardingStatusHeaderXGustoAPIVersion, - PutV1EmployeesEmployeeIDOnboardingStatusOnboardingStatus, - PutV1EmployeesEmployeeIDOnboardingStatusRequest, - PutV1EmployeesEmployeeIDOnboardingStatusRequestBody, - PutV1EmployeesEmployeeIDOnboardingStatusRequestBodyTypedDict, - PutV1EmployeesEmployeeIDOnboardingStatusRequestTypedDict, -) -from .put_v1_employees_employee_id_payment_methodop import ( - PutV1EmployeesEmployeeIDPaymentMethodRequest, - PutV1EmployeesEmployeeIDPaymentMethodRequestBody, - PutV1EmployeesEmployeeIDPaymentMethodRequestBodyTypedDict, - PutV1EmployeesEmployeeIDPaymentMethodRequestTypedDict, - PutV1EmployeesEmployeeIDPaymentMethodSplitBy, - PutV1EmployeesEmployeeIDPaymentMethodType, - Splits, - SplitsTypedDict, -) -from .put_v1_employees_employee_id_rehireop import ( - PutV1EmployeesEmployeeIDRehireEmploymentStatus, - PutV1EmployeesEmployeeIDRehireRequest, - PutV1EmployeesEmployeeIDRehireRequestBody, - PutV1EmployeesEmployeeIDRehireRequestBodyTypedDict, - PutV1EmployeesEmployeeIDRehireRequestTypedDict, -) -from .put_v1_employees_employee_id_state_taxesop import ( - Answers, - AnswersTypedDict, - PutV1EmployeesEmployeeIDStateTaxesRequest, - PutV1EmployeesEmployeeIDStateTaxesRequestBody, - PutV1EmployeesEmployeeIDStateTaxesRequestBodyTypedDict, - PutV1EmployeesEmployeeIDStateTaxesRequestTypedDict, - PutV1EmployeesEmployeeIDStateTaxesValue, - PutV1EmployeesEmployeeIDStateTaxesValueTypedDict, - Questions, - QuestionsTypedDict, - States, - StatesTypedDict, -) -from .put_v1_employeesop import ( - PutV1EmployeesRequest, - PutV1EmployeesRequestBody, - PutV1EmployeesRequestBodyTypedDict, - PutV1EmployeesRequestTypedDict, -) -from .put_v1_external_payrollop import ( - PutV1ExternalPayrollBenefits, - PutV1ExternalPayrollBenefitsTypedDict, - PutV1ExternalPayrollEarningType, - PutV1ExternalPayrollEarnings, - PutV1ExternalPayrollEarningsTypedDict, - PutV1ExternalPayrollExternalPayrollItems, - PutV1ExternalPayrollExternalPayrollItemsTypedDict, - PutV1ExternalPayrollRequest, - PutV1ExternalPayrollRequestBody, - PutV1ExternalPayrollRequestBodyTypedDict, - PutV1ExternalPayrollRequestTypedDict, - PutV1ExternalPayrollTaxes, - PutV1ExternalPayrollTaxesTypedDict, -) -from .put_v1_garnishments_garnishment_idop import ( - PutV1GarnishmentsGarnishmentIDRequest, - PutV1GarnishmentsGarnishmentIDRequestBody, - PutV1GarnishmentsGarnishmentIDRequestBodyTypedDict, - PutV1GarnishmentsGarnishmentIDRequestTypedDict, -) -from .put_v1_historical_employeesop import ( - PutV1HistoricalEmployeesEmployeeStateTaxes, - PutV1HistoricalEmployeesEmployeeStateTaxesTypedDict, - PutV1HistoricalEmployeesHomeAddress, - PutV1HistoricalEmployeesHomeAddressTypedDict, - PutV1HistoricalEmployeesJob, - PutV1HistoricalEmployeesJobTypedDict, - PutV1HistoricalEmployeesRequest, - PutV1HistoricalEmployeesRequestBody, - PutV1HistoricalEmployeesRequestBodyTypedDict, - PutV1HistoricalEmployeesRequestTypedDict, - PutV1HistoricalEmployeesTermination, - PutV1HistoricalEmployeesTerminationTypedDict, - PutV1HistoricalEmployeesWorkAddress, - PutV1HistoricalEmployeesWorkAddressTypedDict, -) -from .put_v1_home_addresses_home_address_uuidop import ( - PutV1HomeAddressesHomeAddressUUIDRequest, - PutV1HomeAddressesHomeAddressUUIDRequestBody, - PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict, - PutV1HomeAddressesHomeAddressUUIDRequestTypedDict, -) -from .put_v1_jobs_job_idop import ( - PutV1JobsJobIDRequest, - PutV1JobsJobIDRequestBody, - PutV1JobsJobIDRequestBodyTypedDict, - PutV1JobsJobIDRequestTypedDict, -) -from .put_v1_locations_location_idop import ( - HeaderXGustoAPIVersion, - PutV1LocationsLocationIDRequest, - PutV1LocationsLocationIDRequestBody, - PutV1LocationsLocationIDRequestBodyTypedDict, - PutV1LocationsLocationIDRequestTypedDict, -) -from .put_v1_partner_managed_companies_company_uuid_migrateop import ( - MigrationStatus, - PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequest, - PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequestBody, - PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequestBodyTypedDict, - PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequestTypedDict, - PutV1PartnerManagedCompaniesCompanyUUIDMigrateResponseBody, - PutV1PartnerManagedCompaniesCompanyUUIDMigrateResponseBodyTypedDict, -) -from .put_v1_tax_liabilities_finishop import ( - PutV1TaxLiabilitiesFinishRequest, - PutV1TaxLiabilitiesFinishRequestTypedDict, -) -from .put_v1_tax_liabilitiesop import ( - LiabilitySelections, - LiabilitySelectionsTypedDict, - PutV1TaxLiabilitiesRequest, - PutV1TaxLiabilitiesRequestBody, - PutV1TaxLiabilitiesRequestBodyTypedDict, - PutV1TaxLiabilitiesRequestTypedDict, -) -from .put_v1_terminations_employee_idop import ( - PutV1TerminationsEmployeeIDRequest, - PutV1TerminationsEmployeeIDRequestBody, - PutV1TerminationsEmployeeIDRequestBodyTypedDict, - PutV1TerminationsEmployeeIDRequestTypedDict, -) -from .put_v1_time_off_policies_time_off_policy_uuid_deactivateop import ( - PutV1TimeOffPoliciesTimeOffPolicyUUIDDeactivateRequest, - PutV1TimeOffPoliciesTimeOffPolicyUUIDDeactivateRequestTypedDict, -) -from .put_v1_time_off_policies_time_off_policy_uuid_remove_employeesop import ( - PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesEmployees, - PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesEmployeesTypedDict, - PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequest, - PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequestBody, - PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequestBodyTypedDict, - PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequestTypedDict, -) -from .put_v1_verify_webhook_subscription_uuidop import ( - PutV1VerifyWebhookSubscriptionUUIDRequest, - PutV1VerifyWebhookSubscriptionUUIDRequestBody, - PutV1VerifyWebhookSubscriptionUUIDRequestBodyTypedDict, - PutV1VerifyWebhookSubscriptionUUIDRequestTypedDict, - PutV1VerifyWebhookSubscriptionUUIDSecurity, - PutV1VerifyWebhookSubscriptionUUIDSecurityTypedDict, -) -from .put_v1_webhook_subscription_uuidop import ( - PutV1WebhookSubscriptionUUIDRequest, - PutV1WebhookSubscriptionUUIDRequestBody, - PutV1WebhookSubscriptionUUIDRequestBodyTypedDict, - PutV1WebhookSubscriptionUUIDRequestTypedDict, - PutV1WebhookSubscriptionUUIDSecurity, - PutV1WebhookSubscriptionUUIDSecurityTypedDict, - PutV1WebhookSubscriptionUUIDSubscriptionTypes, -) -from .put_v1_work_addresses_work_address_uuidop import ( - PutV1WorkAddressesWorkAddressUUIDRequest, - PutV1WorkAddressesWorkAddressUUIDRequestBody, - PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict, - PutV1WorkAddressesWorkAddressUUIDRequestTypedDict, -) -from .put_version_time_off_policies_time_off_policy_uuid_add_employeesop import ( - PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesEmployees, - PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesEmployeesTypedDict, - PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequest, - PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequestBody, - PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequestBodyTypedDict, - PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequestTypedDict, -) -from .put_version_time_off_policies_time_off_policy_uuid_balanceop import ( - PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceEmployees, - PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceEmployeesTypedDict, - PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequest, - PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequestBody, - PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequestBodyTypedDict, - PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequestTypedDict, -) -from .put_wire_in_requests_wire_in_request_uuidop import ( - PutWireInRequestsWireInRequestUUIDRequest, - PutWireInRequestsWireInRequestUUIDRequestBody, - PutWireInRequestsWireInRequestUUIDRequestBodyTypedDict, - PutWireInRequestsWireInRequestUUIDRequestTypedDict, -) -from .recovery_case import RecoveryCase, RecoveryCaseStatus, RecoveryCaseTypedDict -from .redebit_recovery_caseop import ( - RedebitRecoveryCaseRequest, - RedebitRecoveryCaseRequestTypedDict, -) -from .refresh_access_tokenop import ( - RefreshAccessTokenRequest, - RefreshAccessTokenRequestBody, - RefreshAccessTokenRequestBodyTypedDict, - RefreshAccessTokenRequestTypedDict, -) -from .rehire import Rehire, RehireEmploymentStatus, RehireTypedDict -from .rehire_body import EmploymentStatus, RehireBody, RehireBodyTypedDict -from .report import Report, ReportTypedDict -from .report_template import ReportTemplate, ReportTemplateTypedDict -from .security import Security, SecurityTypedDict -from .signatory import ( - HomeAddress, - HomeAddressTypedDict, - IdentityVerificationStatus, - Signatory, - SignatoryTypedDict, -) -from .sort_order import SortOrder -from .supported_benefit import SupportedBenefit, SupportedBenefitTypedDict -from .tax_liabilities_selections import ( - PossibleLiabilities, - PossibleLiabilitiesTypedDict, - TaxLiabilitiesSelections, - TaxLiabilitiesSelectionsTypedDict, -) -from .tax_requirement import ( - ApplicableIf, - ApplicableIfTypedDict, - TaxRequirement, - TaxRequirementApplicableIfValue, - TaxRequirementApplicableIfValueTypedDict, - TaxRequirementTypedDict, - TaxRequirementValue, - TaxRequirementValueTypedDict, -) -from .tax_requirement_metadata import ( - RateType, - TaxRequirementMetadata, - TaxRequirementMetadataOptions, - TaxRequirementMetadataOptionsTypedDict, - TaxRequirementMetadataType, - TaxRequirementMetadataTypedDict, - TaxRequirementMetadataValidationType, - TaxRequirementMetadataValue, - TaxRequirementMetadataValueTypedDict, - Validation, - ValidationTypedDict, -) -from .tax_requirement_set import TaxRequirementSet, TaxRequirementSetTypedDict -from .tax_requirements_state import TaxRequirementsState, TaxRequirementsStateTypedDict -from .termination import Termination, TerminationTypedDict -from .time_off_activity import TimeOffActivity, TimeOffActivityTypedDict, TimeOffType -from .time_off_policy import ( - PolicyType, - TimeOffPolicy, - TimeOffPolicyEmployees, - TimeOffPolicyEmployeesTypedDict, - TimeOffPolicyTypedDict, -) -from .unprocessable_entity_error_object_error import ( - UnprocessableEntityErrorObjectError, - UnprocessableEntityErrorObjectErrorData, -) -from .unprocessed_termination_pay_period import ( - UnprocessedTerminationPayPeriod, - UnprocessedTerminationPayPeriodTypedDict, -) -from .versionheader import VersionHeader -from .webhook_subscription import ( - SubscriptionTypes, - WebhookSubscription, - WebhookSubscriptionStatus, - WebhookSubscriptionTypedDict, -) -from .wire_in_request import ( - PaymentUUID, - WireInRequest, - WireInRequestStatus, - WireInRequestTypedDict, -) -from .ytd_benefit_amounts_from_different_company import ( - YtdBenefitAmountsFromDifferentCompany, - YtdBenefitAmountsFromDifferentCompanyTypedDict, -) +from .gustoerror import GustoError +from typing import TYPE_CHECKING +from importlib import import_module +import builtins +import sys +if TYPE_CHECKING: + from .accruing_time_off_hour import ( + AccruingTimeOffHour, + AccruingTimeOffHourTypedDict, + ) + from .accruing_time_off_hour_object import ( + AccruingTimeOffHourObject, + AccruingTimeOffHourObjectTypedDict, + ) + from .ach_transaction import ( + AchTransaction, + AchTransactionRecipientType, + AchTransactionTypedDict, + PaymentDirection, + PaymentEventType, + PaymentStatus, + ) + from .admin import Admin, AdminTypedDict + from .apierror import APIError + from .authentication import Authentication, AuthenticationTypedDict + from .benefit_summary import ( + BenefitSummary, + BenefitSummaryEmployees, + BenefitSummaryEmployeesTypedDict, + BenefitSummaryPayPeriod, + BenefitSummaryPayPeriodTypedDict, + BenefitSummaryTypedDict, + PayrollBenefits, + PayrollBenefitsTypedDict, + ) + from .benefit_type_requirements import ( + BenefitTypeRequirements, + BenefitTypeRequirementsCatchUpDefaultValue, + BenefitTypeRequirementsCatchUpDefaultValueTypedDict, + BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValue, + BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValueTypedDict, + BenefitTypeRequirementsContribution, + BenefitTypeRequirementsContributionTypedDict, + BenefitTypeRequirementsCoverageAmountDefaultValue, + BenefitTypeRequirementsCoverageAmountDefaultValueTypedDict, + BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValue, + BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValueTypedDict, + BenefitTypeRequirementsDeductAsPercentageDefaultValue, + BenefitTypeRequirementsDeductAsPercentageDefaultValueTypedDict, + BenefitTypeRequirementsDefaultValue, + BenefitTypeRequirementsDefaultValueTypedDict, + BenefitTypeRequirementsLimitOptionDefaultValue, + BenefitTypeRequirementsLimitOptionDefaultValueTypedDict, + BenefitTypeRequirementsTypedDict, + CatchUp, + CatchUpTypedDict, + CompanyContributionAnnualMaximum, + CompanyContributionAnnualMaximumTypedDict, + CoverageAmount, + CoverageAmountTypedDict, + CoverageSalaryMultiplier, + CoverageSalaryMultiplierTypedDict, + DeductAsPercentage, + DeductAsPercentageTypedDict, + DefaultValue, + DefaultValueTypedDict, + EmployeeDeduction, + EmployeeDeductionTypedDict, + LimitOption, + LimitOptionTypedDict, + ) + from .bls_occupation import BLSOccupation, BLSOccupationTypedDict + from .child_support_data import ( + Agencies, + AgenciesTypedDict, + ChildSupportData, + ChildSupportDataTypedDict, + FipsCodes, + FipsCodesTypedDict, + Key, + RequiredAttributes, + RequiredAttributesTypedDict, + ) + from .company import ( + Company, + CompanyHomeAddress, + CompanyHomeAddressTypedDict, + CompanyPaidTimeOff, + CompanyPaidTimeOffTypedDict, + CompanyStatus, + CompanyTypedDict, + Compensations, + CompensationsTypedDict, + EntityType, + Fixed, + FixedTypedDict, + FundingType, + Hourly, + HourlyTypedDict, + PayScheduleType, + PrimaryPayrollAdmin, + PrimaryPayrollAdminTypedDict, + PrimarySignatory, + PrimarySignatoryTypedDict, + Tier, + ) + from .company_address import CompanyAddress, CompanyAddressTypedDict + from .company_attachment import ( + Category, + CompanyAttachment, + CompanyAttachmentTypedDict, + ) + from .company_bank_account import ( + AccountType, + CompanyBankAccount, + CompanyBankAccountTypedDict, + PlaidStatus, + VerificationStatus, + VerificationType, + ) + from .company_bank_account_request import ( + CompanyBankAccountRequest, + CompanyBankAccountRequestAccountType, + CompanyBankAccountRequestTypedDict, + ) + from .company_benefit import CompanyBenefit, CompanyBenefitTypedDict, Source + from .company_benefit_with_employee_benefits import ( + CompanyBenefitWithEmployeeBenefits, + CompanyBenefitWithEmployeeBenefitsContribution, + CompanyBenefitWithEmployeeBenefitsContributionTypedDict, + CompanyBenefitWithEmployeeBenefitsSource, + CompanyBenefitWithEmployeeBenefitsTypedDict, + CompanyBenefitWithEmployeeBenefitsValue, + CompanyBenefitWithEmployeeBenefitsValue2, + CompanyBenefitWithEmployeeBenefitsValue2TypedDict, + CompanyBenefitWithEmployeeBenefitsValueTiers, + CompanyBenefitWithEmployeeBenefitsValueTiersTypedDict, + CompanyBenefitWithEmployeeBenefitsValueTypedDict, + EmployeeBenefitsModel, + EmployeeBenefitsModelTypedDict, + ) + from .company_custom_field import CompanyCustomField, CompanyCustomFieldTypedDict + from .company_custom_field_list import ( + CompanyCustomFieldList, + CompanyCustomFieldListTypedDict, + ) + from .company_forms_sort_by import CompanyFormsSortBy + from .company_onboarding_status import ( + CompanyOnboardingStatus, + CompanyOnboardingStatusTypedDict, + ID, + OnboardingStep, + OnboardingStepTypedDict, + Requirements, + ) + from .company_suspension import ( + CompanySuspension, + CompanySuspensionTypedDict, + ReconcileTaxMethod, + TaxRefunds, + TaxRefundsTypedDict, + ) + from .company_suspension_creation_errors_error import ( + CompanySuspensionCreationErrorsError, + CompanySuspensionCreationErrorsErrorData, + ) + from .compensation import ( + Compensation, + CompensationTypedDict, + MinimumWages, + MinimumWagesTypedDict, + PaymentUnit, + ) + from .contractor import ( + Address, + AddressTypedDict, + Contractor, + ContractorOnboardingStatus1, + ContractorPaymentMethod1, + ContractorType, + ContractorTypedDict, + WageType, + ) + from .contractor_address import ContractorAddress, ContractorAddressTypedDict + from .contractor_bank_account import ( + ContractorBankAccount, + ContractorBankAccountAccountType, + ContractorBankAccountTypedDict, + ) + from .contractor_onboarding_status import ( + ContractorOnboardingStatus, + ContractorOnboardingStatusOnboardingStatus, + ContractorOnboardingStatusOnboardingStep, + ContractorOnboardingStatusOnboardingStepTypedDict, + ContractorOnboardingStatusTypedDict, + ) + from .contractor_payment import ( + ContractorPayment, + ContractorPaymentPaymentMethod, + ContractorPaymentStatus, + ContractorPaymentTypedDict, + ContractorPaymentWageType, + ) + from .contractor_payment_details_list import ( + ContractorPaymentDetailsList, + ContractorPaymentDetailsListPaymentMethod, + ContractorPaymentDetailsListSplitBy, + ContractorPaymentDetailsListTypedDict, + Splits, + SplitsTypedDict, + ) + from .contractor_payment_for_group import ( + ContractorPaymentForGroup, + ContractorPaymentForGroupPaymentMethod, + ContractorPaymentForGroupStatus, + ContractorPaymentForGroupTypedDict, + ContractorPaymentForGroupWageType, + ) + from .contractor_payment_for_group_preview import ( + ContractorPaymentForGroupPreview, + ContractorPaymentForGroupPreviewPaymentMethod, + ContractorPaymentForGroupPreviewStatus, + ContractorPaymentForGroupPreviewTypedDict, + ContractorPaymentForGroupPreviewWageType, + ) + from .contractor_payment_group import ( + ContractorPaymentGroup, + ContractorPaymentGroupStatus, + ContractorPaymentGroupTotals, + ContractorPaymentGroupTotalsTypedDict, + ContractorPaymentGroupTypedDict, + ) + from .contractor_payment_group_partner_disbursements import ( + ContractorPaymentGroupPartnerDisbursements, + ContractorPaymentGroupPartnerDisbursementsPaymentMethod, + ContractorPaymentGroupPartnerDisbursementsPaymentStatus, + ContractorPaymentGroupPartnerDisbursementsTypedDict, + Disbursements, + DisbursementsTypedDict, + ) + from .contractor_payment_group_preview import ( + ContractorPaymentGroupPreview, + ContractorPaymentGroupPreviewStatus, + ContractorPaymentGroupPreviewTotals, + ContractorPaymentGroupPreviewTotalsTypedDict, + ContractorPaymentGroupPreviewTypedDict, + ) + from .contractor_payment_group_with_blockers import ( + ContractorPaymentGroupWithBlockers, + ContractorPaymentGroupWithBlockersStatus, + ContractorPaymentGroupWithBlockersTotals, + ContractorPaymentGroupWithBlockersTotalsTypedDict, + ContractorPaymentGroupWithBlockersTypedDict, + ) + from .contractor_payment_method import ( + ContractorPaymentMethod, + ContractorPaymentMethodSplitBy, + ContractorPaymentMethodType, + ContractorPaymentMethodTypedDict, + ) + from .contractor_payment_receipt import ( + ContractorPaymentReceipt, + ContractorPaymentReceiptLicensee, + ContractorPaymentReceiptLicenseeTypedDict, + ContractorPaymentReceiptPaymentMethod, + ContractorPaymentReceiptTotals, + ContractorPaymentReceiptTotalsTypedDict, + ContractorPaymentReceiptTypedDict, + ContractorPaymentsModel, + ContractorPaymentsModelTypedDict, + ) + from .contractor_payment_summary import ( + ContractorPaymentSummary, + ContractorPaymentSummaryContractorPayments, + ContractorPaymentSummaryContractorPaymentsTypedDict, + ContractorPaymentSummaryTypedDict, + Total, + TotalTypedDict, + ) + from .contractor_payment_summary_by_dates import ( + ContractorPaymentSummaryByDates, + ContractorPaymentSummaryByDatesContractorPayments, + ContractorPaymentSummaryByDatesContractorPaymentsTypedDict, + ContractorPaymentSummaryByDatesTotal, + ContractorPaymentSummaryByDatesTotalTypedDict, + ContractorPaymentSummaryByDatesTypedDict, + ) + from .contractors_sort_by import ContractorsSortBy + from .contribution_exclusion import ( + ContributionExclusion, + ContributionExclusionTypedDict, + ) + from .create_report import CreateReport, CreateReportTypedDict + from .custom_field_type import CustomFieldType + from .delete_companies_company_uuid_holiday_pay_policyop import ( + DeleteCompaniesCompanyUUIDHolidayPayPolicyRequest, + DeleteCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict, + ) + from .delete_departmentop import ( + DeleteDepartmentRequest, + DeleteDepartmentRequestTypedDict, + ) + from .delete_v1_companies_company_id_bank_accounts_bank_account_idop import ( + DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion, + DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDRequest, + DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDRequestTypedDict, + ) + from .delete_v1_companies_company_id_contractor_payment_contractor_paymentop import ( + DeleteV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest, + DeleteV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict, + ) + from .delete_v1_companies_company_id_earning_types_earning_type_uuidop import ( + DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest, + DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict, + ) + from .delete_v1_companies_company_id_payrollsop import ( + DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion, + DeleteV1CompaniesCompanyIDPayrollsRequest, + DeleteV1CompaniesCompanyIDPayrollsRequestTypedDict, + ) + from .delete_v1_companies_company_uuid_signatories_signatory_uuidop import ( + DeleteV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequest, + DeleteV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestTypedDict, + ) + from .delete_v1_company_benefits_company_benefit_idop import ( + Base, + BaseTypedDict, + DeleteV1CompanyBenefitsCompanyBenefitIDErrors, + DeleteV1CompanyBenefitsCompanyBenefitIDErrorsTypedDict, + DeleteV1CompanyBenefitsCompanyBenefitIDRequest, + DeleteV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, + DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody, + DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, + ) + from .delete_v1_compensations_compensation_idop import ( + DeleteV1CompensationsCompensationIDRequest, + DeleteV1CompensationsCompensationIDRequestTypedDict, + ) + from .delete_v1_contractor_payment_groups_contractor_payment_group_idop import ( + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion, + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequest, + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict, + ) + from .delete_v1_contractors_contractor_uuidop import ( + DeleteV1ContractorsContractorUUIDRequest, + DeleteV1ContractorsContractorUUIDRequestTypedDict, + ) + from .delete_v1_employee_benefits_employee_benefit_idop import ( + DeleteV1EmployeeBenefitsEmployeeBenefitIDRequest, + DeleteV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, + ) + from .delete_v1_employeeop import ( + DeleteV1EmployeeHeaderXGustoAPIVersion, + DeleteV1EmployeeRequest, + DeleteV1EmployeeRequestTypedDict, + ) + from .delete_v1_employees_employee_id_bank_accounts_bank_account_idop import ( + DeleteV1EmployeesEmployeeIDBankAccountsBankAccountIDRequest, + DeleteV1EmployeesEmployeeIDBankAccountsBankAccountIDRequestTypedDict, + ) + from .delete_v1_employees_employee_id_i9_authorization_documents_document_idop import ( + DeleteV1EmployeesEmployeeIDI9AuthorizationDocumentsDocumentIDRequest, + DeleteV1EmployeesEmployeeIDI9AuthorizationDocumentsDocumentIDRequestTypedDict, + ) + from .delete_v1_employees_employee_id_rehireop import ( + DeleteV1EmployeesEmployeeIDRehireRequest, + DeleteV1EmployeesEmployeeIDRehireRequestTypedDict, + ) + from .delete_v1_employees_employee_id_terminationsop import ( + DeleteV1EmployeesEmployeeIDTerminationsRequest, + DeleteV1EmployeesEmployeeIDTerminationsRequestTypedDict, + ) + from .delete_v1_external_payrollop import ( + DeleteV1ExternalPayrollRequest, + DeleteV1ExternalPayrollRequestTypedDict, + ) + from .delete_v1_home_addresses_home_address_uuidop import ( + DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion, + DeleteV1HomeAddressesHomeAddressUUIDRequest, + DeleteV1HomeAddressesHomeAddressUUIDRequestTypedDict, + ) + from .delete_v1_jobs_job_idop import ( + DeleteV1JobsJobIDRequest, + DeleteV1JobsJobIDRequestTypedDict, + ) + from .delete_v1_recurring_reimbursementsop import ( + DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion, + DeleteV1RecurringReimbursementsRequest, + DeleteV1RecurringReimbursementsRequestTypedDict, + ) + from .delete_v1_webhook_subscription_uuidop import ( + DeleteV1WebhookSubscriptionUUIDRequest, + DeleteV1WebhookSubscriptionUUIDRequestTypedDict, + DeleteV1WebhookSubscriptionUUIDSecurity, + DeleteV1WebhookSubscriptionUUIDSecurityTypedDict, + ) + from .delete_v1_work_addresses_work_address_uuidop import ( + DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion, + DeleteV1WorkAddressesWorkAddressUUIDRequest, + DeleteV1WorkAddressesWorkAddressUUIDRequestTypedDict, + ) + from .department import ( + ContractorsModel, + ContractorsModelTypedDict, + Department, + DepartmentEmployees, + DepartmentEmployeesTypedDict, + DepartmentTypedDict, + ) + from .detailedpaymentaccountsplit import ( + DetailedPaymentAccountSplit, + DetailedPaymentAccountSplitTypedDict, + ) + from .document import ( + Document, + DocumentTypedDict, + Fields, + FieldsTypedDict, + Pages, + PagesTypedDict, + RecipientType, + ) + from .document_pdf import DocumentPdf, DocumentPdfTypedDict + from .document_signed import ( + DocumentSigned, + DocumentSignedRecipientType, + DocumentSignedTypedDict, + ) + from .document_type import DocumentType + from .earning_type import EarningType, EarningTypeTypedDict + from .earning_type_list import EarningTypeList, EarningTypeListTypedDict + from .employee import ( + Employee, + EmployeeCurrentEmploymentStatus, + EmployeeOnboardingDocumentsConfig, + EmployeeOnboardingDocumentsConfigTypedDict, + EmployeeOnboardingStatus1, + EmployeePaymentMethod1, + EmployeeTypedDict, + ) + from .employee_address import EmployeeAddress, EmployeeAddressTypedDict + from .employee_bank_account import ( + EmployeeBankAccount, + EmployeeBankAccountAccountType, + EmployeeBankAccountTypedDict, + ) + from .employee_benefit import ( + Contribution, + ContributionTypedDict, + DeductionReducesTaxableIncome, + EmployeeBenefit, + EmployeeBenefitTypedDict, + EmployeeBenefitValue, + EmployeeBenefitValueTypedDict, + Tiers, + TiersTypedDict, + Two, + TwoTypedDict, + ) + from .employee_benefit_for_company_benefit import ( + EmployeeBenefitForCompanyBenefit, + EmployeeBenefitForCompanyBenefitContribution, + EmployeeBenefitForCompanyBenefitContributionTypedDict, + EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome, + EmployeeBenefitForCompanyBenefitTypedDict, + EmployeeBenefitForCompanyBenefitValue, + EmployeeBenefitForCompanyBenefitValueTypedDict, + Value2, + Value2TypedDict, + ValueTiers, + ValueTiersTypedDict, + ) + from .employee_custom_field import EmployeeCustomField, EmployeeCustomFieldTypedDict + from .employee_federal_tax import ( + EmployeeFederalTax, + EmployeeFederalTaxTypedDict, + W4DataType, + ) + from .employee_home_address import EmployeeHomeAddress, EmployeeHomeAddressTypedDict + from .employee_onboarding_document import ( + EmployeeOnboardingDocument, + EmployeeOnboardingDocumentTypedDict, + ) + from .employee_onboarding_status import ( + EmployeeOnboardingStatus, + EmployeeOnboardingStatusOnboardingStep, + EmployeeOnboardingStatusOnboardingStepTypedDict, + EmployeeOnboardingStatusTypedDict, + ) + from .employee_pay_stubs_list import ( + EmployeePayStubsList, + EmployeePayStubsListPaymentMethod, + EmployeePayStubsListTypedDict, + ) + from .employee_payment_method import ( + EmployeePaymentMethod, + EmployeePaymentMethodSplitBy, + EmployeePaymentMethodType, + EmployeePaymentMethodTypedDict, + ) + from .employee_state_tax_answer import ( + EmployeeStateTaxAnswer, + EmployeeStateTaxAnswerTypedDict, + Value, + ValueTypedDict, + ) + from .employee_state_tax_input_question_format import ( + EmployeeStateTaxInputQuestionFormat, + EmployeeStateTaxInputQuestionFormatTypedDict, + EmployeeStateTaxInputQuestionFormatValue, + EmployeeStateTaxInputQuestionFormatValueTypedDict, + Options, + OptionsTypedDict, + ) + from .employee_state_tax_question import ( + EmployeeStateTaxQuestion, + EmployeeStateTaxQuestionTypedDict, + ) + from .employee_state_taxes_list import ( + EmployeeStateTaxesList, + EmployeeStateTaxesListTypedDict, + ) + from .employee_state_taxes_request import ( + Answers, + AnswersTypedDict, + EmployeeStateTaxesRequest, + EmployeeStateTaxesRequestTypedDict, + EmployeeStateTaxesRequestValue, + EmployeeStateTaxesRequestValueTypedDict, + Questions, + QuestionsTypedDict, + States, + StatesTypedDict, + ) + from .employee_work_address import EmployeeWorkAddress, EmployeeWorkAddressTypedDict + from .employeepaymentdetail import ( + EmployeePaymentDetail, + EmployeePaymentDetailPaymentMethod, + EmployeePaymentDetailTypedDict, + SplitBy, + ) + from .employment_history_list import ( + EmploymentHistoryList, + EmploymentHistoryListEmploymentStatus, + EmploymentHistoryListTypedDict, + ) + from .entity_error_object import ( + EntityErrorObject, + EntityErrorObjectTypedDict, + Metadata, + MetadataTypedDict, + ) + from .event import Event, EventTypedDict, ResourceType + from .external_payroll import ( + ApplicableBenefits, + ApplicableBenefitsTypedDict, + ApplicableEarnings, + ApplicableEarningsTypedDict, + ApplicableTaxes, + ApplicableTaxesTypedDict, + Benefits, + BenefitsTypedDict, + Earnings, + EarningsTypedDict, + ExternalPayroll, + ExternalPayrollItems, + ExternalPayrollItemsTypedDict, + ExternalPayrollMetadata, + ExternalPayrollMetadataTypedDict, + ExternalPayrollTaxes, + ExternalPayrollTaxesTypedDict, + ExternalPayrollTypedDict, + Status, + ) + from .external_payroll_basic import ( + ExternalPayrollBasic, + ExternalPayrollBasicStatus, + ExternalPayrollBasicTypedDict, + ) + from .external_payroll_tax_suggestions import ( + ExternalPayrollTaxSuggestions, + ExternalPayrollTaxSuggestionsTypedDict, + TaxSuggestions, + TaxSuggestionsTypedDict, + ) + from .fast_payment_limit_required_body import ( + FastPaymentLimitRequiredBody, + FastPaymentLimitRequiredBodyTypedDict, + ) + from .federal_tax_details import ( + EinVerification, + EinVerificationTypedDict, + FederalTaxDetails, + FederalTaxDetailsStatus, + FederalTaxDetailsTypedDict, + ) + from .flow import Flow, FlowTypedDict + from .flsa_status_type import FlsaStatusType + from .form import Form, FormTypedDict + from .form_1099 import Form1099, Form1099TypedDict + from .form_pdf import FormPdf, FormPdfTypedDict + from .garnishment import Garnishment, GarnishmentType, GarnishmentTypedDict + from .garnishment_child_support import ( + GarnishmentChildSupport, + GarnishmentChildSupportTypedDict, + PaymentPeriod, + ) + from .general_ledger_report import ( + Aggregation, + GeneralLedgerReport, + GeneralLedgerReportTypedDict, + IntegrationType, + ) + from .generated_document import ( + GeneratedDocument, + GeneratedDocumentStatus, + GeneratedDocumentTypedDict, + ) + from .get_ach_transactionsop import ( + GetAchTransactionsRequest, + GetAchTransactionsRequestTypedDict, + ) + from .get_companies_company_uuid_contractor_payments_previewop import ( + CheckDate, + CheckDateTypedDict, + GetCompaniesCompanyUUIDContractorPaymentsPreviewBase, + GetCompaniesCompanyUUIDContractorPaymentsPreviewBaseTypedDict, + GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPayments, + GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBody, + GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBodyData, + GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsTypedDict, + GetCompaniesCompanyUUIDContractorPaymentsPreviewErrors, + GetCompaniesCompanyUUIDContractorPaymentsPreviewErrorsTypedDict, + GetCompaniesCompanyUUIDContractorPaymentsPreviewRequest, + GetCompaniesCompanyUUIDContractorPaymentsPreviewRequestBody, + GetCompaniesCompanyUUIDContractorPaymentsPreviewRequestBodyTypedDict, + GetCompaniesCompanyUUIDContractorPaymentsPreviewRequestTypedDict, + GetCompaniesCompanyUUIDContractorPaymentsPreviewResponseBody, + GetCompaniesCompanyUUIDContractorPaymentsPreviewResponseBodyTypedDict, + ) + from .get_companies_company_uuid_holiday_pay_policyop import ( + GetCompaniesCompanyUUIDHolidayPayPolicyRequest, + GetCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict, + ) + from .get_companies_company_uuid_paid_holidaysop import ( + GetCompaniesCompanyUUIDPaidHolidaysRequest, + GetCompaniesCompanyUUIDPaidHolidaysRequestBody, + GetCompaniesCompanyUUIDPaidHolidaysRequestBodyTypedDict, + GetCompaniesCompanyUUIDPaidHolidaysRequestTypedDict, + ) + from .get_companies_company_uuid_report_templates_report_typeop import ( + GetCompaniesCompanyUUIDReportTemplatesReportTypeRequest, + GetCompaniesCompanyUUIDReportTemplatesReportTypeRequestTypedDict, + ) + from .get_companies_company_uuid_suspensionsop import ( + GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion, + GetCompaniesCompanyUUIDSuspensionsRequest, + GetCompaniesCompanyUUIDSuspensionsRequestTypedDict, + ) + from .get_companies_company_uuid_time_off_policiesop import ( + GetCompaniesCompanyUUIDTimeOffPoliciesRequest, + GetCompaniesCompanyUUIDTimeOffPoliciesRequestTypedDict, + ) + from .get_companies_company_uuid_wire_in_request_uuidop import ( + GetCompaniesCompanyUUIDWireInRequestUUIDRequest, + GetCompaniesCompanyUUIDWireInRequestUUIDRequestTypedDict, + ) + from .get_companies_departmentsop import ( + GetCompaniesDepartmentsRequest, + GetCompaniesDepartmentsRequestTypedDict, + ) + from .get_company_notificationsop import ( + GetCompanyNotificationsHeaderXGustoAPIVersion, + GetCompanyNotificationsRequest, + GetCompanyNotificationsRequestTypedDict, + QueryParamStatus, + ) + from .get_departmentop import GetDepartmentRequest, GetDepartmentRequestTypedDict + from .get_employee_ytd_benefit_amounts_from_different_companyop import ( + GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, + GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict, + ) + from .get_eventsop import ( + GetEventsRequest, + GetEventsRequestTypedDict, + GetEventsSecurity, + GetEventsSecurityTypedDict, + ) + from .get_information_requestsop import ( + GetInformationRequestsRequest, + GetInformationRequestsRequestTypedDict, + ) + from .get_invoices_invoice_periodop import ( + GetInvoicesInvoicePeriodRequest, + GetInvoicesInvoicePeriodRequestTypedDict, + GetInvoicesInvoicePeriodSecurity, + GetInvoicesInvoicePeriodSecurityTypedDict, + ) + from .get_notifications_notification_uuidop import ( + GetNotificationsNotificationUUIDRequest, + GetNotificationsNotificationUUIDRequestTypedDict, + ) + from .get_recovery_casesop import ( + GetRecoveryCasesRequest, + GetRecoveryCasesRequestTypedDict, + ) + from .get_reports_request_uuidop import ( + GetReportsRequestUUIDRequest, + GetReportsRequestUUIDRequestTypedDict, + ) + from .get_time_off_policies_time_off_policy_uuidop import ( + GetTimeOffPoliciesTimeOffPolicyUUIDRequest, + GetTimeOffPoliciesTimeOffPolicyUUIDRequestTypedDict, + ) + from .get_v1_benefits_benefit_idop import ( + GetV1BenefitsBenefitIDRequest, + GetV1BenefitsBenefitIDRequestTypedDict, + ) + from .get_v1_benefits_benefits_id_requirementsop import ( + GetV1BenefitsBenefitsIDRequirementsRequest, + GetV1BenefitsBenefitsIDRequirementsRequestTypedDict, + ) + from .get_v1_benefits_company_benefit_id_summaryop import ( + GetV1BenefitsCompanyBenefitIDSummaryRequest, + GetV1BenefitsCompanyBenefitIDSummaryRequestTypedDict, + ) + from .get_v1_benefitsop import GetV1BenefitsRequest, GetV1BenefitsRequestTypedDict + from .get_v1_companies_attachment_urlop import ( + GetV1CompaniesAttachmentURLRequest, + GetV1CompaniesAttachmentURLRequestTypedDict, + GetV1CompaniesAttachmentURLResponseBody, + GetV1CompaniesAttachmentURLResponseBodyTypedDict, + ) + from .get_v1_companies_attachmentop import ( + GetV1CompaniesAttachmentRequest, + GetV1CompaniesAttachmentRequestTypedDict, + ) + from .get_v1_companies_attachmentsop import ( + GetV1CompaniesAttachmentsRequest, + GetV1CompaniesAttachmentsRequestTypedDict, + ) + from .get_v1_companies_company_id_adminsop import ( + GetV1CompaniesCompanyIDAdminsRequest, + GetV1CompaniesCompanyIDAdminsRequestTypedDict, + ) + from .get_v1_companies_company_id_bank_accountsop import ( + GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDBankAccountsRequest, + GetV1CompaniesCompanyIDBankAccountsRequestTypedDict, + ) + from .get_v1_companies_company_id_company_benefitsop import ( + GetV1CompaniesCompanyIDCompanyBenefitsRequest, + GetV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict, + ) + from .get_v1_companies_company_id_contractor_payment_contractor_paymentop import ( + GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest, + GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict, + ) + from .get_v1_companies_company_id_contractor_payment_groupsop import ( + GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDContractorPaymentGroupsRequest, + GetV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict, + ) + from .get_v1_companies_company_id_contractor_paymentsop import ( + GetV1CompaniesCompanyIDContractorPaymentsRequest, + GetV1CompaniesCompanyIDContractorPaymentsRequestTypedDict, + GetV1CompaniesCompanyIDContractorPaymentsResponseBody, + GetV1CompaniesCompanyIDContractorPaymentsResponseBodyTypedDict, + ) + from .get_v1_companies_company_id_contractors_payment_detailsop import ( + GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest, + GetV1CompaniesCompanyIDContractorsPaymentDetailsRequestTypedDict, + ) + from .get_v1_companies_company_id_custom_fieldsop import ( + GetV1CompaniesCompanyIDCustomFieldsRequest, + GetV1CompaniesCompanyIDCustomFieldsRequestTypedDict, + ) + from .get_v1_companies_company_id_earning_typesop import ( + GetV1CompaniesCompanyIDEarningTypesRequest, + GetV1CompaniesCompanyIDEarningTypesRequestTypedDict, + ) + from .get_v1_companies_company_id_employees_payment_detailsop import ( + GetV1CompaniesCompanyIDEmployeesPaymentDetailsRequest, + GetV1CompaniesCompanyIDEmployeesPaymentDetailsRequestTypedDict, + ) + from .get_v1_companies_company_id_employeesop import ( + GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDEmployeesRequest, + GetV1CompaniesCompanyIDEmployeesRequestTypedDict, + Include, + ) + from .get_v1_companies_company_id_federal_tax_detailsop import ( + GetV1CompaniesCompanyIDFederalTaxDetailsRequest, + GetV1CompaniesCompanyIDFederalTaxDetailsRequestTypedDict, + ) + from .get_v1_companies_company_id_locationsop import ( + GetV1CompaniesCompanyIDLocationsRequest, + GetV1CompaniesCompanyIDLocationsRequestTypedDict, + ) + from .get_v1_companies_company_id_pay_periodsop import ( + GetV1CompaniesCompanyIDPayPeriodsRequest, + GetV1CompaniesCompanyIDPayPeriodsRequestTypedDict, + ) + from .get_v1_companies_company_id_pay_schedules_assignmentsop import ( + GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequest, + GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequestTypedDict, + ) + from .get_v1_companies_company_id_pay_schedules_pay_schedule_idop import ( + GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequest, + GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestTypedDict, + ) + from .get_v1_companies_company_id_pay_schedules_previewop import ( + GetV1CompaniesCompanyIDPaySchedulesPreviewRequest, + GetV1CompaniesCompanyIDPaySchedulesPreviewRequestTypedDict, + GetV1CompaniesCompanyIDPaySchedulesPreviewResponseBody, + GetV1CompaniesCompanyIDPaySchedulesPreviewResponseBodyTypedDict, + PayPeriods, + PayPeriodsTypedDict, + QueryParamFrequency, + ) + from .get_v1_companies_company_id_pay_schedulesop import ( + GetV1CompaniesCompanyIDPaySchedulesRequest, + GetV1CompaniesCompanyIDPaySchedulesRequestTypedDict, + ) + from .get_v1_companies_company_id_payroll_reversalsop import ( + GetV1CompaniesCompanyIDPayrollReversalsRequest, + GetV1CompaniesCompanyIDPayrollReversalsRequestTypedDict, + ) + from .get_v1_companies_company_id_payrolls_id_partner_disbursementsop import ( + GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest, + GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestTypedDict, + ) + from .get_v1_companies_company_id_payrolls_payroll_idop import ( + GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude, + GetV1CompaniesCompanyIDPayrollsPayrollIDRequest, + GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict, + SortBy, + ) + from .get_v1_companies_company_id_payrollsop import ( + GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion, + GetV1CompaniesCompanyIDPayrollsQueryParamInclude, + GetV1CompaniesCompanyIDPayrollsRequest, + GetV1CompaniesCompanyIDPayrollsRequestTypedDict, + PayrollTypes, + ProcessingStatuses, + QueryParamSortOrder, + ) + from .get_v1_companies_company_id_unprocessed_termination_pay_periodsop import ( + GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequest, + GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequestTypedDict, + ) + from .get_v1_companies_company_uuid_contractorsop import ( + GetV1CompaniesCompanyUUIDContractorsRequest, + GetV1CompaniesCompanyUUIDContractorsRequestTypedDict, + ) + from .get_v1_companies_company_uuid_signatoriesop import ( + GetV1CompaniesCompanyUUIDSignatoriesRequest, + GetV1CompaniesCompanyUUIDSignatoriesRequestTypedDict, + ) + from .get_v1_companies_company_uuid_tax_requirements_stateop import ( + GetV1CompaniesCompanyUUIDTaxRequirementsStateRequest, + GetV1CompaniesCompanyUUIDTaxRequirementsStateRequestTypedDict, + ) + from .get_v1_companies_company_uuid_tax_requirementsop import ( + GetV1CompaniesCompanyUUIDTaxRequirementsRequest, + GetV1CompaniesCompanyUUIDTaxRequirementsRequestTypedDict, + ResponseBody, + ResponseBodyTypedDict, + ) + from .get_v1_companies_payroll_blockers_company_uuidop import ( + GetV1CompaniesPayrollBlockersCompanyUUIDRequest, + GetV1CompaniesPayrollBlockersCompanyUUIDRequestTypedDict, + ) + from .get_v1_companiesop import ( + GetV1CompaniesRequest, + GetV1CompaniesRequestTypedDict, + ) + from .get_v1_company_benefits_company_benefit_id_contribution_exclusionsop import ( + GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest, + GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict, + ) + from .get_v1_company_benefits_company_benefit_id_employee_benefitsop import ( + GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest, + GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict, + ) + from .get_v1_company_benefits_company_benefit_idop import ( + GetV1CompanyBenefitsCompanyBenefitIDRequest, + GetV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, + ) + from .get_v1_company_external_payrollsop import ( + GetV1CompanyExternalPayrollsRequest, + GetV1CompanyExternalPayrollsRequestTypedDict, + ) + from .get_v1_company_finish_onboardingop import ( + GetV1CompanyFinishOnboardingRequest, + GetV1CompanyFinishOnboardingRequestTypedDict, + ) + from .get_v1_company_form_pdfop import ( + GetV1CompanyFormPdfRequest, + GetV1CompanyFormPdfRequestTypedDict, + ) + from .get_v1_company_formop import ( + GetV1CompanyFormRequest, + GetV1CompanyFormRequestTypedDict, + ) + from .get_v1_company_formsop import ( + GetV1CompanyFormsRequest, + GetV1CompanyFormsRequestTypedDict, + ) + from .get_v1_company_industryop import ( + GetV1CompanyIndustryRequest, + GetV1CompanyIndustryRequestTypedDict, + ) + from .get_v1_company_onboarding_statusop import ( + GetV1CompanyOnboardingStatusRequest, + GetV1CompanyOnboardingStatusRequestTypedDict, + ) + from .get_v1_company_payment_configsop import ( + GetV1CompanyPaymentConfigsRequest, + GetV1CompanyPaymentConfigsRequestTypedDict, + ) + from .get_v1_compensations_compensation_idop import ( + GetV1CompensationsCompensationIDRequest, + GetV1CompensationsCompensationIDRequestTypedDict, + ) + from .get_v1_contractor_document_pdfop import ( + GetV1ContractorDocumentPdfRequest, + GetV1ContractorDocumentPdfRequestTypedDict, + ) + from .get_v1_contractor_documentop import ( + GetV1ContractorDocumentRequest, + GetV1ContractorDocumentRequestTypedDict, + ) + from .get_v1_contractor_documentsop import ( + GetV1ContractorDocumentsRequest, + GetV1ContractorDocumentsRequestTypedDict, + ) + from .get_v1_contractor_form_pdfop import ( + GetV1ContractorFormPdfRequest, + GetV1ContractorFormPdfRequestTypedDict, + ) + from .get_v1_contractor_formop import ( + GetV1ContractorFormRequest, + GetV1ContractorFormRequestTypedDict, + ) + from .get_v1_contractor_formsop import ( + GetV1ContractorFormsRequest, + GetV1ContractorFormsRequestTypedDict, + ) + from .get_v1_contractor_payment_groups_contractor_payment_group_idop import ( + GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion, + GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest, + GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict, + ) + from .get_v1_contractor_payment_groups_id_partner_disbursementsop import ( + GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion, + GetV1ContractorPaymentGroupsIDPartnerDisbursementsRequest, + GetV1ContractorPaymentGroupsIDPartnerDisbursementsRequestTypedDict, + ) + from .get_v1_contractor_payments_contractor_payment_uuid_fundop import ( + GetV1ContractorPaymentsContractorPaymentUUIDFundRequest, + GetV1ContractorPaymentsContractorPaymentUUIDFundRequestTypedDict, + ) + from .get_v1_contractor_payments_contractor_payment_uuid_receiptop import ( + GetV1ContractorPaymentsContractorPaymentUUIDReceiptRequest, + GetV1ContractorPaymentsContractorPaymentUUIDReceiptRequestTypedDict, + ) + from .get_v1_contractors_contractor_uuid_addressop import ( + GetV1ContractorsContractorUUIDAddressRequest, + GetV1ContractorsContractorUUIDAddressRequestTypedDict, + ) + from .get_v1_contractors_contractor_uuid_bank_accountsop import ( + GetV1ContractorsContractorUUIDBankAccountsRequest, + GetV1ContractorsContractorUUIDBankAccountsRequestTypedDict, + ) + from .get_v1_contractors_contractor_uuid_onboarding_statusop import ( + GetV1ContractorsContractorUUIDOnboardingStatusRequest, + GetV1ContractorsContractorUUIDOnboardingStatusRequestTypedDict, + ) + from .get_v1_contractors_contractor_uuid_payment_methodop import ( + GetV1ContractorsContractorUUIDPaymentMethodRequest, + GetV1ContractorsContractorUUIDPaymentMethodRequestTypedDict, + ) + from .get_v1_contractors_contractor_uuidop import ( + GetV1ContractorsContractorUUIDRequest, + GetV1ContractorsContractorUUIDRequestTypedDict, + ) + from .get_v1_employee_benefits_employee_benefit_idop import ( + GetV1EmployeeBenefitsEmployeeBenefitIDRequest, + GetV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, + ) + from .get_v1_employee_form_pdfop import ( + GetV1EmployeeFormPdfRequest, + GetV1EmployeeFormPdfRequestTypedDict, + ) + from .get_v1_employee_formop import ( + GetV1EmployeeFormRequest, + GetV1EmployeeFormRequestTypedDict, + ) + from .get_v1_employee_formsop import ( + GetV1EmployeeFormsRequest, + GetV1EmployeeFormsRequestTypedDict, + ) + from .get_v1_employees_employee_id_bank_accountsop import ( + GetV1EmployeesEmployeeIDBankAccountsRequest, + GetV1EmployeesEmployeeIDBankAccountsRequestTypedDict, + ) + from .get_v1_employees_employee_id_custom_fieldsop import ( + GetV1EmployeesEmployeeIDCustomFieldsRequest, + GetV1EmployeesEmployeeIDCustomFieldsRequestTypedDict, + GetV1EmployeesEmployeeIDCustomFieldsResponseBody, + GetV1EmployeesEmployeeIDCustomFieldsResponseBodyTypedDict, + ) + from .get_v1_employees_employee_id_employee_benefitsop import ( + GetV1EmployeesEmployeeIDEmployeeBenefitsRequest, + GetV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict, + ) + from .get_v1_employees_employee_id_employment_historyop import ( + GetV1EmployeesEmployeeIDEmploymentHistoryHeaderXGustoAPIVersion, + GetV1EmployeesEmployeeIDEmploymentHistoryRequest, + GetV1EmployeesEmployeeIDEmploymentHistoryRequestTypedDict, + ) + from .get_v1_employees_employee_id_federal_taxesop import ( + GetV1EmployeesEmployeeIDFederalTaxesRequest, + GetV1EmployeesEmployeeIDFederalTaxesRequestTypedDict, + ) + from .get_v1_employees_employee_id_garnishmentsop import ( + GetV1EmployeesEmployeeIDGarnishmentsRequest, + GetV1EmployeesEmployeeIDGarnishmentsRequestTypedDict, + ) + from .get_v1_employees_employee_id_home_addressesop import ( + GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion, + GetV1EmployeesEmployeeIDHomeAddressesRequest, + GetV1EmployeesEmployeeIDHomeAddressesRequestTypedDict, + ) + from .get_v1_employees_employee_id_i9_authorization_document_optionsop import ( + GetV1EmployeesEmployeeIDI9AuthorizationDocumentOptionsRequest, + GetV1EmployeesEmployeeIDI9AuthorizationDocumentOptionsRequestTypedDict, + ) + from .get_v1_employees_employee_id_i9_authorization_documentsop import ( + GetV1EmployeesEmployeeIDI9AuthorizationDocumentsRequest, + GetV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestTypedDict, + ) + from .get_v1_employees_employee_id_i9_authorizationop import ( + GetV1EmployeesEmployeeIDI9AuthorizationRequest, + GetV1EmployeesEmployeeIDI9AuthorizationRequestTypedDict, + ) + from .get_v1_employees_employee_id_jobsop import ( + GetV1EmployeesEmployeeIDJobsQueryParamInclude, + GetV1EmployeesEmployeeIDJobsRequest, + GetV1EmployeesEmployeeIDJobsRequestTypedDict, + ) + from .get_v1_employees_employee_id_onboarding_statusop import ( + GetV1EmployeesEmployeeIDOnboardingStatusHeaderXGustoAPIVersion, + GetV1EmployeesEmployeeIDOnboardingStatusRequest, + GetV1EmployeesEmployeeIDOnboardingStatusRequestTypedDict, + ) + from .get_v1_employees_employee_id_payment_methodop import ( + GetV1EmployeesEmployeeIDPaymentMethodRequest, + GetV1EmployeesEmployeeIDPaymentMethodRequestTypedDict, + ) + from .get_v1_employees_employee_id_recurring_reimbursementsop import ( + GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion, + GetV1EmployeesEmployeeIDRecurringReimbursementsRequest, + GetV1EmployeesEmployeeIDRecurringReimbursementsRequestTypedDict, + GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBody, + GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBodyTypedDict, + ) + from .get_v1_employees_employee_id_rehireop import ( + GetV1EmployeesEmployeeIDRehireRequest, + GetV1EmployeesEmployeeIDRehireRequestTypedDict, + ) + from .get_v1_employees_employee_id_state_taxesop import ( + GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion, + GetV1EmployeesEmployeeIDStateTaxesRequest, + GetV1EmployeesEmployeeIDStateTaxesRequestTypedDict, + ) + from .get_v1_employees_employee_id_terminationsop import ( + GetV1EmployeesEmployeeIDTerminationsRequest, + GetV1EmployeesEmployeeIDTerminationsRequestTypedDict, + ) + from .get_v1_employees_employee_id_work_addressesop import ( + GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion, + GetV1EmployeesEmployeeIDWorkAddressesRequest, + GetV1EmployeesEmployeeIDWorkAddressesRequestTypedDict, + ) + from .get_v1_employees_employee_uuid_pay_stubsop import ( + GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion, + GetV1EmployeesEmployeeUUIDPayStubsRequest, + GetV1EmployeesEmployeeUUIDPayStubsRequestTypedDict, + ) + from .get_v1_employeesop import ( + GetV1EmployeesHeaderXGustoAPIVersion, + GetV1EmployeesRequest, + GetV1EmployeesRequestTypedDict, + QueryParamInclude, + ) + from .get_v1_external_payroll_calculate_taxesop import ( + GetV1ExternalPayrollCalculateTaxesRequest, + GetV1ExternalPayrollCalculateTaxesRequestTypedDict, + ) + from .get_v1_external_payrollop import ( + GetV1ExternalPayrollRequest, + GetV1ExternalPayrollRequestTypedDict, + ) + from .get_v1_garnishments_child_supportop import ( + GetV1GarnishmentsChildSupportRequest, + GetV1GarnishmentsChildSupportRequestTypedDict, + ) + from .get_v1_garnishments_garnishment_idop import ( + GetV1GarnishmentsGarnishmentIDRequest, + GetV1GarnishmentsGarnishmentIDRequestTypedDict, + ) + from .get_v1_generated_documents_document_type_request_uuidop import ( + GetV1GeneratedDocumentsDocumentTypeRequestUUIDRequest, + GetV1GeneratedDocumentsDocumentTypeRequestUUIDRequestTypedDict, + ) + from .get_v1_home_addresses_home_address_uuidop import ( + GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion, + GetV1HomeAddressesHomeAddressUUIDRequest, + GetV1HomeAddressesHomeAddressUUIDRequestTypedDict, + ) + from .get_v1_jobs_job_id_compensationsop import ( + GetV1JobsJobIDCompensationsQueryParamInclude, + GetV1JobsJobIDCompensationsRequest, + GetV1JobsJobIDCompensationsRequestTypedDict, + ) + from .get_v1_jobs_job_idop import ( + GetV1JobsJobIDQueryParamInclude, + GetV1JobsJobIDRequest, + GetV1JobsJobIDRequestTypedDict, + ) + from .get_v1_locations_location_idop import ( + GetV1LocationsLocationIDRequest, + GetV1LocationsLocationIDRequestTypedDict, + XGustoAPIVersion, + ) + from .get_v1_locations_location_uuid_minimum_wagesop import ( + GetV1LocationsLocationUUIDMinimumWagesHeaderXGustoAPIVersion, + GetV1LocationsLocationUUIDMinimumWagesRequest, + GetV1LocationsLocationUUIDMinimumWagesRequestTypedDict, + ) + from .get_v1_payment_receipts_payrolls_payroll_uuidop import ( + GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion, + GetV1PaymentReceiptsPayrollsPayrollUUIDRequest, + GetV1PaymentReceiptsPayrollsPayrollUUIDRequestTypedDict, + ) + from .get_v1_payrolls_payroll_uuid_employees_employee_uuid_pay_stubop import ( + GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion, + GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequest, + GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequestTypedDict, + ) + from .get_v1_recurring_reimbursementsop import ( + GetV1RecurringReimbursementsHeaderXGustoAPIVersion, + GetV1RecurringReimbursementsRequest, + GetV1RecurringReimbursementsRequestTypedDict, + GetV1RecurringReimbursementsResponseBody, + GetV1RecurringReimbursementsResponseBodyTypedDict, + ) + from .get_v1_salary_estimates_idop import ( + GetV1SalaryEstimatesIDHeaderXGustoAPIVersion, + GetV1SalaryEstimatesIDRequest, + GetV1SalaryEstimatesIDRequestTypedDict, + ) + from .get_v1_salary_estimates_occupationsop import ( + GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion, + GetV1SalaryEstimatesOccupationsRequest, + GetV1SalaryEstimatesOccupationsRequestTypedDict, + GetV1SalaryEstimatesOccupationsSecurity, + GetV1SalaryEstimatesOccupationsSecurityTypedDict, + ) + from .get_v1_tax_liabilitiesop import ( + GetV1TaxLiabilitiesRequest, + GetV1TaxLiabilitiesRequestTypedDict, + ) + from .get_v1_token_infoop import ( + GetV1TokenInfoRequest, + GetV1TokenInfoRequestTypedDict, + GetV1TokenInfoResponseBody, + GetV1TokenInfoResponseBodyTypedDict, + GetV1TokenInfoType, + Resource, + ResourceOwner, + ResourceOwnerTypedDict, + ResourceTypedDict, + ) + from .get_v1_webhook_subscription_uuidop import ( + GetV1WebhookSubscriptionUUIDRequest, + GetV1WebhookSubscriptionUUIDRequestTypedDict, + GetV1WebhookSubscriptionUUIDSecurity, + GetV1WebhookSubscriptionUUIDSecurityTypedDict, + ) + from .get_v1_webhook_subscription_verification_token_uuidop import ( + GetV1WebhookSubscriptionVerificationTokenUUIDRequest, + GetV1WebhookSubscriptionVerificationTokenUUIDRequestTypedDict, + GetV1WebhookSubscriptionVerificationTokenUUIDSecurity, + GetV1WebhookSubscriptionVerificationTokenUUIDSecurityTypedDict, + ) + from .get_v1_webhook_subscriptionsop import ( + GetV1WebhookSubscriptionsRequest, + GetV1WebhookSubscriptionsRequestTypedDict, + GetV1WebhookSubscriptionsSecurity, + GetV1WebhookSubscriptionsSecurityTypedDict, + ) + from .get_v1_webhooks_health_checkop import ( + GetV1WebhooksHealthCheckHeaderXGustoAPIVersion, + GetV1WebhooksHealthCheckRequest, + GetV1WebhooksHealthCheckRequestTypedDict, + GetV1WebhooksHealthCheckSecurity, + GetV1WebhooksHealthCheckSecurityTypedDict, + ) + from .get_v1_work_addresses_work_address_uuidop import ( + GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion, + GetV1WorkAddressesWorkAddressUUIDRequest, + GetV1WorkAddressesWorkAddressUUIDRequestTypedDict, + ) + from .get_version_employees_time_off_activitiesop import ( + GetVersionEmployeesTimeOffActivitiesRequest, + GetVersionEmployeesTimeOffActivitiesRequestTypedDict, + ) + from .get_wire_in_requests_wire_in_request_uuidop import ( + GetWireInRequestsWireInRequestUUIDRequest, + GetWireInRequestsWireInRequestUUIDRequestTypedDict, + ) + from .gross_up_pay import GrossUpPay, GrossUpPayTypedDict + from .historical_employee_body import ( + EmployeeStateTaxes, + EmployeeStateTaxesTypedDict, + HistoricalEmployeeBody, + HistoricalEmployeeBodyHomeAddress, + HistoricalEmployeeBodyHomeAddressTypedDict, + HistoricalEmployeeBodyJob, + HistoricalEmployeeBodyJobTypedDict, + HistoricalEmployeeBodyTermination, + HistoricalEmployeeBodyTerminationTypedDict, + HistoricalEmployeeBodyTypedDict, + WorkAddress, + WorkAddressTypedDict, + ) + from .holiday_pay_policy import ( + ColumbusDay, + ColumbusDayTypedDict, + FederalHolidays, + FederalHolidaysTypedDict, + HolidayPayPolicy, + HolidayPayPolicyEmployees, + HolidayPayPolicyEmployeesTypedDict, + HolidayPayPolicyTypedDict, + IndependenceDay, + IndependenceDayTypedDict, + Juneteenth, + JuneteenthTypedDict, + LaborDay, + LaborDayTypedDict, + MemorialDay, + MemorialDayTypedDict, + MlkDay, + MlkDayTypedDict, + NewYearsDay, + NewYearsDayTypedDict, + PresidentsDay, + PresidentsDayTypedDict, + Thanksgiving, + ThanksgivingTypedDict, + VeteransDay, + VeteransDayTypedDict, + ) + from .i9_authorization import ( + AuthorizationStatus, + I9Authorization, + I9AuthorizationDocumentType, + I9AuthorizationTypedDict, + ) + from .i9_authorization_document import ( + I9AuthorizationDocument, + I9AuthorizationDocumentTypedDict, + ) + from .i9_authorization_document_option import ( + I9AuthorizationDocumentOption, + I9AuthorizationDocumentOptionTypedDict, + Section, + ) + from .industry import Industry, IndustryTypedDict + from .information_request import ( + InformationRequest, + InformationRequestStatus, + InformationRequestType, + InformationRequestTypedDict, + ) + from .invoice_data import ( + ActiveCompanies, + ActiveCompaniesTypedDict, + InvoiceData, + InvoiceDataTypedDict, + ) + from .job import Job, JobTypedDict + from .location import Location, LocationTypedDict + from .metadata_with_multiple_entities import ( + MetadataWithMultipleEntities, + MetadataWithMultipleEntitiesTypedDict, + ) + from .metadata_with_one_entity import ( + MetadataWithOneEntity, + MetadataWithOneEntityTypedDict, + ) + from .minimum_wage import MinimumWage, MinimumWageTypedDict + from .no_response_error import NoResponseError + from .not_found_error_object import NotFoundErrorObject, NotFoundErrorObjectData + from .notification import ( + Notification, + NotificationEntityType, + NotificationStatus, + NotificationTypedDict, + Resources, + ResourcesTypedDict, + ) + from .off_cycle_reason_type import OffCycleReasonType + from .paid_holidays import ( + PaidHolidays, + PaidHolidaysTypedDict, + Schema, + SchemaTypedDict, + ) + from .paid_time_off import Name, PaidTimeOff, PaidTimeOffTypedDict + from .patch_v1_companies_company_id_payrolls_id_partner_disbursementsop import ( + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements, + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursementsTypedDict, + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion, + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentMethod, + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentStatus, + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest, + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBody, + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBodyTypedDict, + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestTypedDict, + ) + from .patch_v1_contractor_payment_groups_id_partner_disbursementsop import ( + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements, + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursementsTypedDict, + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion, + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentMethod, + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentStatus, + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequest, + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBody, + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBodyTypedDict, + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestTypedDict, + ) + from .pay_period import ( + PayPeriod, + PayPeriodPayroll, + PayPeriodPayrollTypedDict, + PayPeriodTypedDict, + PayrollType, + ) + from .pay_schedule_assignment import ( + PayScheduleAssignment, + PayScheduleAssignmentTypedDict, + Type, + ) + from .pay_schedule_assignment_body import ( + DepartmentsModel, + DepartmentsModelTypedDict, + EmployeesModel, + EmployeesModelTypedDict, + PayScheduleAssignmentBody, + PayScheduleAssignmentBodyType, + PayScheduleAssignmentBodyTypedDict, + ) + from .pay_schedule_assignment_department import ( + PayScheduleAssignmentDepartment, + PayScheduleAssignmentDepartmentTypedDict, + ) + from .pay_schedule_assignment_employee import ( + PayScheduleAssignmentEmployee, + PayScheduleAssignmentEmployeeTypedDict, + ) + from .pay_schedule_assignment_employee_change import ( + PayScheduleAssignmentEmployeeChange, + PayScheduleAssignmentEmployeeChangeTypedDict, + ) + from .pay_schedule_assignment_pay_period import ( + PayScheduleAssignmentPayPeriod, + PayScheduleAssignmentPayPeriodTypedDict, + ) + from .pay_schedule_assignment_preview import ( + PayScheduleAssignmentPreview, + PayScheduleAssignmentPreviewType, + PayScheduleAssignmentPreviewTypedDict, + ) + from .pay_schedule_assignment_transition_pay_period import ( + PayScheduleAssignmentTransitionPayPeriod, + PayScheduleAssignmentTransitionPayPeriodTypedDict, + ) + from .pay_schedule_create_update import ( + PayScheduleCreateUpdate, + PayScheduleCreateUpdateTypedDict, + ) + from .pay_schedule_frequency import PayScheduleFrequency + from .pay_schedule_frequency_create_update import PayScheduleFrequencyCreateUpdate + from .pay_schedule_list import PayScheduleList, PayScheduleListTypedDict + from .pay_schedule_object import PayScheduleObject, PayScheduleObjectTypedDict + from .payment_configs import ( + BlockerType, + EarnedFastAchBlockers, + EarnedFastAchBlockersTypedDict, + PaymentConfigs, + PaymentConfigsTypedDict, + ) + from .payment_method_bank_account import ( + PaymentMethodBankAccount, + PaymentMethodBankAccountTypedDict, + ) + from .payment_speed_param import PaymentSpeedParam + from .payment_speed_required_body import ( + PaymentSpeedRequiredBody, + PaymentSpeedRequiredBodyTypedDict, + ) + from .payroll import Payroll, PayrollTypedDict + from .payroll_blocker import PayrollBlocker, PayrollBlockerTypedDict + from .payroll_blockers_error import ( + Errors, + ErrorsTypedDict, + PayrollBlockersError, + PayrollBlockersErrorData, + PayrollBlockersErrorMetadata, + PayrollBlockersErrorMetadataTypedDict, + ) + from .payroll_check import ( + EmployeeCheckNumberMapping, + EmployeeCheckNumberMappingTypedDict, + PayrollCheck, + PayrollCheckTypedDict, + ) + from .payroll_company_taxes_type import ( + PayrollCompanyTaxesType, + PayrollCompanyTaxesTypeTypedDict, + ) + from .payroll_credit_blockers_type import ( + PayrollCreditBlockersType, + PayrollCreditBlockersTypeMetadata, + PayrollCreditBlockersTypeMetadataTypedDict, + PayrollCreditBlockersTypeStatus, + PayrollCreditBlockersTypeTypedDict, + PayrollCreditBlockersTypeUnblockOptions, + PayrollCreditBlockersTypeUnblockOptionsTypedDict, + ) + from .payroll_employee_compensations_type import ( + AmountType, + Deductions, + DeductionsTypedDict, + FixedCompensations, + FixedCompensationsTypedDict, + HourlyCompensations, + HourlyCompensationsTypedDict, + PayrollEmployeeCompensationsType, + PayrollEmployeeCompensationsTypePaidTimeOff, + PayrollEmployeeCompensationsTypePaidTimeOffTypedDict, + PayrollEmployeeCompensationsTypePaymentMethod, + PayrollEmployeeCompensationsTypeTypedDict, + ReimbursementsModel, + ReimbursementsModelTypedDict, + ) + from .payroll_fixed_compensation_types_type import ( + PayrollFixedCompensationTypesType, + PayrollFixedCompensationTypesTypeTypedDict, + ) + from .payroll_partner_disbursements import ( + PayrollPartnerDisbursements, + PayrollPartnerDisbursementsDisbursements, + PayrollPartnerDisbursementsDisbursementsTypedDict, + PayrollPartnerDisbursementsPaymentMethod, + PayrollPartnerDisbursementsPaymentStatus, + PayrollPartnerDisbursementsTypedDict, + ) + from .payroll_pay_period_type import ( + PayrollPayPeriodType, + PayrollPayPeriodTypeTypedDict, + ) + from .payroll_payment_speed_changed_type import ( + PayrollPaymentSpeedChangedType, + PayrollPaymentSpeedChangedTypeTypedDict, + ) + from .payroll_payroll_status_meta_type import ( + PayrollPayrollStatusMetaType, + PayrollPayrollStatusMetaTypeTypedDict, + ) + from .payroll_prepare_sort_by import PayrollPrepareSortBy + from .payroll_prepared import PayrollPrepared, PayrollPreparedTypedDict + from .payroll_processing_request import ( + PayrollProcessingRequest, + PayrollProcessingRequestStatus, + PayrollProcessingRequestTypedDict, + ) + from .payroll_receipt import ( + Licensee, + LicenseeTypedDict, + PayrollReceipt, + PayrollReceiptEmployeeCompensations, + PayrollReceiptEmployeeCompensationsTypedDict, + PayrollReceiptPaymentMethod, + PayrollReceiptTypedDict, + Taxes, + TaxesTypedDict, + Totals, + TotalsTypedDict, + ) + from .payroll_reversal import PayrollReversal, PayrollReversalTypedDict + from .payroll_show import ( + EmployeeCompensations, + EmployeeCompensationsTypedDict, + PayrollShow, + PayrollShowAmountType, + PayrollShowBenefits, + PayrollShowBenefitsTypedDict, + PayrollShowDeductions, + PayrollShowDeductionsTypedDict, + PayrollShowFixedCompensations, + PayrollShowFixedCompensationsTypedDict, + PayrollShowHourlyCompensations, + PayrollShowHourlyCompensationsTypedDict, + PayrollShowPaidTimeOff, + PayrollShowPaidTimeOffTypedDict, + PayrollShowPaymentMethod, + PayrollShowReimbursements, + PayrollShowReimbursementsTypedDict, + PayrollShowTaxes, + PayrollShowTaxesTypedDict, + PayrollShowTypedDict, + ) + from .payroll_submission_blockers_type import ( + PayrollSubmissionBlockersType, + PayrollSubmissionBlockersTypeMetadata, + PayrollSubmissionBlockersTypeMetadataTypedDict, + PayrollSubmissionBlockersTypeStatus, + PayrollSubmissionBlockersTypeTypedDict, + UnblockOptions, + UnblockOptionsTypedDict, + ) + from .payroll_taxes_type import PayrollTaxesType, PayrollTaxesTypeTypedDict + from .payroll_totals_type import PayrollTotalsType, PayrollTotalsTypeTypedDict + from .payroll_update import ( + PayrollUpdate, + PayrollUpdateAmountType, + PayrollUpdateDeductions, + PayrollUpdateDeductionsTypedDict, + PayrollUpdateEmployeeCompensations, + PayrollUpdateEmployeeCompensationsTypedDict, + PayrollUpdateFixedCompensations, + PayrollUpdateFixedCompensationsTypedDict, + PayrollUpdateHourlyCompensations, + PayrollUpdateHourlyCompensationsTypedDict, + PayrollUpdatePaidTimeOff, + PayrollUpdatePaidTimeOffTypedDict, + PayrollUpdatePaymentMethod, + PayrollUpdateTypedDict, + WithholdingPayPeriod, + ) + from .payroll_withholding_pay_period_type import PayrollWithholdingPayPeriodType + from .post_companies_company_uuid_holiday_pay_policyop import ( + ChristmasDay, + ChristmasDayTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyColumbusDay, + PostCompaniesCompanyUUIDHolidayPayPolicyColumbusDayTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyFederalHolidays, + PostCompaniesCompanyUUIDHolidayPayPolicyFederalHolidaysTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyIndependenceDay, + PostCompaniesCompanyUUIDHolidayPayPolicyIndependenceDayTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyJuneteenth, + PostCompaniesCompanyUUIDHolidayPayPolicyJuneteenthTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyLaborDay, + PostCompaniesCompanyUUIDHolidayPayPolicyLaborDayTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyMemorialDay, + PostCompaniesCompanyUUIDHolidayPayPolicyMemorialDayTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyMlkDay, + PostCompaniesCompanyUUIDHolidayPayPolicyMlkDayTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyNewYearsDay, + PostCompaniesCompanyUUIDHolidayPayPolicyNewYearsDayTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyPresidentsDay, + PostCompaniesCompanyUUIDHolidayPayPolicyPresidentsDayTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyRequest, + PostCompaniesCompanyUUIDHolidayPayPolicyRequestBody, + PostCompaniesCompanyUUIDHolidayPayPolicyRequestBodyTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyThanksgiving, + PostCompaniesCompanyUUIDHolidayPayPolicyThanksgivingTypedDict, + PostCompaniesCompanyUUIDHolidayPayPolicyVeteransDay, + PostCompaniesCompanyUUIDHolidayPayPolicyVeteransDayTypedDict, + ) + from .post_companies_company_uuid_reportsop import ( + Columns, + EmploymentType, + FileType, + Groupings, + PostCompaniesCompanyUUIDReportsEmploymentStatus, + PostCompaniesCompanyUUIDReportsPaymentMethod, + PostCompaniesCompanyUUIDReportsRequest, + PostCompaniesCompanyUUIDReportsRequestBody, + PostCompaniesCompanyUUIDReportsRequestBodyTypedDict, + PostCompaniesCompanyUUIDReportsRequestTypedDict, + ) + from .post_companies_company_uuid_suspensionsop import ( + LeavingFor, + PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion, + PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod, + PostCompaniesCompanyUUIDSuspensionsRequest, + PostCompaniesCompanyUUIDSuspensionsRequestBody, + PostCompaniesCompanyUUIDSuspensionsRequestBodyTypedDict, + PostCompaniesCompanyUUIDSuspensionsRequestTypedDict, + Reason, + ) + from .post_companies_company_uuid_time_off_policiesop import ( + PostCompaniesCompanyUUIDTimeOffPoliciesAccrualMethod, + PostCompaniesCompanyUUIDTimeOffPoliciesRequest, + PostCompaniesCompanyUUIDTimeOffPoliciesRequestBody, + PostCompaniesCompanyUUIDTimeOffPoliciesRequestBodyTypedDict, + PostCompaniesCompanyUUIDTimeOffPoliciesRequestTypedDict, + ) + from .post_companies_payroll_skip_company_uuidop import ( + PostCompaniesPayrollSkipCompanyUUIDPayrollType, + PostCompaniesPayrollSkipCompanyUUIDRequest, + PostCompaniesPayrollSkipCompanyUUIDRequestBody, + PostCompaniesPayrollSkipCompanyUUIDRequestBodyTypedDict, + PostCompaniesPayrollSkipCompanyUUIDRequestTypedDict, + PostCompaniesPayrollSkipCompanyUUIDResponseBody, + PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion, + ) + from .post_departmentsop import ( + PostDepartmentsRequest, + PostDepartmentsRequestBody, + PostDepartmentsRequestBodyTypedDict, + PostDepartmentsRequestTypedDict, + ) + from .post_employee_ytd_benefit_amounts_from_different_company import ( + PostEmployeeYtdBenefitAmountsFromDifferentCompany, + PostEmployeeYtdBenefitAmountsFromDifferentCompanyTypedDict, + ) + from .post_employee_ytd_benefit_amounts_from_different_companyop import ( + PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest, + PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict, + ) + from .post_partner_managed_companies_company_uuid_accept_terms_of_serviceop import ( + PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequest, + PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequestBody, + PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequestBodyTypedDict, + PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequestTypedDict, + PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceResponseBody, + PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceResponseBodyTypedDict, + ) + from .post_partner_managed_companies_company_uuid_retrieve_terms_of_serviceop import ( + PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequest, + PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequestBody, + PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequestBodyTypedDict, + PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequestTypedDict, + PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceResponseBody, + PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceResponseBodyTypedDict, + ) + from .post_payrolls_gross_up_payroll_uuidop import ( + PostPayrollsGrossUpPayrollUUIDRequest, + PostPayrollsGrossUpPayrollUUIDRequestBody, + PostPayrollsGrossUpPayrollUUIDRequestBodyTypedDict, + PostPayrollsGrossUpPayrollUUIDRequestTypedDict, + PostPayrollsGrossUpPayrollUUIDResponseBody, + PostPayrollsGrossUpPayrollUUIDResponseBodyUnion, + ) + from .post_payrolls_payroll_uuid_reports_general_ledgerop import ( + PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation, + PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType, + PostPayrollsPayrollUUIDReportsGeneralLedgerRequest, + PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody, + PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBodyTypedDict, + PostPayrollsPayrollUUIDReportsGeneralLedgerRequestTypedDict, + ) + from .post_v1_companies_attachmentop import ( + PostV1CompaniesAttachmentCategory, + PostV1CompaniesAttachmentDocument, + PostV1CompaniesAttachmentDocumentTypedDict, + PostV1CompaniesAttachmentRequest, + PostV1CompaniesAttachmentRequestBody, + PostV1CompaniesAttachmentRequestBodyTypedDict, + PostV1CompaniesAttachmentRequestTypedDict, + ) + from .post_v1_companies_company_id_adminsop import ( + PostV1CompaniesCompanyIDAdminsRequest, + PostV1CompaniesCompanyIDAdminsRequestBody, + PostV1CompaniesCompanyIDAdminsRequestBodyTypedDict, + PostV1CompaniesCompanyIDAdminsRequestTypedDict, + ) + from .post_v1_companies_company_id_bank_accountsop import ( + PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion, + PostV1CompaniesCompanyIDBankAccountsRequest, + PostV1CompaniesCompanyIDBankAccountsRequestTypedDict, + ) + from .post_v1_companies_company_id_company_benefitsop import ( + PostV1CompaniesCompanyIDCompanyBenefitsRequest, + PostV1CompaniesCompanyIDCompanyBenefitsRequestBody, + PostV1CompaniesCompanyIDCompanyBenefitsRequestBodyTypedDict, + PostV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict, + ) + from .post_v1_companies_company_id_contractor_payment_groups_previewop import ( + PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments, + PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict, + PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion, + PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod, + PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest, + PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody, + PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBodyTypedDict, + PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestTypedDict, + ) + from .post_v1_companies_company_id_contractor_payment_groupsop import ( + PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments, + PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPaymentsTypedDict, + PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion, + PostV1CompaniesCompanyIDContractorPaymentGroupsPaymentMethod, + PostV1CompaniesCompanyIDContractorPaymentGroupsRequest, + PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody, + PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBodyTypedDict, + PostV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict, + ) + from .post_v1_companies_company_id_contractor_paymentsop import ( + PostV1CompaniesCompanyIDContractorPaymentsPaymentMethod, + PostV1CompaniesCompanyIDContractorPaymentsRequest, + PostV1CompaniesCompanyIDContractorPaymentsRequestBody, + PostV1CompaniesCompanyIDContractorPaymentsRequestBodyTypedDict, + PostV1CompaniesCompanyIDContractorPaymentsRequestTypedDict, + ) + from .post_v1_companies_company_id_earning_typesop import ( + PostV1CompaniesCompanyIDEarningTypesRequest, + PostV1CompaniesCompanyIDEarningTypesRequestBody, + PostV1CompaniesCompanyIDEarningTypesRequestBodyTypedDict, + PostV1CompaniesCompanyIDEarningTypesRequestTypedDict, + ) + from .post_v1_companies_company_id_locationsop import ( + PostV1CompaniesCompanyIDLocationsRequest, + PostV1CompaniesCompanyIDLocationsRequestBody, + PostV1CompaniesCompanyIDLocationsRequestBodyTypedDict, + PostV1CompaniesCompanyIDLocationsRequestTypedDict, + ) + from .post_v1_companies_company_id_pay_schedules_assignment_previewop import ( + PostV1CompaniesCompanyIDPaySchedulesAssignmentPreviewRequest, + PostV1CompaniesCompanyIDPaySchedulesAssignmentPreviewRequestTypedDict, + ) + from .post_v1_companies_company_id_pay_schedules_assignop import ( + PostV1CompaniesCompanyIDPaySchedulesAssignRequest, + PostV1CompaniesCompanyIDPaySchedulesAssignRequestTypedDict, + ) + from .post_v1_companies_company_id_pay_schedulesop import ( + Frequency, + PostV1CompaniesCompanyIDPaySchedulesRequest, + PostV1CompaniesCompanyIDPaySchedulesRequestBody, + PostV1CompaniesCompanyIDPaySchedulesRequestBodyTypedDict, + PostV1CompaniesCompanyIDPaySchedulesRequestTypedDict, + ) + from .post_v1_companies_company_id_payrollsop import ( + OffCycleReason, + PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion, + PostV1CompaniesCompanyIDPayrollsRequest, + PostV1CompaniesCompanyIDPayrollsRequestBody, + PostV1CompaniesCompanyIDPayrollsRequestBodyTypedDict, + PostV1CompaniesCompanyIDPayrollsRequestTypedDict, + PostV1CompaniesCompanyIDPayrollsWithholdingPayPeriod, + ) + from .post_v1_companies_company_uuid_contractorsop import ( + PostV1CompaniesCompanyUUIDContractorsRequest, + PostV1CompaniesCompanyUUIDContractorsRequestBody, + PostV1CompaniesCompanyUUIDContractorsRequestBodyTypedDict, + PostV1CompaniesCompanyUUIDContractorsRequestTypedDict, + PostV1CompaniesCompanyUUIDContractorsType, + PostV1CompaniesCompanyUUIDContractorsWageType, + ) + from .post_v1_companies_company_uuid_signatories_inviteop import ( + PostV1CompaniesCompanyUUIDSignatoriesInviteRequest, + PostV1CompaniesCompanyUUIDSignatoriesInviteRequestBody, + PostV1CompaniesCompanyUUIDSignatoriesInviteRequestBodyTypedDict, + PostV1CompaniesCompanyUUIDSignatoriesInviteRequestTypedDict, + ) + from .post_v1_company_flowsop import ( + PostV1CompanyFlowsEntityType, + PostV1CompanyFlowsRequest, + PostV1CompanyFlowsRequestBody, + PostV1CompanyFlowsRequestBodyTypedDict, + PostV1CompanyFlowsRequestTypedDict, + ) + from .post_v1_company_signatoriesop import ( + PostV1CompanySignatoriesHomeAddress, + PostV1CompanySignatoriesHomeAddressTypedDict, + PostV1CompanySignatoriesRequest, + PostV1CompanySignatoriesRequestBody, + PostV1CompanySignatoriesRequestBodyTypedDict, + PostV1CompanySignatoriesRequestTypedDict, + ) + from .post_v1_compensations_compensation_idop import ( + PostV1CompensationsCompensationIDMinimumWages, + PostV1CompensationsCompensationIDMinimumWagesTypedDict, + PostV1CompensationsCompensationIDPaymentUnit, + PostV1CompensationsCompensationIDRequest, + PostV1CompensationsCompensationIDRequestBody, + PostV1CompensationsCompensationIDRequestBodyTypedDict, + PostV1CompensationsCompensationIDRequestTypedDict, + ) + from .post_v1_contractors_contractor_uuid_bank_accountsop import ( + PostV1ContractorsContractorUUIDBankAccountsAccountType, + PostV1ContractorsContractorUUIDBankAccountsRequest, + PostV1ContractorsContractorUUIDBankAccountsRequestBody, + PostV1ContractorsContractorUUIDBankAccountsRequestBodyTypedDict, + PostV1ContractorsContractorUUIDBankAccountsRequestTypedDict, + ) + from .post_v1_employees_employee_id_bank_accountsop import ( + PostV1EmployeesEmployeeIDBankAccountsAccountType, + PostV1EmployeesEmployeeIDBankAccountsRequest, + PostV1EmployeesEmployeeIDBankAccountsRequestBody, + PostV1EmployeesEmployeeIDBankAccountsRequestBodyTypedDict, + PostV1EmployeesEmployeeIDBankAccountsRequestTypedDict, + ) + from .post_v1_employees_employee_id_employee_benefitsop import ( + PostV1EmployeesEmployeeIDEmployeeBenefitsContribution, + PostV1EmployeesEmployeeIDEmployeeBenefitsContributionTypedDict, + PostV1EmployeesEmployeeIDEmployeeBenefitsDeductionReducesTaxableIncome, + PostV1EmployeesEmployeeIDEmployeeBenefitsLimitOption, + PostV1EmployeesEmployeeIDEmployeeBenefitsRequest, + PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBody, + PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBodyTypedDict, + PostV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict, + PostV1EmployeesEmployeeIDEmployeeBenefitsType, + PostV1EmployeesEmployeeIDEmployeeBenefitsValue, + PostV1EmployeesEmployeeIDEmployeeBenefitsValue2, + PostV1EmployeesEmployeeIDEmployeeBenefitsValue2TypedDict, + PostV1EmployeesEmployeeIDEmployeeBenefitsValueTypedDict, + ) + from .post_v1_employees_employee_id_garnishmentsop import ( + PostV1EmployeesEmployeeIDGarnishmentsGarnishmentType, + PostV1EmployeesEmployeeIDGarnishmentsRequest, + PostV1EmployeesEmployeeIDGarnishmentsRequestBody, + PostV1EmployeesEmployeeIDGarnishmentsRequestBodyTypedDict, + PostV1EmployeesEmployeeIDGarnishmentsRequestTypedDict, + ) + from .post_v1_employees_employee_id_home_addressesop import ( + PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion, + PostV1EmployeesEmployeeIDHomeAddressesRequest, + PostV1EmployeesEmployeeIDHomeAddressesRequestBody, + PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict, + PostV1EmployeesEmployeeIDHomeAddressesRequestTypedDict, + ) + from .post_v1_employees_employee_id_recurring_reimbursementsop import ( + PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion, + PostV1EmployeesEmployeeIDRecurringReimbursementsRequest, + PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBody, + PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBodyTypedDict, + PostV1EmployeesEmployeeIDRecurringReimbursementsRequestTypedDict, + PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBody, + PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBodyTypedDict, + ) + from .post_v1_employees_employee_id_rehireop import ( + PostV1EmployeesEmployeeIDRehireRequest, + PostV1EmployeesEmployeeIDRehireRequestTypedDict, + ) + from .post_v1_employees_employee_id_salary_estimatesop import ( + PostV1EmployeesEmployeeIDSalaryEstimatesExperienceLevel, + PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion, + PostV1EmployeesEmployeeIDSalaryEstimatesOccupations, + PostV1EmployeesEmployeeIDSalaryEstimatesOccupationsTypedDict, + PostV1EmployeesEmployeeIDSalaryEstimatesRequest, + PostV1EmployeesEmployeeIDSalaryEstimatesRequestBody, + PostV1EmployeesEmployeeIDSalaryEstimatesRequestBodyTypedDict, + PostV1EmployeesEmployeeIDSalaryEstimatesRequestTypedDict, + ) + from .post_v1_employees_employee_id_terminationsop import ( + PostV1EmployeesEmployeeIDTerminationsRequest, + PostV1EmployeesEmployeeIDTerminationsRequestBody, + PostV1EmployeesEmployeeIDTerminationsRequestBodyTypedDict, + PostV1EmployeesEmployeeIDTerminationsRequestTypedDict, + ) + from .post_v1_employees_employee_id_work_addressesop import ( + PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion, + PostV1EmployeesEmployeeIDWorkAddressesRequest, + PostV1EmployeesEmployeeIDWorkAddressesRequestBody, + PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict, + PostV1EmployeesEmployeeIDWorkAddressesRequestTypedDict, + ) + from .post_v1_employeesop import ( + PostV1EmployeesHeaderXGustoAPIVersion, + PostV1EmployeesRequest, + PostV1EmployeesRequestBody, + PostV1EmployeesRequestBodyTypedDict, + PostV1EmployeesRequestTypedDict, + ) + from .post_v1_external_payrollop import ( + PostV1ExternalPayrollRequest, + PostV1ExternalPayrollRequestBody, + PostV1ExternalPayrollRequestBodyTypedDict, + PostV1ExternalPayrollRequestTypedDict, + ) + from .post_v1_historical_employeesop import ( + PostV1HistoricalEmployeesRequest, + PostV1HistoricalEmployeesRequestTypedDict, + ) + from .post_v1_jobs_job_idop import ( + PostV1JobsJobIDRequest, + PostV1JobsJobIDRequestBody, + PostV1JobsJobIDRequestBodyTypedDict, + PostV1JobsJobIDRequestTypedDict, + ) + from .post_v1_partner_managed_companiesop import ( + PostV1PartnerManagedCompaniesCompany, + PostV1PartnerManagedCompaniesCompanyTypedDict, + PostV1PartnerManagedCompaniesRequest, + PostV1PartnerManagedCompaniesRequestBody, + PostV1PartnerManagedCompaniesRequestBodyTypedDict, + PostV1PartnerManagedCompaniesRequestTypedDict, + PostV1PartnerManagedCompaniesResponseBody, + PostV1PartnerManagedCompaniesResponseBodyTypedDict, + PostV1PartnerManagedCompaniesSecurity, + PostV1PartnerManagedCompaniesSecurityTypedDict, + User, + UserTypedDict, + ) + from .post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop import ( + PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequest, + PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBody, + PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBodyTypedDict, + PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestTypedDict, + ) + from .post_v1_payrolls_payroll_uuid_generated_documents_printable_payroll_checksop import ( + PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequest, + PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBody, + PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBodyTypedDict, + PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestTypedDict, + PrintingFormat, + ) + from .post_v1_plaid_processor_tokenop import ( + OwnerType, + PostV1PlaidProcessorTokenRequest, + PostV1PlaidProcessorTokenRequestBody, + PostV1PlaidProcessorTokenRequestBodyTypedDict, + PostV1PlaidProcessorTokenRequestTypedDict, + PostV1PlaidProcessorTokenResponseBody, + PostV1PlaidProcessorTokenResponseBodyTypedDict, + ) + from .post_v1_salary_estimates_uuid_acceptop import ( + PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion, + PostV1SalaryEstimatesUUIDAcceptRequest, + PostV1SalaryEstimatesUUIDAcceptRequestBody, + PostV1SalaryEstimatesUUIDAcceptRequestBodyTypedDict, + PostV1SalaryEstimatesUUIDAcceptRequestTypedDict, + ) + from .post_v1_sandbox_generate_1099op import ( + PostV1SandboxGenerate1099Request, + PostV1SandboxGenerate1099RequestBody, + PostV1SandboxGenerate1099RequestBodyTypedDict, + PostV1SandboxGenerate1099RequestTypedDict, + ) + from .post_v1_sandbox_generate_w2op import ( + PostV1SandboxGenerateW2Form, + PostV1SandboxGenerateW2FormTypedDict, + PostV1SandboxGenerateW2Request, + PostV1SandboxGenerateW2RequestBody, + PostV1SandboxGenerateW2RequestBodyTypedDict, + PostV1SandboxGenerateW2RequestTypedDict, + ) + from .post_v1_webhook_subscriptionop import ( + PostV1WebhookSubscriptionRequest, + PostV1WebhookSubscriptionRequestBody, + PostV1WebhookSubscriptionRequestBodyTypedDict, + PostV1WebhookSubscriptionRequestTypedDict, + PostV1WebhookSubscriptionSecurity, + PostV1WebhookSubscriptionSecurityTypedDict, + PostV1WebhookSubscriptionSubscriptionTypes, + ) + from .put_add_people_to_departmentop import ( + PutAddPeopleToDepartmentContractors, + PutAddPeopleToDepartmentContractorsTypedDict, + PutAddPeopleToDepartmentEmployees, + PutAddPeopleToDepartmentEmployeesTypedDict, + PutAddPeopleToDepartmentRequest, + PutAddPeopleToDepartmentRequestBody, + PutAddPeopleToDepartmentRequestBodyTypedDict, + PutAddPeopleToDepartmentRequestTypedDict, + ) + from .put_api_v1_companies_company_id_payrolls_payroll_id_cancelop import ( + PutAPIV1CompaniesCompanyIDPayrollsPayrollIDCancelRequest, + PutAPIV1CompaniesCompanyIDPayrollsPayrollIDCancelRequestTypedDict, + ) + from .put_companies_company_uuid_holiday_pay_policy_addop import ( + PutCompaniesCompanyUUIDHolidayPayPolicyAddEmployees, + PutCompaniesCompanyUUIDHolidayPayPolicyAddEmployeesTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyAddRequest, + PutCompaniesCompanyUUIDHolidayPayPolicyAddRequestBody, + PutCompaniesCompanyUUIDHolidayPayPolicyAddRequestBodyTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyAddRequestTypedDict, + ) + from .put_companies_company_uuid_holiday_pay_policy_removeop import ( + PutCompaniesCompanyUUIDHolidayPayPolicyRemoveEmployees, + PutCompaniesCompanyUUIDHolidayPayPolicyRemoveEmployeesTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequest, + PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequestBody, + PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequestBodyTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequestTypedDict, + ) + from .put_companies_company_uuid_holiday_pay_policyop import ( + PutCompaniesCompanyUUIDHolidayPayPolicyChristmasDay, + PutCompaniesCompanyUUIDHolidayPayPolicyChristmasDayTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyColumbusDay, + PutCompaniesCompanyUUIDHolidayPayPolicyColumbusDayTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyFederalHolidays, + PutCompaniesCompanyUUIDHolidayPayPolicyFederalHolidaysTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyIndependenceDay, + PutCompaniesCompanyUUIDHolidayPayPolicyIndependenceDayTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyJuneteenth, + PutCompaniesCompanyUUIDHolidayPayPolicyJuneteenthTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyLaborDay, + PutCompaniesCompanyUUIDHolidayPayPolicyLaborDayTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyMemorialDay, + PutCompaniesCompanyUUIDHolidayPayPolicyMemorialDayTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyMlkDay, + PutCompaniesCompanyUUIDHolidayPayPolicyMlkDayTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyNewYearsDay, + PutCompaniesCompanyUUIDHolidayPayPolicyNewYearsDayTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyPresidentsDay, + PutCompaniesCompanyUUIDHolidayPayPolicyPresidentsDayTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyRequest, + PutCompaniesCompanyUUIDHolidayPayPolicyRequestBody, + PutCompaniesCompanyUUIDHolidayPayPolicyRequestBodyTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyThanksgiving, + PutCompaniesCompanyUUIDHolidayPayPolicyThanksgivingTypedDict, + PutCompaniesCompanyUUIDHolidayPayPolicyVeteransDay, + PutCompaniesCompanyUUIDHolidayPayPolicyVeteransDayTypedDict, + ) + from .put_departmentsop import ( + PutDepartmentsRequest, + PutDepartmentsRequestBody, + PutDepartmentsRequestBodyTypedDict, + PutDepartmentsRequestTypedDict, + ) + from .put_remove_people_from_departmentop import ( + PutRemovePeopleFromDepartmentContractors, + PutRemovePeopleFromDepartmentContractorsTypedDict, + PutRemovePeopleFromDepartmentEmployees, + PutRemovePeopleFromDepartmentEmployeesTypedDict, + PutRemovePeopleFromDepartmentRequest, + PutRemovePeopleFromDepartmentRequestBody, + PutRemovePeopleFromDepartmentRequestBodyTypedDict, + PutRemovePeopleFromDepartmentRequestTypedDict, + ) + from .put_time_off_policies_time_off_policy_uuidop import ( + AccrualMethod, + PutTimeOffPoliciesTimeOffPolicyUUIDRequest, + PutTimeOffPoliciesTimeOffPolicyUUIDRequestBody, + PutTimeOffPoliciesTimeOffPolicyUUIDRequestBodyTypedDict, + PutTimeOffPoliciesTimeOffPolicyUUIDRequestTypedDict, + ) + from .put_v1_companies_company_id_bank_accounts_verifyop import ( + PutV1CompaniesCompanyIDBankAccountsVerifyRequest, + PutV1CompaniesCompanyIDBankAccountsVerifyRequestBody, + PutV1CompaniesCompanyIDBankAccountsVerifyRequestBodyTypedDict, + PutV1CompaniesCompanyIDBankAccountsVerifyRequestTypedDict, + ) + from .put_v1_companies_company_id_earning_types_earning_type_uuidop import ( + PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest, + PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBody, + PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBodyTypedDict, + PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict, + ) + from .put_v1_companies_company_id_federal_tax_detailsop import ( + FilingForm, + PutV1CompaniesCompanyIDFederalTaxDetailsRequest, + PutV1CompaniesCompanyIDFederalTaxDetailsRequestBody, + PutV1CompaniesCompanyIDFederalTaxDetailsRequestBodyTypedDict, + PutV1CompaniesCompanyIDFederalTaxDetailsRequestTypedDict, + TaxPayerType, + ) + from .put_v1_companies_company_id_pay_schedules_pay_schedule_idop import ( + PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDFrequency, + PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequest, + PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestBody, + PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestBodyTypedDict, + PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestTypedDict, + ) + from .put_v1_companies_company_id_payrolls_payroll_id_calculateop import ( + PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequest, + PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequestTypedDict, + PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBody, + PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion, + ) + from .put_v1_companies_company_id_payrolls_payroll_id_prepareop import ( + PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest, + PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody, + PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBodyTypedDict, + PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestTypedDict, + ) + from .put_v1_companies_company_id_payrolls_payroll_id_submitop import ( + PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequest, + PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody, + PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBodyTypedDict, + PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestTypedDict, + PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBody, + PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion, + SubmissionBlockers, + SubmissionBlockersTypedDict, + ) + from .put_v1_companies_company_id_payrollsop import ( + PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion, + PutV1CompaniesCompanyIDPayrollsRequest, + PutV1CompaniesCompanyIDPayrollsRequestTypedDict, + ) + from .put_v1_companies_company_uuid_signatories_signatory_uuidop import ( + PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDHomeAddress, + PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDHomeAddressTypedDict, + PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequest, + PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestBody, + PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestBodyTypedDict, + PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestTypedDict, + ) + from .put_v1_companies_company_uuid_tax_requirements_stateop import ( + PutV1CompaniesCompanyUUIDTaxRequirementsStateRequest, + PutV1CompaniesCompanyUUIDTaxRequirementsStateRequestBody, + PutV1CompaniesCompanyUUIDTaxRequirementsStateRequestBodyTypedDict, + PutV1CompaniesCompanyUUIDTaxRequirementsStateRequestTypedDict, + PutV1CompaniesCompanyUUIDTaxRequirementsStateRequirements, + PutV1CompaniesCompanyUUIDTaxRequirementsStateRequirementsTypedDict, + RequirementSets, + RequirementSetsTypedDict, + ) + from .put_v1_companiesop import ( + PutV1CompaniesRequest, + PutV1CompaniesRequestBody, + PutV1CompaniesRequestBodyTypedDict, + PutV1CompaniesRequestTypedDict, + ) + from .put_v1_company_benefits_company_benefit_id_contribution_exclusionsop import ( + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest, + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody, + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBodyTypedDict, + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict, + ) + from .put_v1_company_benefits_company_benefit_id_employee_benefitsop import ( + PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest, + PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBody, + PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBodyTypedDict, + PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict, + ) + from .put_v1_company_benefits_company_benefit_idop import ( + PutV1CompanyBenefitsCompanyBenefitIDRequest, + PutV1CompanyBenefitsCompanyBenefitIDRequestBody, + PutV1CompanyBenefitsCompanyBenefitIDRequestBodyTypedDict, + PutV1CompanyBenefitsCompanyBenefitIDRequestTypedDict, + ) + from .put_v1_company_form_signop import ( + PutV1CompanyFormSignRequest, + PutV1CompanyFormSignRequestBody, + PutV1CompanyFormSignRequestBodyTypedDict, + PutV1CompanyFormSignRequestTypedDict, + ) + from .put_v1_company_industryop import ( + PutV1CompanyIndustryRequest, + PutV1CompanyIndustryRequestBody, + PutV1CompanyIndustryRequestBodyTypedDict, + PutV1CompanyIndustryRequestTypedDict, + ) + from .put_v1_company_payment_configsop import ( + PutV1CompanyPaymentConfigsRequest, + PutV1CompanyPaymentConfigsRequestBody, + PutV1CompanyPaymentConfigsRequestBodyTypedDict, + PutV1CompanyPaymentConfigsRequestTypedDict, + ) + from .put_v1_compensations_compensation_idop import ( + PutV1CompensationsCompensationIDMinimumWages, + PutV1CompensationsCompensationIDMinimumWagesTypedDict, + PutV1CompensationsCompensationIDPaymentUnit, + PutV1CompensationsCompensationIDRequest, + PutV1CompensationsCompensationIDRequestBody, + PutV1CompensationsCompensationIDRequestBodyTypedDict, + PutV1CompensationsCompensationIDRequestTypedDict, + ) + from .put_v1_contractor_document_signop import ( + PutV1ContractorDocumentSignFields, + PutV1ContractorDocumentSignFieldsTypedDict, + PutV1ContractorDocumentSignRequest, + PutV1ContractorDocumentSignRequestBody, + PutV1ContractorDocumentSignRequestBodyTypedDict, + PutV1ContractorDocumentSignRequestTypedDict, + ) + from .put_v1_contractor_payment_groups_contractor_payment_group_id_fundop import ( + PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion, + PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequest, + PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequestTypedDict, + ) + from .put_v1_contractors_contractor_id_payment_methodop import ( + PutV1ContractorsContractorIDPaymentMethodRequest, + PutV1ContractorsContractorIDPaymentMethodRequestBody, + PutV1ContractorsContractorIDPaymentMethodRequestBodyTypedDict, + PutV1ContractorsContractorIDPaymentMethodRequestTypedDict, + PutV1ContractorsContractorIDPaymentMethodType, + ) + from .put_v1_contractors_contractor_uuid_addressop import ( + PutV1ContractorsContractorUUIDAddressRequest, + PutV1ContractorsContractorUUIDAddressRequestBody, + PutV1ContractorsContractorUUIDAddressRequestBodyTypedDict, + PutV1ContractorsContractorUUIDAddressRequestTypedDict, + ) + from .put_v1_contractors_contractor_uuid_onboarding_statusop import ( + PutV1ContractorsContractorUUIDOnboardingStatusOnboardingStatus, + PutV1ContractorsContractorUUIDOnboardingStatusRequest, + PutV1ContractorsContractorUUIDOnboardingStatusRequestBody, + PutV1ContractorsContractorUUIDOnboardingStatusRequestBodyTypedDict, + PutV1ContractorsContractorUUIDOnboardingStatusRequestTypedDict, + ) + from .put_v1_contractors_contractor_uuidop import ( + PutV1ContractorsContractorUUIDRequest, + PutV1ContractorsContractorUUIDRequestBody, + PutV1ContractorsContractorUUIDRequestBodyTypedDict, + PutV1ContractorsContractorUUIDRequestTypedDict, + PutV1ContractorsContractorUUIDType, + PutV1ContractorsContractorUUIDWageType, + ) + from .put_v1_employee_benefits_employee_benefit_idop import ( + PutV1EmployeeBenefitsEmployeeBenefitIDContribution, + PutV1EmployeeBenefitsEmployeeBenefitIDContributionTypedDict, + PutV1EmployeeBenefitsEmployeeBenefitIDDeductionReducesTaxableIncome, + PutV1EmployeeBenefitsEmployeeBenefitIDLimitOption, + PutV1EmployeeBenefitsEmployeeBenefitIDRequest, + PutV1EmployeeBenefitsEmployeeBenefitIDRequestBody, + PutV1EmployeeBenefitsEmployeeBenefitIDRequestBodyTypedDict, + PutV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict, + PutV1EmployeeBenefitsEmployeeBenefitIDType, + PutV1EmployeeBenefitsEmployeeBenefitIDValue, + PutV1EmployeeBenefitsEmployeeBenefitIDValue2, + PutV1EmployeeBenefitsEmployeeBenefitIDValue2TypedDict, + PutV1EmployeeBenefitsEmployeeBenefitIDValueTypedDict, + ) + from .put_v1_employee_form_signop import ( + PutV1EmployeeFormSignRequest, + PutV1EmployeeFormSignRequestBody, + PutV1EmployeeFormSignRequestBodyTypedDict, + PutV1EmployeeFormSignRequestTypedDict, + ) + from .put_v1_employees_employee_id_bank_accountsop import ( + PutV1EmployeesEmployeeIDBankAccountsAccountType, + PutV1EmployeesEmployeeIDBankAccountsRequest, + PutV1EmployeesEmployeeIDBankAccountsRequestBody, + PutV1EmployeesEmployeeIDBankAccountsRequestBodyTypedDict, + PutV1EmployeesEmployeeIDBankAccountsRequestTypedDict, + ) + from .put_v1_employees_employee_id_federal_taxesop import ( + PutV1EmployeesEmployeeIDFederalTaxesRequest, + PutV1EmployeesEmployeeIDFederalTaxesRequestBody, + PutV1EmployeesEmployeeIDFederalTaxesRequestBodyTypedDict, + PutV1EmployeesEmployeeIDFederalTaxesRequestTypedDict, + ) + from .put_v1_employees_employee_id_i9_authorization_documentsop import ( + Documents, + DocumentsTypedDict, + PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequest, + PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestBody, + PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestBodyTypedDict, + PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestTypedDict, + ) + from .put_v1_employees_employee_id_i9_authorization_employer_signop import ( + PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequest, + PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestBody, + PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestBodyTypedDict, + PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestTypedDict, + ) + from .put_v1_employees_employee_id_i9_authorizationop import ( + PutV1EmployeesEmployeeIDI9AuthorizationAuthorizationStatus, + PutV1EmployeesEmployeeIDI9AuthorizationDocumentType, + PutV1EmployeesEmployeeIDI9AuthorizationRequest, + PutV1EmployeesEmployeeIDI9AuthorizationRequestBody, + PutV1EmployeesEmployeeIDI9AuthorizationRequestBodyTypedDict, + PutV1EmployeesEmployeeIDI9AuthorizationRequestTypedDict, + ) + from .put_v1_employees_employee_id_onboarding_documents_configop import ( + PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequest, + PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequestBody, + PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequestBodyTypedDict, + PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequestTypedDict, + ) + from .put_v1_employees_employee_id_onboarding_statusop import ( + PutV1EmployeesEmployeeIDOnboardingStatusHeaderXGustoAPIVersion, + PutV1EmployeesEmployeeIDOnboardingStatusOnboardingStatus, + PutV1EmployeesEmployeeIDOnboardingStatusRequest, + PutV1EmployeesEmployeeIDOnboardingStatusRequestBody, + PutV1EmployeesEmployeeIDOnboardingStatusRequestBodyTypedDict, + PutV1EmployeesEmployeeIDOnboardingStatusRequestTypedDict, + ) + from .put_v1_employees_employee_id_payment_methodop import ( + PutV1EmployeesEmployeeIDPaymentMethodRequest, + PutV1EmployeesEmployeeIDPaymentMethodRequestBody, + PutV1EmployeesEmployeeIDPaymentMethodRequestBodyTypedDict, + PutV1EmployeesEmployeeIDPaymentMethodRequestTypedDict, + PutV1EmployeesEmployeeIDPaymentMethodSplitBy, + PutV1EmployeesEmployeeIDPaymentMethodSplits, + PutV1EmployeesEmployeeIDPaymentMethodSplitsTypedDict, + PutV1EmployeesEmployeeIDPaymentMethodType, + ) + from .put_v1_employees_employee_id_rehireop import ( + PutV1EmployeesEmployeeIDRehireEmploymentStatus, + PutV1EmployeesEmployeeIDRehireRequest, + PutV1EmployeesEmployeeIDRehireRequestBody, + PutV1EmployeesEmployeeIDRehireRequestBodyTypedDict, + PutV1EmployeesEmployeeIDRehireRequestTypedDict, + ) + from .put_v1_employees_employee_id_state_taxesop import ( + PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion, + PutV1EmployeesEmployeeIDStateTaxesRequest, + PutV1EmployeesEmployeeIDStateTaxesRequestTypedDict, + ) + from .put_v1_employeesop import ( + PutV1EmployeesHeaderXGustoAPIVersion, + PutV1EmployeesRequest, + PutV1EmployeesRequestBody, + PutV1EmployeesRequestBodyTypedDict, + PutV1EmployeesRequestTypedDict, + ) + from .put_v1_external_payrollop import ( + PutV1ExternalPayrollBenefits, + PutV1ExternalPayrollBenefitsTypedDict, + PutV1ExternalPayrollEarningType, + PutV1ExternalPayrollEarnings, + PutV1ExternalPayrollEarningsTypedDict, + PutV1ExternalPayrollExternalPayrollItems, + PutV1ExternalPayrollExternalPayrollItemsTypedDict, + PutV1ExternalPayrollRequest, + PutV1ExternalPayrollRequestBody, + PutV1ExternalPayrollRequestBodyTypedDict, + PutV1ExternalPayrollRequestTypedDict, + PutV1ExternalPayrollTaxes, + PutV1ExternalPayrollTaxesTypedDict, + ) + from .put_v1_garnishments_garnishment_idop import ( + PutV1GarnishmentsGarnishmentIDRequest, + PutV1GarnishmentsGarnishmentIDRequestBody, + PutV1GarnishmentsGarnishmentIDRequestBodyTypedDict, + PutV1GarnishmentsGarnishmentIDRequestTypedDict, + ) + from .put_v1_historical_employeesop import ( + PutV1HistoricalEmployeesEmployeeStateTaxes, + PutV1HistoricalEmployeesEmployeeStateTaxesTypedDict, + PutV1HistoricalEmployeesHomeAddress, + PutV1HistoricalEmployeesHomeAddressTypedDict, + PutV1HistoricalEmployeesJob, + PutV1HistoricalEmployeesJobTypedDict, + PutV1HistoricalEmployeesRequest, + PutV1HistoricalEmployeesRequestBody, + PutV1HistoricalEmployeesRequestBodyTypedDict, + PutV1HistoricalEmployeesRequestTypedDict, + PutV1HistoricalEmployeesTermination, + PutV1HistoricalEmployeesTerminationTypedDict, + PutV1HistoricalEmployeesWorkAddress, + PutV1HistoricalEmployeesWorkAddressTypedDict, + ) + from .put_v1_home_addresses_home_address_uuidop import ( + PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion, + PutV1HomeAddressesHomeAddressUUIDRequest, + PutV1HomeAddressesHomeAddressUUIDRequestBody, + PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict, + PutV1HomeAddressesHomeAddressUUIDRequestTypedDict, + ) + from .put_v1_jobs_job_idop import ( + PutV1JobsJobIDRequest, + PutV1JobsJobIDRequestBody, + PutV1JobsJobIDRequestBodyTypedDict, + PutV1JobsJobIDRequestTypedDict, + ) + from .put_v1_locations_location_idop import ( + HeaderXGustoAPIVersion, + PutV1LocationsLocationIDRequest, + PutV1LocationsLocationIDRequestBody, + PutV1LocationsLocationIDRequestBodyTypedDict, + PutV1LocationsLocationIDRequestTypedDict, + ) + from .put_v1_partner_managed_companies_company_uuid_migrateop import ( + MigrationStatus, + PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequest, + PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequestBody, + PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequestBodyTypedDict, + PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequestTypedDict, + PutV1PartnerManagedCompaniesCompanyUUIDMigrateResponseBody, + PutV1PartnerManagedCompaniesCompanyUUIDMigrateResponseBodyTypedDict, + ) + from .put_v1_recurring_reimbursementsop import ( + PutV1RecurringReimbursementsHeaderXGustoAPIVersion, + PutV1RecurringReimbursementsRequest, + PutV1RecurringReimbursementsRequestBody, + PutV1RecurringReimbursementsRequestBodyTypedDict, + PutV1RecurringReimbursementsRequestTypedDict, + PutV1RecurringReimbursementsResponseBody, + PutV1RecurringReimbursementsResponseBodyTypedDict, + ) + from .put_v1_salary_estimates_idop import ( + PutV1SalaryEstimatesIDExperienceLevel, + PutV1SalaryEstimatesIDHeaderXGustoAPIVersion, + PutV1SalaryEstimatesIDOccupations, + PutV1SalaryEstimatesIDOccupationsTypedDict, + PutV1SalaryEstimatesIDRequest, + PutV1SalaryEstimatesIDRequestBody, + PutV1SalaryEstimatesIDRequestBodyTypedDict, + PutV1SalaryEstimatesIDRequestTypedDict, + ) + from .put_v1_tax_liabilities_finishop import ( + PutV1TaxLiabilitiesFinishRequest, + PutV1TaxLiabilitiesFinishRequestTypedDict, + ) + from .put_v1_tax_liabilitiesop import ( + LiabilitySelections, + LiabilitySelectionsTypedDict, + PutV1TaxLiabilitiesRequest, + PutV1TaxLiabilitiesRequestBody, + PutV1TaxLiabilitiesRequestBodyTypedDict, + PutV1TaxLiabilitiesRequestTypedDict, + ) + from .put_v1_terminations_employee_idop import ( + PutV1TerminationsEmployeeIDRequest, + PutV1TerminationsEmployeeIDRequestBody, + PutV1TerminationsEmployeeIDRequestBodyTypedDict, + PutV1TerminationsEmployeeIDRequestTypedDict, + ) + from .put_v1_time_off_policies_time_off_policy_uuid_deactivateop import ( + PutV1TimeOffPoliciesTimeOffPolicyUUIDDeactivateRequest, + PutV1TimeOffPoliciesTimeOffPolicyUUIDDeactivateRequestTypedDict, + ) + from .put_v1_time_off_policies_time_off_policy_uuid_remove_employeesop import ( + PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesEmployees, + PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesEmployeesTypedDict, + PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequest, + PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequestBody, + PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequestBodyTypedDict, + PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequestTypedDict, + ) + from .put_v1_verify_webhook_subscription_uuidop import ( + PutV1VerifyWebhookSubscriptionUUIDRequest, + PutV1VerifyWebhookSubscriptionUUIDRequestBody, + PutV1VerifyWebhookSubscriptionUUIDRequestBodyTypedDict, + PutV1VerifyWebhookSubscriptionUUIDRequestTypedDict, + PutV1VerifyWebhookSubscriptionUUIDSecurity, + PutV1VerifyWebhookSubscriptionUUIDSecurityTypedDict, + ) + from .put_v1_webhook_subscription_uuidop import ( + PutV1WebhookSubscriptionUUIDRequest, + PutV1WebhookSubscriptionUUIDRequestBody, + PutV1WebhookSubscriptionUUIDRequestBodyTypedDict, + PutV1WebhookSubscriptionUUIDRequestTypedDict, + PutV1WebhookSubscriptionUUIDSecurity, + PutV1WebhookSubscriptionUUIDSecurityTypedDict, + PutV1WebhookSubscriptionUUIDSubscriptionTypes, + ) + from .put_v1_work_addresses_work_address_uuidop import ( + PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion, + PutV1WorkAddressesWorkAddressUUIDRequest, + PutV1WorkAddressesWorkAddressUUIDRequestBody, + PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict, + PutV1WorkAddressesWorkAddressUUIDRequestTypedDict, + ) + from .put_version_time_off_policies_time_off_policy_uuid_add_employeesop import ( + PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesEmployees, + PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesEmployeesTypedDict, + PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequest, + PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequestBody, + PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequestBodyTypedDict, + PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequestTypedDict, + ) + from .put_version_time_off_policies_time_off_policy_uuid_balanceop import ( + PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceEmployees, + PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceEmployeesTypedDict, + PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequest, + PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequestBody, + PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequestBodyTypedDict, + PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequestTypedDict, + ) + from .put_wire_in_requests_wire_in_request_uuidop import ( + PutWireInRequestsWireInRequestUUIDRequest, + PutWireInRequestsWireInRequestUUIDRequestBody, + PutWireInRequestsWireInRequestUUIDRequestBodyTypedDict, + PutWireInRequestsWireInRequestUUIDRequestTypedDict, + ) + from .recovery_case import RecoveryCase, RecoveryCaseStatus, RecoveryCaseTypedDict + from .redebit_recovery_caseop import ( + RedebitRecoveryCaseRequest, + RedebitRecoveryCaseRequestTypedDict, + ) + from .refresh_access_tokenop import ( + RefreshAccessTokenRequest, + RefreshAccessTokenRequestBody, + RefreshAccessTokenRequestBodyTypedDict, + RefreshAccessTokenRequestTypedDict, + ) + from .rehire import Rehire, RehireEmploymentStatus, RehireTypedDict + from .rehire_body import EmploymentStatus, RehireBody, RehireBodyTypedDict + from .report import Report, ReportTypedDict + from .report_template import ReportTemplate, ReportTemplateTypedDict + from .responsevalidationerror import ResponseValidationError + from .salary_estimate import ( + ExperienceLevel, + Occupations, + OccupationsTypedDict, + SalaryEstimate, + SalaryEstimateTypedDict, + ) + from .security import Security, SecurityTypedDict + from .show_employees import ( + CurrentEmploymentStatus, + OnboardingDocumentsConfig, + OnboardingDocumentsConfigTypedDict, + OnboardingStatus, + PaymentMethod, + ShowEmployees, + ShowEmployeesTypedDict, + ) + from .signatory import ( + HomeAddress, + HomeAddressTypedDict, + IdentityVerificationStatus, + Signatory, + SignatoryTypedDict, + ) + from .sort_order import SortOrder + from .supported_benefit import SupportedBenefit, SupportedBenefitTypedDict + from .tax_liabilities_selections import ( + PossibleLiabilities, + PossibleLiabilitiesTypedDict, + TaxLiabilitiesSelections, + TaxLiabilitiesSelectionsTypedDict, + ) + from .tax_requirement import ( + ApplicableIf, + ApplicableIfTypedDict, + TaxRequirement, + TaxRequirementApplicableIfValue, + TaxRequirementApplicableIfValueTypedDict, + TaxRequirementTypedDict, + TaxRequirementValue, + TaxRequirementValueTypedDict, + ) + from .tax_requirement_metadata import ( + RateType, + TaxRequirementMetadata, + TaxRequirementMetadataOptions, + TaxRequirementMetadataOptionsTypedDict, + TaxRequirementMetadataType, + TaxRequirementMetadataTypedDict, + TaxRequirementMetadataValidationType, + TaxRequirementMetadataValue, + TaxRequirementMetadataValueTypedDict, + Validation, + ValidationTypedDict, + ) + from .tax_requirement_set import TaxRequirementSet, TaxRequirementSetTypedDict + from .tax_requirements_state import ( + TaxRequirementsState, + TaxRequirementsStateTypedDict, + ) + from .termination import Termination, TerminationTypedDict + from .time_off_activity import ( + TimeOffActivity, + TimeOffActivityTypedDict, + TimeOffType, + ) + from .time_off_policy import ( + PolicyType, + TimeOffPolicy, + TimeOffPolicyEmployees, + TimeOffPolicyEmployeesTypedDict, + TimeOffPolicyTypedDict, + ) + from .unprocessable_entity_error_object import ( + UnprocessableEntityErrorObject, + UnprocessableEntityErrorObjectData, + ) + from .unprocessed_termination_pay_period import ( + UnprocessedTerminationPayPeriod, + UnprocessedTerminationPayPeriodTypedDict, + ) + from .versionheader import VersionHeader + from .webhook_subscription import ( + SubscriptionTypes, + WebhookSubscription, + WebhookSubscriptionStatus, + WebhookSubscriptionTypedDict, + ) + from .webhooks_health_check_status import ( + WebhooksHealthCheckStatus, + WebhooksHealthCheckStatusStatus, + WebhooksHealthCheckStatusTypedDict, + ) + from .wire_in_request import ( + PaymentType, + WireInRequest, + WireInRequestStatus, + WireInRequestTypedDict, + ) + from .ytd_benefit_amounts_from_different_company import ( + YtdBenefitAmountsFromDifferentCompany, + YtdBenefitAmountsFromDifferentCompanyTypedDict, + ) __all__ = [ "APIError", @@ -2256,6 +2616,8 @@ "AdminTypedDict", "Agencies", "AgenciesTypedDict", + "Aggregation", + "AmountType", "Answers", "AnswersTypedDict", "ApplicableBenefits", @@ -2269,6 +2631,8 @@ "Authentication", "AuthenticationTypedDict", "AuthorizationStatus", + "BLSOccupation", + "BLSOccupationTypedDict", "Base", "BaseTypedDict", "BenefitSummary", @@ -2297,6 +2661,7 @@ "BenefitTypeRequirementsTypedDict", "Benefits", "BenefitsTypedDict", + "BlockerType", "CatchUp", "CatchUpTypedDict", "Category", @@ -2315,6 +2680,9 @@ "CompanyAttachment", "CompanyAttachmentTypedDict", "CompanyBankAccount", + "CompanyBankAccountRequest", + "CompanyBankAccountRequestAccountType", + "CompanyBankAccountRequestTypedDict", "CompanyBankAccountTypedDict", "CompanyBenefit", "CompanyBenefitTypedDict", @@ -2335,6 +2703,7 @@ "CompanyCustomFieldList", "CompanyCustomFieldListTypedDict", "CompanyCustomFieldTypedDict", + "CompanyFormsSortBy", "CompanyHomeAddress", "CompanyHomeAddressTypedDict", "CompanyOnboardingStatus", @@ -2343,6 +2712,8 @@ "CompanyPaidTimeOffTypedDict", "CompanyStatus", "CompanySuspension", + "CompanySuspensionCreationErrorsError", + "CompanySuspensionCreationErrorsErrorData", "CompanySuspensionTypedDict", "CompanyTypedDict", "Compensation", @@ -2362,21 +2733,39 @@ "ContractorOnboardingStatusOnboardingStepTypedDict", "ContractorOnboardingStatusTypedDict", "ContractorPayment", + "ContractorPaymentDetailsList", + "ContractorPaymentDetailsListPaymentMethod", + "ContractorPaymentDetailsListSplitBy", + "ContractorPaymentDetailsListTypedDict", "ContractorPaymentForGroup", "ContractorPaymentForGroupPaymentMethod", + "ContractorPaymentForGroupPreview", + "ContractorPaymentForGroupPreviewPaymentMethod", + "ContractorPaymentForGroupPreviewStatus", + "ContractorPaymentForGroupPreviewTypedDict", + "ContractorPaymentForGroupPreviewWageType", "ContractorPaymentForGroupStatus", "ContractorPaymentForGroupTypedDict", "ContractorPaymentForGroupWageType", "ContractorPaymentGroup", - "ContractorPaymentGroupMinimal", - "ContractorPaymentGroupMinimalStatus", - "ContractorPaymentGroupMinimalTotals", - "ContractorPaymentGroupMinimalTotalsTypedDict", - "ContractorPaymentGroupMinimalTypedDict", + "ContractorPaymentGroupPartnerDisbursements", + "ContractorPaymentGroupPartnerDisbursementsPaymentMethod", + "ContractorPaymentGroupPartnerDisbursementsPaymentStatus", + "ContractorPaymentGroupPartnerDisbursementsTypedDict", + "ContractorPaymentGroupPreview", + "ContractorPaymentGroupPreviewStatus", + "ContractorPaymentGroupPreviewTotals", + "ContractorPaymentGroupPreviewTotalsTypedDict", + "ContractorPaymentGroupPreviewTypedDict", "ContractorPaymentGroupStatus", "ContractorPaymentGroupTotals", "ContractorPaymentGroupTotalsTypedDict", "ContractorPaymentGroupTypedDict", + "ContractorPaymentGroupWithBlockers", + "ContractorPaymentGroupWithBlockersStatus", + "ContractorPaymentGroupWithBlockersTotals", + "ContractorPaymentGroupWithBlockersTotalsTypedDict", + "ContractorPaymentGroupWithBlockersTypedDict", "ContractorPaymentMethod", "ContractorPaymentMethod1", "ContractorPaymentMethodSplitBy", @@ -2386,6 +2775,7 @@ "ContractorPaymentReceipt", "ContractorPaymentReceiptLicensee", "ContractorPaymentReceiptLicenseeTypedDict", + "ContractorPaymentReceiptPaymentMethod", "ContractorPaymentReceiptTotals", "ContractorPaymentReceiptTotalsTypedDict", "ContractorPaymentReceiptTypedDict", @@ -2408,7 +2798,10 @@ "ContractorTypedDict", "ContractorsModel", "ContractorsModelTypedDict", + "ContractorsSortBy", "Contribution", + "ContributionExclusion", + "ContributionExclusionTypedDict", "ContributionTypedDict", "CoverageAmount", "CoverageAmountTypedDict", @@ -2429,10 +2822,14 @@ "DeleteCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict", "DeleteDepartmentRequest", "DeleteDepartmentRequestTypedDict", + "DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion", + "DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDRequest", + "DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDRequestTypedDict", "DeleteV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest", "DeleteV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict", "DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest", "DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict", + "DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion", "DeleteV1CompaniesCompanyIDPayrollsRequest", "DeleteV1CompaniesCompanyIDPayrollsRequestTypedDict", "DeleteV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequest", @@ -2445,6 +2842,7 @@ "DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData", "DeleteV1CompensationsCompensationIDRequest", "DeleteV1CompensationsCompensationIDRequestTypedDict", + "DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion", "DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequest", "DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict", "DeleteV1ContractorsContractorUUIDRequest", @@ -2464,14 +2862,19 @@ "DeleteV1EmployeesEmployeeIDTerminationsRequestTypedDict", "DeleteV1ExternalPayrollRequest", "DeleteV1ExternalPayrollRequestTypedDict", + "DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion", "DeleteV1HomeAddressesHomeAddressUUIDRequest", "DeleteV1HomeAddressesHomeAddressUUIDRequestTypedDict", "DeleteV1JobsJobIDRequest", "DeleteV1JobsJobIDRequestTypedDict", + "DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion", + "DeleteV1RecurringReimbursementsRequest", + "DeleteV1RecurringReimbursementsRequestTypedDict", "DeleteV1WebhookSubscriptionUUIDRequest", "DeleteV1WebhookSubscriptionUUIDRequestTypedDict", "DeleteV1WebhookSubscriptionUUIDSecurity", "DeleteV1WebhookSubscriptionUUIDSecurityTypedDict", + "DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion", "DeleteV1WorkAddressesWorkAddressUUIDRequest", "DeleteV1WorkAddressesWorkAddressUUIDRequestTypedDict", "Department", @@ -2480,6 +2883,10 @@ "DepartmentTypedDict", "DepartmentsModel", "DepartmentsModelTypedDict", + "DetailedPaymentAccountSplit", + "DetailedPaymentAccountSplitTypedDict", + "Disbursements", + "DisbursementsTypedDict", "Document", "DocumentPdf", "DocumentPdfTypedDict", @@ -2490,12 +2897,16 @@ "DocumentTypedDict", "Documents", "DocumentsTypedDict", + "EarnedFastAchBlockers", + "EarnedFastAchBlockersTypedDict", "EarningType", "EarningTypeList", "EarningTypeListTypedDict", "EarningTypeTypedDict", "Earnings", "EarningsTypedDict", + "EinVerification", + "EinVerificationTypedDict", "Employee", "EmployeeAddress", "EmployeeAddressTypedDict", @@ -2519,24 +2930,35 @@ "EmployeeCheckNumberMappingTypedDict", "EmployeeCompensations", "EmployeeCompensationsTypedDict", + "EmployeeCurrentEmploymentStatus", "EmployeeCustomField", "EmployeeCustomFieldTypedDict", "EmployeeDeduction", "EmployeeDeductionTypedDict", "EmployeeFederalTax", "EmployeeFederalTaxTypedDict", + "EmployeeHomeAddress", + "EmployeeHomeAddressTypedDict", "EmployeeOnboardingDocument", "EmployeeOnboardingDocumentTypedDict", + "EmployeeOnboardingDocumentsConfig", + "EmployeeOnboardingDocumentsConfigTypedDict", "EmployeeOnboardingStatus", + "EmployeeOnboardingStatus1", "EmployeeOnboardingStatusOnboardingStep", "EmployeeOnboardingStatusOnboardingStepTypedDict", "EmployeeOnboardingStatusTypedDict", "EmployeePayStubsList", + "EmployeePayStubsListPaymentMethod", "EmployeePayStubsListTypedDict", + "EmployeePaymentDetail", + "EmployeePaymentDetailPaymentMethod", + "EmployeePaymentDetailTypedDict", "EmployeePaymentMethod", + "EmployeePaymentMethod1", + "EmployeePaymentMethodSplitBy", "EmployeePaymentMethodType", "EmployeePaymentMethodTypedDict", - "EmployeeStateTax", "EmployeeStateTaxAnswer", "EmployeeStateTaxAnswerTypedDict", "EmployeeStateTaxInputQuestionFormat", @@ -2545,8 +2967,13 @@ "EmployeeStateTaxInputQuestionFormatValueTypedDict", "EmployeeStateTaxQuestion", "EmployeeStateTaxQuestionTypedDict", - "EmployeeStateTaxTypedDict", "EmployeeStateTaxes", + "EmployeeStateTaxesList", + "EmployeeStateTaxesListTypedDict", + "EmployeeStateTaxesRequest", + "EmployeeStateTaxesRequestTypedDict", + "EmployeeStateTaxesRequestValue", + "EmployeeStateTaxesRequestValueTypedDict", "EmployeeStateTaxesTypedDict", "EmployeeTypedDict", "EmployeeWorkAddress", @@ -2565,12 +2992,11 @@ "ErrorsTypedDict", "Event", "EventTypedDict", + "ExperienceLevel", "ExternalPayroll", "ExternalPayrollBasic", "ExternalPayrollBasicStatus", "ExternalPayrollBasicTypedDict", - "ExternalPayrollBenefits", - "ExternalPayrollBenefitsTypedDict", "ExternalPayrollItems", "ExternalPayrollItemsTypedDict", "ExternalPayrollMetadata", @@ -2585,6 +3011,7 @@ "FederalHolidays", "FederalHolidaysTypedDict", "FederalTaxDetails", + "FederalTaxDetailsStatus", "FederalTaxDetailsTypedDict", "Fields", "FieldsTypedDict", @@ -2612,6 +3039,8 @@ "GarnishmentChildSupportTypedDict", "GarnishmentType", "GarnishmentTypedDict", + "GeneralLedgerReport", + "GeneralLedgerReportTypedDict", "GeneratedDocument", "GeneratedDocumentStatus", "GeneratedDocumentTypedDict", @@ -2639,6 +3068,7 @@ "GetCompaniesCompanyUUIDPaidHolidaysRequestTypedDict", "GetCompaniesCompanyUUIDReportTemplatesReportTypeRequest", "GetCompaniesCompanyUUIDReportTemplatesReportTypeRequestTypedDict", + "GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion", "GetCompaniesCompanyUUIDSuspensionsRequest", "GetCompaniesCompanyUUIDSuspensionsRequestTypedDict", "GetCompaniesCompanyUUIDTimeOffPoliciesRequest", @@ -2647,6 +3077,9 @@ "GetCompaniesCompanyUUIDWireInRequestUUIDRequestTypedDict", "GetCompaniesDepartmentsRequest", "GetCompaniesDepartmentsRequestTypedDict", + "GetCompanyNotificationsHeaderXGustoAPIVersion", + "GetCompanyNotificationsRequest", + "GetCompanyNotificationsRequestTypedDict", "GetDepartmentRequest", "GetDepartmentRequestTypedDict", "GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequest", @@ -2665,8 +3098,8 @@ "GetNotificationsNotificationUUIDRequestTypedDict", "GetRecoveryCasesRequest", "GetRecoveryCasesRequestTypedDict", - "GetReportsReportUUIDRequest", - "GetReportsReportUUIDRequestTypedDict", + "GetReportsRequestUUIDRequest", + "GetReportsRequestUUIDRequestTypedDict", "GetTimeOffPoliciesTimeOffPolicyUUIDRequest", "GetTimeOffPoliciesTimeOffPolicyUUIDRequestTypedDict", "GetV1BenefitsBenefitIDRequest", @@ -2687,23 +3120,30 @@ "GetV1CompaniesAttachmentsRequestTypedDict", "GetV1CompaniesCompanyIDAdminsRequest", "GetV1CompaniesCompanyIDAdminsRequestTypedDict", + "GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion", "GetV1CompaniesCompanyIDBankAccountsRequest", "GetV1CompaniesCompanyIDBankAccountsRequestTypedDict", "GetV1CompaniesCompanyIDCompanyBenefitsRequest", "GetV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict", "GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest", "GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict", + "GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion", "GetV1CompaniesCompanyIDContractorPaymentGroupsRequest", "GetV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict", "GetV1CompaniesCompanyIDContractorPaymentsRequest", "GetV1CompaniesCompanyIDContractorPaymentsRequestTypedDict", "GetV1CompaniesCompanyIDContractorPaymentsResponseBody", "GetV1CompaniesCompanyIDContractorPaymentsResponseBodyTypedDict", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsRequestTypedDict", "GetV1CompaniesCompanyIDCustomFieldsRequest", "GetV1CompaniesCompanyIDCustomFieldsRequestTypedDict", "GetV1CompaniesCompanyIDEarningTypesRequest", "GetV1CompaniesCompanyIDEarningTypesRequestTypedDict", "GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion", + "GetV1CompaniesCompanyIDEmployeesPaymentDetailsRequest", + "GetV1CompaniesCompanyIDEmployeesPaymentDetailsRequestTypedDict", "GetV1CompaniesCompanyIDEmployeesRequest", "GetV1CompaniesCompanyIDEmployeesRequestTypedDict", "GetV1CompaniesCompanyIDFederalTaxDetailsRequest", @@ -2724,6 +3164,11 @@ "GetV1CompaniesCompanyIDPaySchedulesRequestTypedDict", "GetV1CompaniesCompanyIDPayrollReversalsRequest", "GetV1CompaniesCompanyIDPayrollReversalsRequestTypedDict", + "GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion", + "GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion", + "GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest", + "GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestTypedDict", + "GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion", "GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude", "GetV1CompaniesCompanyIDPayrollsPayrollIDRequest", "GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict", @@ -2744,6 +3189,8 @@ "GetV1CompaniesPayrollBlockersCompanyUUIDRequestTypedDict", "GetV1CompaniesRequest", "GetV1CompaniesRequestTypedDict", + "GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest", + "GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict", "GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest", "GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict", "GetV1CompanyBenefitsCompanyBenefitIDRequest", @@ -2778,8 +3225,12 @@ "GetV1ContractorFormRequestTypedDict", "GetV1ContractorFormsRequest", "GetV1ContractorFormsRequestTypedDict", + "GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion", "GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest", "GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict", + "GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion", + "GetV1ContractorPaymentGroupsIDPartnerDisbursementsRequest", + "GetV1ContractorPaymentGroupsIDPartnerDisbursementsRequestTypedDict", "GetV1ContractorPaymentsContractorPaymentUUIDFundRequest", "GetV1ContractorPaymentsContractorPaymentUUIDFundRequestTypedDict", "GetV1ContractorPaymentsContractorPaymentUUIDReceiptRequest", @@ -2817,6 +3268,7 @@ "GetV1EmployeesEmployeeIDFederalTaxesRequestTypedDict", "GetV1EmployeesEmployeeIDGarnishmentsRequest", "GetV1EmployeesEmployeeIDGarnishmentsRequestTypedDict", + "GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion", "GetV1EmployeesEmployeeIDHomeAddressesRequest", "GetV1EmployeesEmployeeIDHomeAddressesRequestTypedDict", "GetV1EmployeesEmployeeIDI9AuthorizationDocumentOptionsRequest", @@ -2833,12 +3285,19 @@ "GetV1EmployeesEmployeeIDOnboardingStatusRequestTypedDict", "GetV1EmployeesEmployeeIDPaymentMethodRequest", "GetV1EmployeesEmployeeIDPaymentMethodRequestTypedDict", + "GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion", + "GetV1EmployeesEmployeeIDRecurringReimbursementsRequest", + "GetV1EmployeesEmployeeIDRecurringReimbursementsRequestTypedDict", + "GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBody", + "GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBodyTypedDict", "GetV1EmployeesEmployeeIDRehireRequest", "GetV1EmployeesEmployeeIDRehireRequestTypedDict", + "GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion", "GetV1EmployeesEmployeeIDStateTaxesRequest", "GetV1EmployeesEmployeeIDStateTaxesRequestTypedDict", "GetV1EmployeesEmployeeIDTerminationsRequest", "GetV1EmployeesEmployeeIDTerminationsRequestTypedDict", + "GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion", "GetV1EmployeesEmployeeIDWorkAddressesRequest", "GetV1EmployeesEmployeeIDWorkAddressesRequestTypedDict", "GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion", @@ -2857,6 +3316,7 @@ "GetV1GarnishmentsGarnishmentIDRequestTypedDict", "GetV1GeneratedDocumentsDocumentTypeRequestUUIDRequest", "GetV1GeneratedDocumentsDocumentTypeRequestUUIDRequestTypedDict", + "GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion", "GetV1HomeAddressesHomeAddressUUIDRequest", "GetV1HomeAddressesHomeAddressUUIDRequestTypedDict", "GetV1JobsJobIDCompensationsQueryParamInclude", @@ -2870,11 +3330,25 @@ "GetV1LocationsLocationUUIDMinimumWagesHeaderXGustoAPIVersion", "GetV1LocationsLocationUUIDMinimumWagesRequest", "GetV1LocationsLocationUUIDMinimumWagesRequestTypedDict", + "GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion", "GetV1PaymentReceiptsPayrollsPayrollUUIDRequest", "GetV1PaymentReceiptsPayrollsPayrollUUIDRequestTypedDict", "GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion", "GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequest", "GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequestTypedDict", + "GetV1RecurringReimbursementsHeaderXGustoAPIVersion", + "GetV1RecurringReimbursementsRequest", + "GetV1RecurringReimbursementsRequestTypedDict", + "GetV1RecurringReimbursementsResponseBody", + "GetV1RecurringReimbursementsResponseBodyTypedDict", + "GetV1SalaryEstimatesIDHeaderXGustoAPIVersion", + "GetV1SalaryEstimatesIDRequest", + "GetV1SalaryEstimatesIDRequestTypedDict", + "GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion", + "GetV1SalaryEstimatesOccupationsRequest", + "GetV1SalaryEstimatesOccupationsRequestTypedDict", + "GetV1SalaryEstimatesOccupationsSecurity", + "GetV1SalaryEstimatesOccupationsSecurityTypedDict", "GetV1TaxLiabilitiesRequest", "GetV1TaxLiabilitiesRequestTypedDict", "GetV1TokenInfoRequest", @@ -2894,6 +3368,12 @@ "GetV1WebhookSubscriptionsRequestTypedDict", "GetV1WebhookSubscriptionsSecurity", "GetV1WebhookSubscriptionsSecurityTypedDict", + "GetV1WebhooksHealthCheckHeaderXGustoAPIVersion", + "GetV1WebhooksHealthCheckRequest", + "GetV1WebhooksHealthCheckRequestTypedDict", + "GetV1WebhooksHealthCheckSecurity", + "GetV1WebhooksHealthCheckSecurityTypedDict", + "GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion", "GetV1WorkAddressesWorkAddressUUIDRequest", "GetV1WorkAddressesWorkAddressUUIDRequestTypedDict", "GetVersionEmployeesTimeOffActivitiesRequest", @@ -2903,6 +3383,7 @@ "GrossUpPay", "GrossUpPayTypedDict", "Groupings", + "GustoError", "HeaderXGustoAPIVersion", "HistoricalEmployeeBody", "HistoricalEmployeeBodyHomeAddress", @@ -2940,6 +3421,7 @@ "InformationRequestStatus", "InformationRequestType", "InformationRequestTypedDict", + "IntegrationType", "InvoiceData", "InvoiceDataTypedDict", "Job", @@ -2976,9 +3458,15 @@ "Name", "NewYearsDay", "NewYearsDayTypedDict", + "NoResponseError", + "NotFoundErrorObject", + "NotFoundErrorObjectData", "Notification", + "NotificationEntityType", "NotificationStatus", "NotificationTypedDict", + "Occupations", + "OccupationsTypedDict", "OffCycleReason", "OffCycleReasonType", "OnboardingDocumentsConfig", @@ -2995,6 +3483,24 @@ "PaidHolidaysTypedDict", "PaidTimeOff", "PaidTimeOffTypedDict", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursementsTypedDict", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentMethod", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentStatus", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBody", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBodyTypedDict", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestTypedDict", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursementsTypedDict", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentMethod", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentStatus", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequest", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBody", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBodyTypedDict", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestTypedDict", "PayPeriod", "PayPeriodPayroll", "PayPeriodPayrollTypedDict", @@ -3040,7 +3546,7 @@ "PaymentSpeedRequiredBody", "PaymentSpeedRequiredBodyTypedDict", "PaymentStatus", - "PaymentUUID", + "PaymentType", "PaymentUnit", "Payroll", "PayrollBenefits", @@ -3069,35 +3575,75 @@ "PayrollEmployeeCompensationsTypeTypedDict", "PayrollFixedCompensationTypesType", "PayrollFixedCompensationTypesTypeTypedDict", - "PayrollMinimal", - "PayrollMinimalTypedDict", + "PayrollPartnerDisbursements", + "PayrollPartnerDisbursementsDisbursements", + "PayrollPartnerDisbursementsDisbursementsTypedDict", + "PayrollPartnerDisbursementsPaymentMethod", + "PayrollPartnerDisbursementsPaymentStatus", + "PayrollPartnerDisbursementsTypedDict", "PayrollPayPeriodType", "PayrollPayPeriodTypeTypedDict", "PayrollPaymentSpeedChangedType", "PayrollPaymentSpeedChangedTypeTypedDict", "PayrollPayrollStatusMetaType", "PayrollPayrollStatusMetaTypeTypedDict", + "PayrollPrepareSortBy", "PayrollPrepared", "PayrollPreparedTypedDict", "PayrollProcessingRequest", "PayrollProcessingRequestStatus", "PayrollProcessingRequestTypedDict", "PayrollReceipt", - "PayrollReceiptTaxes", - "PayrollReceiptTaxesTypedDict", + "PayrollReceiptEmployeeCompensations", + "PayrollReceiptEmployeeCompensationsTypedDict", + "PayrollReceiptPaymentMethod", "PayrollReceiptTypedDict", "PayrollReversal", "PayrollReversalTypedDict", + "PayrollShow", + "PayrollShowAmountType", + "PayrollShowBenefits", + "PayrollShowBenefitsTypedDict", + "PayrollShowDeductions", + "PayrollShowDeductionsTypedDict", + "PayrollShowFixedCompensations", + "PayrollShowFixedCompensationsTypedDict", + "PayrollShowHourlyCompensations", + "PayrollShowHourlyCompensationsTypedDict", + "PayrollShowPaidTimeOff", + "PayrollShowPaidTimeOffTypedDict", + "PayrollShowPaymentMethod", + "PayrollShowReimbursements", + "PayrollShowReimbursementsTypedDict", + "PayrollShowTaxes", + "PayrollShowTaxesTypedDict", + "PayrollShowTypedDict", "PayrollSubmissionBlockersType", "PayrollSubmissionBlockersTypeMetadata", "PayrollSubmissionBlockersTypeMetadataTypedDict", "PayrollSubmissionBlockersTypeStatus", "PayrollSubmissionBlockersTypeTypedDict", + "PayrollTaxesType", + "PayrollTaxesTypeTypedDict", "PayrollTotalsType", "PayrollTotalsTypeTypedDict", "PayrollType", "PayrollTypedDict", "PayrollTypes", + "PayrollUpdate", + "PayrollUpdateAmountType", + "PayrollUpdateDeductions", + "PayrollUpdateDeductionsTypedDict", + "PayrollUpdateEmployeeCompensations", + "PayrollUpdateEmployeeCompensationsTypedDict", + "PayrollUpdateFixedCompensations", + "PayrollUpdateFixedCompensationsTypedDict", + "PayrollUpdateHourlyCompensations", + "PayrollUpdateHourlyCompensationsTypedDict", + "PayrollUpdatePaidTimeOff", + "PayrollUpdatePaidTimeOffTypedDict", + "PayrollUpdatePaymentMethod", + "PayrollUpdateTypedDict", "PayrollWithholdingPayPeriodType", "PlaidStatus", "PolicyType", @@ -3135,6 +3681,7 @@ "PostCompaniesCompanyUUIDReportsRequestBody", "PostCompaniesCompanyUUIDReportsRequestBodyTypedDict", "PostCompaniesCompanyUUIDReportsRequestTypedDict", + "PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion", "PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod", "PostCompaniesCompanyUUIDSuspensionsRequest", "PostCompaniesCompanyUUIDSuspensionsRequestBody", @@ -3178,6 +3725,12 @@ "PostPayrollsGrossUpPayrollUUIDRequestTypedDict", "PostPayrollsGrossUpPayrollUUIDResponseBody", "PostPayrollsGrossUpPayrollUUIDResponseBodyUnion", + "PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation", + "PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequest", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBodyTypedDict", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestTypedDict", "PostV1CompaniesAttachmentCategory", "PostV1CompaniesAttachmentDocument", "PostV1CompaniesAttachmentDocumentTypedDict", @@ -3189,10 +3742,8 @@ "PostV1CompaniesCompanyIDAdminsRequestBody", "PostV1CompaniesCompanyIDAdminsRequestBodyTypedDict", "PostV1CompaniesCompanyIDAdminsRequestTypedDict", - "PostV1CompaniesCompanyIDBankAccountsAccountType", + "PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion", "PostV1CompaniesCompanyIDBankAccountsRequest", - "PostV1CompaniesCompanyIDBankAccountsRequestBody", - "PostV1CompaniesCompanyIDBankAccountsRequestBodyTypedDict", "PostV1CompaniesCompanyIDBankAccountsRequestTypedDict", "PostV1CompaniesCompanyIDCompanyBenefitsRequest", "PostV1CompaniesCompanyIDCompanyBenefitsRequestBody", @@ -3200,9 +3751,11 @@ "PostV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict", "PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments", "PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPaymentsTypedDict", + "PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion", "PostV1CompaniesCompanyIDContractorPaymentGroupsPaymentMethod", "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments", "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict", + "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion", "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod", "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest", "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody", @@ -3233,10 +3786,12 @@ "PostV1CompaniesCompanyIDPaySchedulesRequestBody", "PostV1CompaniesCompanyIDPaySchedulesRequestBodyTypedDict", "PostV1CompaniesCompanyIDPaySchedulesRequestTypedDict", + "PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion", "PostV1CompaniesCompanyIDPayrollsRequest", "PostV1CompaniesCompanyIDPayrollsRequestBody", "PostV1CompaniesCompanyIDPayrollsRequestBodyTypedDict", "PostV1CompaniesCompanyIDPayrollsRequestTypedDict", + "PostV1CompaniesCompanyIDPayrollsWithholdingPayPeriod", "PostV1CompaniesCompanyUUIDContractorsRequest", "PostV1CompaniesCompanyUUIDContractorsRequestBody", "PostV1CompaniesCompanyUUIDContractorsRequestBodyTypedDict", @@ -3293,16 +3848,33 @@ "PostV1EmployeesEmployeeIDGarnishmentsRequestBody", "PostV1EmployeesEmployeeIDGarnishmentsRequestBodyTypedDict", "PostV1EmployeesEmployeeIDGarnishmentsRequestTypedDict", + "PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion", "PostV1EmployeesEmployeeIDHomeAddressesRequest", "PostV1EmployeesEmployeeIDHomeAddressesRequestBody", "PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict", "PostV1EmployeesEmployeeIDHomeAddressesRequestTypedDict", + "PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion", + "PostV1EmployeesEmployeeIDRecurringReimbursementsRequest", + "PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBody", + "PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBodyTypedDict", + "PostV1EmployeesEmployeeIDRecurringReimbursementsRequestTypedDict", + "PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBody", + "PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBodyTypedDict", "PostV1EmployeesEmployeeIDRehireRequest", "PostV1EmployeesEmployeeIDRehireRequestTypedDict", + "PostV1EmployeesEmployeeIDSalaryEstimatesExperienceLevel", + "PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion", + "PostV1EmployeesEmployeeIDSalaryEstimatesOccupations", + "PostV1EmployeesEmployeeIDSalaryEstimatesOccupationsTypedDict", + "PostV1EmployeesEmployeeIDSalaryEstimatesRequest", + "PostV1EmployeesEmployeeIDSalaryEstimatesRequestBody", + "PostV1EmployeesEmployeeIDSalaryEstimatesRequestBodyTypedDict", + "PostV1EmployeesEmployeeIDSalaryEstimatesRequestTypedDict", "PostV1EmployeesEmployeeIDTerminationsRequest", "PostV1EmployeesEmployeeIDTerminationsRequestBody", "PostV1EmployeesEmployeeIDTerminationsRequestBodyTypedDict", "PostV1EmployeesEmployeeIDTerminationsRequestTypedDict", + "PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion", "PostV1EmployeesEmployeeIDWorkAddressesRequest", "PostV1EmployeesEmployeeIDWorkAddressesRequestBody", "PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict", @@ -3346,6 +3918,11 @@ "PostV1PlaidProcessorTokenRequestTypedDict", "PostV1PlaidProcessorTokenResponseBody", "PostV1PlaidProcessorTokenResponseBodyTypedDict", + "PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion", + "PostV1SalaryEstimatesUUIDAcceptRequest", + "PostV1SalaryEstimatesUUIDAcceptRequestBody", + "PostV1SalaryEstimatesUUIDAcceptRequestBodyTypedDict", + "PostV1SalaryEstimatesUUIDAcceptRequestTypedDict", "PostV1SandboxGenerate1099Request", "PostV1SandboxGenerate1099RequestBody", "PostV1SandboxGenerate1099RequestBodyTypedDict", @@ -3454,20 +4031,14 @@ "PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestBody", "PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestBodyTypedDict", "PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestTypedDict", - "PutV1CompaniesCompanyIDPayrollsEmployeeCompensations", - "PutV1CompaniesCompanyIDPayrollsEmployeeCompensationsTypedDict", - "PutV1CompaniesCompanyIDPayrollsFixedCompensations", - "PutV1CompaniesCompanyIDPayrollsFixedCompensationsTypedDict", - "PutV1CompaniesCompanyIDPayrollsHourlyCompensations", - "PutV1CompaniesCompanyIDPayrollsHourlyCompensationsTypedDict", - "PutV1CompaniesCompanyIDPayrollsPaidTimeOff", - "PutV1CompaniesCompanyIDPayrollsPaidTimeOffTypedDict", - "PutV1CompaniesCompanyIDPayrollsPaymentMethod", + "PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion", "PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequest", "PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequestTypedDict", "PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBody", "PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion", "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBodyTypedDict", "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestTypedDict", "PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequest", "PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody", @@ -3476,10 +4047,7 @@ "PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBody", "PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion", "PutV1CompaniesCompanyIDPayrollsRequest", - "PutV1CompaniesCompanyIDPayrollsRequestBody", - "PutV1CompaniesCompanyIDPayrollsRequestBodyTypedDict", "PutV1CompaniesCompanyIDPayrollsRequestTypedDict", - "PutV1CompaniesCompanyIDPayrollsWithholdingPayPeriod", "PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDHomeAddress", "PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDHomeAddressTypedDict", "PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequest", @@ -3496,6 +4064,10 @@ "PutV1CompaniesRequestBody", "PutV1CompaniesRequestBodyTypedDict", "PutV1CompaniesRequestTypedDict", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBodyTypedDict", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict", "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest", "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBody", "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBodyTypedDict", @@ -3529,6 +4101,7 @@ "PutV1ContractorDocumentSignRequestBody", "PutV1ContractorDocumentSignRequestBodyTypedDict", "PutV1ContractorDocumentSignRequestTypedDict", + "PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion", "PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequest", "PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequestTypedDict", "PutV1ContractorsContractorIDPaymentMethodRequest", @@ -3606,18 +4179,18 @@ "PutV1EmployeesEmployeeIDPaymentMethodRequestBodyTypedDict", "PutV1EmployeesEmployeeIDPaymentMethodRequestTypedDict", "PutV1EmployeesEmployeeIDPaymentMethodSplitBy", + "PutV1EmployeesEmployeeIDPaymentMethodSplits", + "PutV1EmployeesEmployeeIDPaymentMethodSplitsTypedDict", "PutV1EmployeesEmployeeIDPaymentMethodType", "PutV1EmployeesEmployeeIDRehireEmploymentStatus", "PutV1EmployeesEmployeeIDRehireRequest", "PutV1EmployeesEmployeeIDRehireRequestBody", "PutV1EmployeesEmployeeIDRehireRequestBodyTypedDict", "PutV1EmployeesEmployeeIDRehireRequestTypedDict", + "PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion", "PutV1EmployeesEmployeeIDStateTaxesRequest", - "PutV1EmployeesEmployeeIDStateTaxesRequestBody", - "PutV1EmployeesEmployeeIDStateTaxesRequestBodyTypedDict", "PutV1EmployeesEmployeeIDStateTaxesRequestTypedDict", - "PutV1EmployeesEmployeeIDStateTaxesValue", - "PutV1EmployeesEmployeeIDStateTaxesValueTypedDict", + "PutV1EmployeesHeaderXGustoAPIVersion", "PutV1EmployeesRequest", "PutV1EmployeesRequestBody", "PutV1EmployeesRequestBodyTypedDict", @@ -3653,6 +4226,7 @@ "PutV1HistoricalEmployeesTerminationTypedDict", "PutV1HistoricalEmployeesWorkAddress", "PutV1HistoricalEmployeesWorkAddressTypedDict", + "PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion", "PutV1HomeAddressesHomeAddressUUIDRequest", "PutV1HomeAddressesHomeAddressUUIDRequestBody", "PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict", @@ -3671,6 +4245,21 @@ "PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequestTypedDict", "PutV1PartnerManagedCompaniesCompanyUUIDMigrateResponseBody", "PutV1PartnerManagedCompaniesCompanyUUIDMigrateResponseBodyTypedDict", + "PutV1RecurringReimbursementsHeaderXGustoAPIVersion", + "PutV1RecurringReimbursementsRequest", + "PutV1RecurringReimbursementsRequestBody", + "PutV1RecurringReimbursementsRequestBodyTypedDict", + "PutV1RecurringReimbursementsRequestTypedDict", + "PutV1RecurringReimbursementsResponseBody", + "PutV1RecurringReimbursementsResponseBodyTypedDict", + "PutV1SalaryEstimatesIDExperienceLevel", + "PutV1SalaryEstimatesIDHeaderXGustoAPIVersion", + "PutV1SalaryEstimatesIDOccupations", + "PutV1SalaryEstimatesIDOccupationsTypedDict", + "PutV1SalaryEstimatesIDRequest", + "PutV1SalaryEstimatesIDRequestBody", + "PutV1SalaryEstimatesIDRequestBodyTypedDict", + "PutV1SalaryEstimatesIDRequestTypedDict", "PutV1TaxLiabilitiesFinishRequest", "PutV1TaxLiabilitiesFinishRequestTypedDict", "PutV1TaxLiabilitiesRequest", @@ -3702,6 +4291,7 @@ "PutV1WebhookSubscriptionUUIDSecurity", "PutV1WebhookSubscriptionUUIDSecurityTypedDict", "PutV1WebhookSubscriptionUUIDSubscriptionTypes", + "PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion", "PutV1WorkAddressesWorkAddressUUIDRequest", "PutV1WorkAddressesWorkAddressUUIDRequestBody", "PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict", @@ -3724,6 +4314,8 @@ "PutWireInRequestsWireInRequestUUIDRequestTypedDict", "QueryParamFrequency", "QueryParamInclude", + "QueryParamSortOrder", + "QueryParamStatus", "Questions", "QuestionsTypedDict", "RateType", @@ -3744,6 +4336,8 @@ "RehireBodyTypedDict", "RehireEmploymentStatus", "RehireTypedDict", + "ReimbursementsModel", + "ReimbursementsModelTypedDict", "Report", "ReportTemplate", "ReportTemplateTypedDict", @@ -3762,13 +4356,19 @@ "ResourcesTypedDict", "ResponseBody", "ResponseBodyTypedDict", + "ResponseValidationError", + "SalaryEstimate", + "SalaryEstimateTypedDict", "Schema", "SchemaTypedDict", "Section", "Security", "SecurityTypedDict", + "ShowEmployees", + "ShowEmployeesTypedDict", "Signatory", "SignatoryTypedDict", + "SortBy", "SortOrder", "Source", "SplitBy", @@ -3832,8 +4432,8 @@ "Type", "UnblockOptions", "UnblockOptionsTypedDict", - "UnprocessableEntityErrorObjectError", - "UnprocessableEntityErrorObjectErrorData", + "UnprocessableEntityErrorObject", + "UnprocessableEntityErrorObjectData", "UnprocessedTerminationPayPeriod", "UnprocessedTerminationPayPeriodTypedDict", "User", @@ -3856,6 +4456,9 @@ "WebhookSubscription", "WebhookSubscriptionStatus", "WebhookSubscriptionTypedDict", + "WebhooksHealthCheckStatus", + "WebhooksHealthCheckStatusStatus", + "WebhooksHealthCheckStatusTypedDict", "WireInRequest", "WireInRequestStatus", "WireInRequestTypedDict", @@ -3866,3 +4469,1913 @@ "YtdBenefitAmountsFromDifferentCompany", "YtdBenefitAmountsFromDifferentCompanyTypedDict", ] + +_dynamic_imports: dict[str, str] = { + "AccruingTimeOffHour": ".accruing_time_off_hour", + "AccruingTimeOffHourTypedDict": ".accruing_time_off_hour", + "AccruingTimeOffHourObject": ".accruing_time_off_hour_object", + "AccruingTimeOffHourObjectTypedDict": ".accruing_time_off_hour_object", + "AchTransaction": ".ach_transaction", + "AchTransactionRecipientType": ".ach_transaction", + "AchTransactionTypedDict": ".ach_transaction", + "PaymentDirection": ".ach_transaction", + "PaymentEventType": ".ach_transaction", + "PaymentStatus": ".ach_transaction", + "Admin": ".admin", + "AdminTypedDict": ".admin", + "APIError": ".apierror", + "Authentication": ".authentication", + "AuthenticationTypedDict": ".authentication", + "BenefitSummary": ".benefit_summary", + "BenefitSummaryEmployees": ".benefit_summary", + "BenefitSummaryEmployeesTypedDict": ".benefit_summary", + "BenefitSummaryPayPeriod": ".benefit_summary", + "BenefitSummaryPayPeriodTypedDict": ".benefit_summary", + "BenefitSummaryTypedDict": ".benefit_summary", + "PayrollBenefits": ".benefit_summary", + "PayrollBenefitsTypedDict": ".benefit_summary", + "BenefitTypeRequirements": ".benefit_type_requirements", + "BenefitTypeRequirementsCatchUpDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsCatchUpDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsCompanyContributionAnnualMaximumDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsContribution": ".benefit_type_requirements", + "BenefitTypeRequirementsContributionTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsCoverageAmountDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsCoverageAmountDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsCoverageSalaryMultiplierDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsDeductAsPercentageDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsDeductAsPercentageDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsLimitOptionDefaultValue": ".benefit_type_requirements", + "BenefitTypeRequirementsLimitOptionDefaultValueTypedDict": ".benefit_type_requirements", + "BenefitTypeRequirementsTypedDict": ".benefit_type_requirements", + "CatchUp": ".benefit_type_requirements", + "CatchUpTypedDict": ".benefit_type_requirements", + "CompanyContributionAnnualMaximum": ".benefit_type_requirements", + "CompanyContributionAnnualMaximumTypedDict": ".benefit_type_requirements", + "CoverageAmount": ".benefit_type_requirements", + "CoverageAmountTypedDict": ".benefit_type_requirements", + "CoverageSalaryMultiplier": ".benefit_type_requirements", + "CoverageSalaryMultiplierTypedDict": ".benefit_type_requirements", + "DeductAsPercentage": ".benefit_type_requirements", + "DeductAsPercentageTypedDict": ".benefit_type_requirements", + "DefaultValue": ".benefit_type_requirements", + "DefaultValueTypedDict": ".benefit_type_requirements", + "EmployeeDeduction": ".benefit_type_requirements", + "EmployeeDeductionTypedDict": ".benefit_type_requirements", + "LimitOption": ".benefit_type_requirements", + "LimitOptionTypedDict": ".benefit_type_requirements", + "BLSOccupation": ".bls_occupation", + "BLSOccupationTypedDict": ".bls_occupation", + "Agencies": ".child_support_data", + "AgenciesTypedDict": ".child_support_data", + "ChildSupportData": ".child_support_data", + "ChildSupportDataTypedDict": ".child_support_data", + "FipsCodes": ".child_support_data", + "FipsCodesTypedDict": ".child_support_data", + "Key": ".child_support_data", + "RequiredAttributes": ".child_support_data", + "RequiredAttributesTypedDict": ".child_support_data", + "Company": ".company", + "CompanyHomeAddress": ".company", + "CompanyHomeAddressTypedDict": ".company", + "CompanyPaidTimeOff": ".company", + "CompanyPaidTimeOffTypedDict": ".company", + "CompanyStatus": ".company", + "CompanyTypedDict": ".company", + "Compensations": ".company", + "CompensationsTypedDict": ".company", + "EntityType": ".company", + "Fixed": ".company", + "FixedTypedDict": ".company", + "FundingType": ".company", + "Hourly": ".company", + "HourlyTypedDict": ".company", + "PayScheduleType": ".company", + "PrimaryPayrollAdmin": ".company", + "PrimaryPayrollAdminTypedDict": ".company", + "PrimarySignatory": ".company", + "PrimarySignatoryTypedDict": ".company", + "Tier": ".company", + "CompanyAddress": ".company_address", + "CompanyAddressTypedDict": ".company_address", + "Category": ".company_attachment", + "CompanyAttachment": ".company_attachment", + "CompanyAttachmentTypedDict": ".company_attachment", + "AccountType": ".company_bank_account", + "CompanyBankAccount": ".company_bank_account", + "CompanyBankAccountTypedDict": ".company_bank_account", + "PlaidStatus": ".company_bank_account", + "VerificationStatus": ".company_bank_account", + "VerificationType": ".company_bank_account", + "CompanyBankAccountRequest": ".company_bank_account_request", + "CompanyBankAccountRequestAccountType": ".company_bank_account_request", + "CompanyBankAccountRequestTypedDict": ".company_bank_account_request", + "CompanyBenefit": ".company_benefit", + "CompanyBenefitTypedDict": ".company_benefit", + "Source": ".company_benefit", + "CompanyBenefitWithEmployeeBenefits": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsContribution": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsContributionTypedDict": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsSource": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsTypedDict": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValue": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValue2": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValue2TypedDict": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValueTiers": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValueTiersTypedDict": ".company_benefit_with_employee_benefits", + "CompanyBenefitWithEmployeeBenefitsValueTypedDict": ".company_benefit_with_employee_benefits", + "EmployeeBenefitsModel": ".company_benefit_with_employee_benefits", + "EmployeeBenefitsModelTypedDict": ".company_benefit_with_employee_benefits", + "CompanyCustomField": ".company_custom_field", + "CompanyCustomFieldTypedDict": ".company_custom_field", + "CompanyCustomFieldList": ".company_custom_field_list", + "CompanyCustomFieldListTypedDict": ".company_custom_field_list", + "CompanyFormsSortBy": ".company_forms_sort_by", + "CompanyOnboardingStatus": ".company_onboarding_status", + "CompanyOnboardingStatusTypedDict": ".company_onboarding_status", + "ID": ".company_onboarding_status", + "OnboardingStep": ".company_onboarding_status", + "OnboardingStepTypedDict": ".company_onboarding_status", + "Requirements": ".company_onboarding_status", + "CompanySuspension": ".company_suspension", + "CompanySuspensionTypedDict": ".company_suspension", + "ReconcileTaxMethod": ".company_suspension", + "TaxRefunds": ".company_suspension", + "TaxRefundsTypedDict": ".company_suspension", + "CompanySuspensionCreationErrorsError": ".company_suspension_creation_errors_error", + "CompanySuspensionCreationErrorsErrorData": ".company_suspension_creation_errors_error", + "Compensation": ".compensation", + "CompensationTypedDict": ".compensation", + "MinimumWages": ".compensation", + "MinimumWagesTypedDict": ".compensation", + "PaymentUnit": ".compensation", + "Address": ".contractor", + "AddressTypedDict": ".contractor", + "Contractor": ".contractor", + "ContractorOnboardingStatus1": ".contractor", + "ContractorPaymentMethod1": ".contractor", + "ContractorType": ".contractor", + "ContractorTypedDict": ".contractor", + "WageType": ".contractor", + "ContractorAddress": ".contractor_address", + "ContractorAddressTypedDict": ".contractor_address", + "ContractorBankAccount": ".contractor_bank_account", + "ContractorBankAccountAccountType": ".contractor_bank_account", + "ContractorBankAccountTypedDict": ".contractor_bank_account", + "ContractorOnboardingStatus": ".contractor_onboarding_status", + "ContractorOnboardingStatusOnboardingStatus": ".contractor_onboarding_status", + "ContractorOnboardingStatusOnboardingStep": ".contractor_onboarding_status", + "ContractorOnboardingStatusOnboardingStepTypedDict": ".contractor_onboarding_status", + "ContractorOnboardingStatusTypedDict": ".contractor_onboarding_status", + "ContractorPayment": ".contractor_payment", + "ContractorPaymentPaymentMethod": ".contractor_payment", + "ContractorPaymentStatus": ".contractor_payment", + "ContractorPaymentTypedDict": ".contractor_payment", + "ContractorPaymentWageType": ".contractor_payment", + "ContractorPaymentDetailsList": ".contractor_payment_details_list", + "ContractorPaymentDetailsListPaymentMethod": ".contractor_payment_details_list", + "ContractorPaymentDetailsListSplitBy": ".contractor_payment_details_list", + "ContractorPaymentDetailsListTypedDict": ".contractor_payment_details_list", + "Splits": ".contractor_payment_details_list", + "SplitsTypedDict": ".contractor_payment_details_list", + "ContractorPaymentForGroup": ".contractor_payment_for_group", + "ContractorPaymentForGroupPaymentMethod": ".contractor_payment_for_group", + "ContractorPaymentForGroupStatus": ".contractor_payment_for_group", + "ContractorPaymentForGroupTypedDict": ".contractor_payment_for_group", + "ContractorPaymentForGroupWageType": ".contractor_payment_for_group", + "ContractorPaymentForGroupPreview": ".contractor_payment_for_group_preview", + "ContractorPaymentForGroupPreviewPaymentMethod": ".contractor_payment_for_group_preview", + "ContractorPaymentForGroupPreviewStatus": ".contractor_payment_for_group_preview", + "ContractorPaymentForGroupPreviewTypedDict": ".contractor_payment_for_group_preview", + "ContractorPaymentForGroupPreviewWageType": ".contractor_payment_for_group_preview", + "ContractorPaymentGroup": ".contractor_payment_group", + "ContractorPaymentGroupStatus": ".contractor_payment_group", + "ContractorPaymentGroupTotals": ".contractor_payment_group", + "ContractorPaymentGroupTotalsTypedDict": ".contractor_payment_group", + "ContractorPaymentGroupTypedDict": ".contractor_payment_group", + "ContractorPaymentGroupPartnerDisbursements": ".contractor_payment_group_partner_disbursements", + "ContractorPaymentGroupPartnerDisbursementsPaymentMethod": ".contractor_payment_group_partner_disbursements", + "ContractorPaymentGroupPartnerDisbursementsPaymentStatus": ".contractor_payment_group_partner_disbursements", + "ContractorPaymentGroupPartnerDisbursementsTypedDict": ".contractor_payment_group_partner_disbursements", + "Disbursements": ".contractor_payment_group_partner_disbursements", + "DisbursementsTypedDict": ".contractor_payment_group_partner_disbursements", + "ContractorPaymentGroupPreview": ".contractor_payment_group_preview", + "ContractorPaymentGroupPreviewStatus": ".contractor_payment_group_preview", + "ContractorPaymentGroupPreviewTotals": ".contractor_payment_group_preview", + "ContractorPaymentGroupPreviewTotalsTypedDict": ".contractor_payment_group_preview", + "ContractorPaymentGroupPreviewTypedDict": ".contractor_payment_group_preview", + "ContractorPaymentGroupWithBlockers": ".contractor_payment_group_with_blockers", + "ContractorPaymentGroupWithBlockersStatus": ".contractor_payment_group_with_blockers", + "ContractorPaymentGroupWithBlockersTotals": ".contractor_payment_group_with_blockers", + "ContractorPaymentGroupWithBlockersTotalsTypedDict": ".contractor_payment_group_with_blockers", + "ContractorPaymentGroupWithBlockersTypedDict": ".contractor_payment_group_with_blockers", + "ContractorPaymentMethod": ".contractor_payment_method", + "ContractorPaymentMethodSplitBy": ".contractor_payment_method", + "ContractorPaymentMethodType": ".contractor_payment_method", + "ContractorPaymentMethodTypedDict": ".contractor_payment_method", + "ContractorPaymentReceipt": ".contractor_payment_receipt", + "ContractorPaymentReceiptLicensee": ".contractor_payment_receipt", + "ContractorPaymentReceiptLicenseeTypedDict": ".contractor_payment_receipt", + "ContractorPaymentReceiptPaymentMethod": ".contractor_payment_receipt", + "ContractorPaymentReceiptTotals": ".contractor_payment_receipt", + "ContractorPaymentReceiptTotalsTypedDict": ".contractor_payment_receipt", + "ContractorPaymentReceiptTypedDict": ".contractor_payment_receipt", + "ContractorPaymentsModel": ".contractor_payment_receipt", + "ContractorPaymentsModelTypedDict": ".contractor_payment_receipt", + "ContractorPaymentSummary": ".contractor_payment_summary", + "ContractorPaymentSummaryContractorPayments": ".contractor_payment_summary", + "ContractorPaymentSummaryContractorPaymentsTypedDict": ".contractor_payment_summary", + "ContractorPaymentSummaryTypedDict": ".contractor_payment_summary", + "Total": ".contractor_payment_summary", + "TotalTypedDict": ".contractor_payment_summary", + "ContractorPaymentSummaryByDates": ".contractor_payment_summary_by_dates", + "ContractorPaymentSummaryByDatesContractorPayments": ".contractor_payment_summary_by_dates", + "ContractorPaymentSummaryByDatesContractorPaymentsTypedDict": ".contractor_payment_summary_by_dates", + "ContractorPaymentSummaryByDatesTotal": ".contractor_payment_summary_by_dates", + "ContractorPaymentSummaryByDatesTotalTypedDict": ".contractor_payment_summary_by_dates", + "ContractorPaymentSummaryByDatesTypedDict": ".contractor_payment_summary_by_dates", + "ContractorsSortBy": ".contractors_sort_by", + "ContributionExclusion": ".contribution_exclusion", + "ContributionExclusionTypedDict": ".contribution_exclusion", + "CreateReport": ".create_report", + "CreateReportTypedDict": ".create_report", + "CustomFieldType": ".custom_field_type", + "DeleteCompaniesCompanyUUIDHolidayPayPolicyRequest": ".delete_companies_company_uuid_holiday_pay_policyop", + "DeleteCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict": ".delete_companies_company_uuid_holiday_pay_policyop", + "DeleteDepartmentRequest": ".delete_departmentop", + "DeleteDepartmentRequestTypedDict": ".delete_departmentop", + "DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion": ".delete_v1_companies_company_id_bank_accounts_bank_account_idop", + "DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDRequest": ".delete_v1_companies_company_id_bank_accounts_bank_account_idop", + "DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDRequestTypedDict": ".delete_v1_companies_company_id_bank_accounts_bank_account_idop", + "DeleteV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest": ".delete_v1_companies_company_id_contractor_payment_contractor_paymentop", + "DeleteV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict": ".delete_v1_companies_company_id_contractor_payment_contractor_paymentop", + "DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest": ".delete_v1_companies_company_id_earning_types_earning_type_uuidop", + "DeleteV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict": ".delete_v1_companies_company_id_earning_types_earning_type_uuidop", + "DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion": ".delete_v1_companies_company_id_payrollsop", + "DeleteV1CompaniesCompanyIDPayrollsRequest": ".delete_v1_companies_company_id_payrollsop", + "DeleteV1CompaniesCompanyIDPayrollsRequestTypedDict": ".delete_v1_companies_company_id_payrollsop", + "DeleteV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequest": ".delete_v1_companies_company_uuid_signatories_signatory_uuidop", + "DeleteV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestTypedDict": ".delete_v1_companies_company_uuid_signatories_signatory_uuidop", + "Base": ".delete_v1_company_benefits_company_benefit_idop", + "BaseTypedDict": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompanyBenefitsCompanyBenefitIDErrors": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompanyBenefitsCompanyBenefitIDErrorsTypedDict": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompanyBenefitsCompanyBenefitIDRequest": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompanyBenefitsCompanyBenefitIDRequestTypedDict": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData": ".delete_v1_company_benefits_company_benefit_idop", + "DeleteV1CompensationsCompensationIDRequest": ".delete_v1_compensations_compensation_idop", + "DeleteV1CompensationsCompensationIDRequestTypedDict": ".delete_v1_compensations_compensation_idop", + "DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion": ".delete_v1_contractor_payment_groups_contractor_payment_group_idop", + "DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequest": ".delete_v1_contractor_payment_groups_contractor_payment_group_idop", + "DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict": ".delete_v1_contractor_payment_groups_contractor_payment_group_idop", + "DeleteV1ContractorsContractorUUIDRequest": ".delete_v1_contractors_contractor_uuidop", + "DeleteV1ContractorsContractorUUIDRequestTypedDict": ".delete_v1_contractors_contractor_uuidop", + "DeleteV1EmployeeBenefitsEmployeeBenefitIDRequest": ".delete_v1_employee_benefits_employee_benefit_idop", + "DeleteV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict": ".delete_v1_employee_benefits_employee_benefit_idop", + "DeleteV1EmployeeHeaderXGustoAPIVersion": ".delete_v1_employeeop", + "DeleteV1EmployeeRequest": ".delete_v1_employeeop", + "DeleteV1EmployeeRequestTypedDict": ".delete_v1_employeeop", + "DeleteV1EmployeesEmployeeIDBankAccountsBankAccountIDRequest": ".delete_v1_employees_employee_id_bank_accounts_bank_account_idop", + "DeleteV1EmployeesEmployeeIDBankAccountsBankAccountIDRequestTypedDict": ".delete_v1_employees_employee_id_bank_accounts_bank_account_idop", + "DeleteV1EmployeesEmployeeIDI9AuthorizationDocumentsDocumentIDRequest": ".delete_v1_employees_employee_id_i9_authorization_documents_document_idop", + "DeleteV1EmployeesEmployeeIDI9AuthorizationDocumentsDocumentIDRequestTypedDict": ".delete_v1_employees_employee_id_i9_authorization_documents_document_idop", + "DeleteV1EmployeesEmployeeIDRehireRequest": ".delete_v1_employees_employee_id_rehireop", + "DeleteV1EmployeesEmployeeIDRehireRequestTypedDict": ".delete_v1_employees_employee_id_rehireop", + "DeleteV1EmployeesEmployeeIDTerminationsRequest": ".delete_v1_employees_employee_id_terminationsop", + "DeleteV1EmployeesEmployeeIDTerminationsRequestTypedDict": ".delete_v1_employees_employee_id_terminationsop", + "DeleteV1ExternalPayrollRequest": ".delete_v1_external_payrollop", + "DeleteV1ExternalPayrollRequestTypedDict": ".delete_v1_external_payrollop", + "DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion": ".delete_v1_home_addresses_home_address_uuidop", + "DeleteV1HomeAddressesHomeAddressUUIDRequest": ".delete_v1_home_addresses_home_address_uuidop", + "DeleteV1HomeAddressesHomeAddressUUIDRequestTypedDict": ".delete_v1_home_addresses_home_address_uuidop", + "DeleteV1JobsJobIDRequest": ".delete_v1_jobs_job_idop", + "DeleteV1JobsJobIDRequestTypedDict": ".delete_v1_jobs_job_idop", + "DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion": ".delete_v1_recurring_reimbursementsop", + "DeleteV1RecurringReimbursementsRequest": ".delete_v1_recurring_reimbursementsop", + "DeleteV1RecurringReimbursementsRequestTypedDict": ".delete_v1_recurring_reimbursementsop", + "DeleteV1WebhookSubscriptionUUIDRequest": ".delete_v1_webhook_subscription_uuidop", + "DeleteV1WebhookSubscriptionUUIDRequestTypedDict": ".delete_v1_webhook_subscription_uuidop", + "DeleteV1WebhookSubscriptionUUIDSecurity": ".delete_v1_webhook_subscription_uuidop", + "DeleteV1WebhookSubscriptionUUIDSecurityTypedDict": ".delete_v1_webhook_subscription_uuidop", + "DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion": ".delete_v1_work_addresses_work_address_uuidop", + "DeleteV1WorkAddressesWorkAddressUUIDRequest": ".delete_v1_work_addresses_work_address_uuidop", + "DeleteV1WorkAddressesWorkAddressUUIDRequestTypedDict": ".delete_v1_work_addresses_work_address_uuidop", + "ContractorsModel": ".department", + "ContractorsModelTypedDict": ".department", + "Department": ".department", + "DepartmentEmployees": ".department", + "DepartmentEmployeesTypedDict": ".department", + "DepartmentTypedDict": ".department", + "DetailedPaymentAccountSplit": ".detailedpaymentaccountsplit", + "DetailedPaymentAccountSplitTypedDict": ".detailedpaymentaccountsplit", + "Document": ".document", + "DocumentTypedDict": ".document", + "Fields": ".document", + "FieldsTypedDict": ".document", + "Pages": ".document", + "PagesTypedDict": ".document", + "RecipientType": ".document", + "DocumentPdf": ".document_pdf", + "DocumentPdfTypedDict": ".document_pdf", + "DocumentSigned": ".document_signed", + "DocumentSignedRecipientType": ".document_signed", + "DocumentSignedTypedDict": ".document_signed", + "DocumentType": ".document_type", + "EarningType": ".earning_type", + "EarningTypeTypedDict": ".earning_type", + "EarningTypeList": ".earning_type_list", + "EarningTypeListTypedDict": ".earning_type_list", + "Employee": ".employee", + "EmployeeCurrentEmploymentStatus": ".employee", + "EmployeeOnboardingDocumentsConfig": ".employee", + "EmployeeOnboardingDocumentsConfigTypedDict": ".employee", + "EmployeeOnboardingStatus1": ".employee", + "EmployeePaymentMethod1": ".employee", + "EmployeeTypedDict": ".employee", + "EmployeeAddress": ".employee_address", + "EmployeeAddressTypedDict": ".employee_address", + "EmployeeBankAccount": ".employee_bank_account", + "EmployeeBankAccountAccountType": ".employee_bank_account", + "EmployeeBankAccountTypedDict": ".employee_bank_account", + "Contribution": ".employee_benefit", + "ContributionTypedDict": ".employee_benefit", + "DeductionReducesTaxableIncome": ".employee_benefit", + "EmployeeBenefit": ".employee_benefit", + "EmployeeBenefitTypedDict": ".employee_benefit", + "EmployeeBenefitValue": ".employee_benefit", + "EmployeeBenefitValueTypedDict": ".employee_benefit", + "Tiers": ".employee_benefit", + "TiersTypedDict": ".employee_benefit", + "Two": ".employee_benefit", + "TwoTypedDict": ".employee_benefit", + "EmployeeBenefitForCompanyBenefit": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitContribution": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitContributionTypedDict": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitTypedDict": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitValue": ".employee_benefit_for_company_benefit", + "EmployeeBenefitForCompanyBenefitValueTypedDict": ".employee_benefit_for_company_benefit", + "Value2": ".employee_benefit_for_company_benefit", + "Value2TypedDict": ".employee_benefit_for_company_benefit", + "ValueTiers": ".employee_benefit_for_company_benefit", + "ValueTiersTypedDict": ".employee_benefit_for_company_benefit", + "EmployeeCustomField": ".employee_custom_field", + "EmployeeCustomFieldTypedDict": ".employee_custom_field", + "EmployeeFederalTax": ".employee_federal_tax", + "EmployeeFederalTaxTypedDict": ".employee_federal_tax", + "W4DataType": ".employee_federal_tax", + "EmployeeHomeAddress": ".employee_home_address", + "EmployeeHomeAddressTypedDict": ".employee_home_address", + "EmployeeOnboardingDocument": ".employee_onboarding_document", + "EmployeeOnboardingDocumentTypedDict": ".employee_onboarding_document", + "EmployeeOnboardingStatus": ".employee_onboarding_status", + "EmployeeOnboardingStatusOnboardingStep": ".employee_onboarding_status", + "EmployeeOnboardingStatusOnboardingStepTypedDict": ".employee_onboarding_status", + "EmployeeOnboardingStatusTypedDict": ".employee_onboarding_status", + "EmployeePayStubsList": ".employee_pay_stubs_list", + "EmployeePayStubsListPaymentMethod": ".employee_pay_stubs_list", + "EmployeePayStubsListTypedDict": ".employee_pay_stubs_list", + "EmployeePaymentMethod": ".employee_payment_method", + "EmployeePaymentMethodSplitBy": ".employee_payment_method", + "EmployeePaymentMethodType": ".employee_payment_method", + "EmployeePaymentMethodTypedDict": ".employee_payment_method", + "EmployeeStateTaxAnswer": ".employee_state_tax_answer", + "EmployeeStateTaxAnswerTypedDict": ".employee_state_tax_answer", + "Value": ".employee_state_tax_answer", + "ValueTypedDict": ".employee_state_tax_answer", + "EmployeeStateTaxInputQuestionFormat": ".employee_state_tax_input_question_format", + "EmployeeStateTaxInputQuestionFormatTypedDict": ".employee_state_tax_input_question_format", + "EmployeeStateTaxInputQuestionFormatValue": ".employee_state_tax_input_question_format", + "EmployeeStateTaxInputQuestionFormatValueTypedDict": ".employee_state_tax_input_question_format", + "Options": ".employee_state_tax_input_question_format", + "OptionsTypedDict": ".employee_state_tax_input_question_format", + "EmployeeStateTaxQuestion": ".employee_state_tax_question", + "EmployeeStateTaxQuestionTypedDict": ".employee_state_tax_question", + "EmployeeStateTaxesList": ".employee_state_taxes_list", + "EmployeeStateTaxesListTypedDict": ".employee_state_taxes_list", + "Answers": ".employee_state_taxes_request", + "AnswersTypedDict": ".employee_state_taxes_request", + "EmployeeStateTaxesRequest": ".employee_state_taxes_request", + "EmployeeStateTaxesRequestTypedDict": ".employee_state_taxes_request", + "EmployeeStateTaxesRequestValue": ".employee_state_taxes_request", + "EmployeeStateTaxesRequestValueTypedDict": ".employee_state_taxes_request", + "Questions": ".employee_state_taxes_request", + "QuestionsTypedDict": ".employee_state_taxes_request", + "States": ".employee_state_taxes_request", + "StatesTypedDict": ".employee_state_taxes_request", + "EmployeeWorkAddress": ".employee_work_address", + "EmployeeWorkAddressTypedDict": ".employee_work_address", + "EmployeePaymentDetail": ".employeepaymentdetail", + "EmployeePaymentDetailPaymentMethod": ".employeepaymentdetail", + "EmployeePaymentDetailTypedDict": ".employeepaymentdetail", + "SplitBy": ".employeepaymentdetail", + "EmploymentHistoryList": ".employment_history_list", + "EmploymentHistoryListEmploymentStatus": ".employment_history_list", + "EmploymentHistoryListTypedDict": ".employment_history_list", + "EntityErrorObject": ".entity_error_object", + "EntityErrorObjectTypedDict": ".entity_error_object", + "Metadata": ".entity_error_object", + "MetadataTypedDict": ".entity_error_object", + "Event": ".event", + "EventTypedDict": ".event", + "ResourceType": ".event", + "ApplicableBenefits": ".external_payroll", + "ApplicableBenefitsTypedDict": ".external_payroll", + "ApplicableEarnings": ".external_payroll", + "ApplicableEarningsTypedDict": ".external_payroll", + "ApplicableTaxes": ".external_payroll", + "ApplicableTaxesTypedDict": ".external_payroll", + "Benefits": ".external_payroll", + "BenefitsTypedDict": ".external_payroll", + "Earnings": ".external_payroll", + "EarningsTypedDict": ".external_payroll", + "ExternalPayroll": ".external_payroll", + "ExternalPayrollItems": ".external_payroll", + "ExternalPayrollItemsTypedDict": ".external_payroll", + "ExternalPayrollMetadata": ".external_payroll", + "ExternalPayrollMetadataTypedDict": ".external_payroll", + "ExternalPayrollTaxes": ".external_payroll", + "ExternalPayrollTaxesTypedDict": ".external_payroll", + "ExternalPayrollTypedDict": ".external_payroll", + "Status": ".external_payroll", + "ExternalPayrollBasic": ".external_payroll_basic", + "ExternalPayrollBasicStatus": ".external_payroll_basic", + "ExternalPayrollBasicTypedDict": ".external_payroll_basic", + "ExternalPayrollTaxSuggestions": ".external_payroll_tax_suggestions", + "ExternalPayrollTaxSuggestionsTypedDict": ".external_payroll_tax_suggestions", + "TaxSuggestions": ".external_payroll_tax_suggestions", + "TaxSuggestionsTypedDict": ".external_payroll_tax_suggestions", + "FastPaymentLimitRequiredBody": ".fast_payment_limit_required_body", + "FastPaymentLimitRequiredBodyTypedDict": ".fast_payment_limit_required_body", + "EinVerification": ".federal_tax_details", + "EinVerificationTypedDict": ".federal_tax_details", + "FederalTaxDetails": ".federal_tax_details", + "FederalTaxDetailsStatus": ".federal_tax_details", + "FederalTaxDetailsTypedDict": ".federal_tax_details", + "Flow": ".flow", + "FlowTypedDict": ".flow", + "FlsaStatusType": ".flsa_status_type", + "Form": ".form", + "FormTypedDict": ".form", + "Form1099": ".form_1099", + "Form1099TypedDict": ".form_1099", + "FormPdf": ".form_pdf", + "FormPdfTypedDict": ".form_pdf", + "Garnishment": ".garnishment", + "GarnishmentType": ".garnishment", + "GarnishmentTypedDict": ".garnishment", + "GarnishmentChildSupport": ".garnishment_child_support", + "GarnishmentChildSupportTypedDict": ".garnishment_child_support", + "PaymentPeriod": ".garnishment_child_support", + "Aggregation": ".general_ledger_report", + "GeneralLedgerReport": ".general_ledger_report", + "GeneralLedgerReportTypedDict": ".general_ledger_report", + "IntegrationType": ".general_ledger_report", + "GeneratedDocument": ".generated_document", + "GeneratedDocumentStatus": ".generated_document", + "GeneratedDocumentTypedDict": ".generated_document", + "GetAchTransactionsRequest": ".get_ach_transactionsop", + "GetAchTransactionsRequestTypedDict": ".get_ach_transactionsop", + "CheckDate": ".get_companies_company_uuid_contractor_payments_previewop", + "CheckDateTypedDict": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewBase": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewBaseTypedDict": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPayments": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBody": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBodyData": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsTypedDict": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewErrors": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewErrorsTypedDict": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewRequest": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewRequestBody": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewRequestBodyTypedDict": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewRequestTypedDict": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewResponseBody": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDContractorPaymentsPreviewResponseBodyTypedDict": ".get_companies_company_uuid_contractor_payments_previewop", + "GetCompaniesCompanyUUIDHolidayPayPolicyRequest": ".get_companies_company_uuid_holiday_pay_policyop", + "GetCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict": ".get_companies_company_uuid_holiday_pay_policyop", + "GetCompaniesCompanyUUIDPaidHolidaysRequest": ".get_companies_company_uuid_paid_holidaysop", + "GetCompaniesCompanyUUIDPaidHolidaysRequestBody": ".get_companies_company_uuid_paid_holidaysop", + "GetCompaniesCompanyUUIDPaidHolidaysRequestBodyTypedDict": ".get_companies_company_uuid_paid_holidaysop", + "GetCompaniesCompanyUUIDPaidHolidaysRequestTypedDict": ".get_companies_company_uuid_paid_holidaysop", + "GetCompaniesCompanyUUIDReportTemplatesReportTypeRequest": ".get_companies_company_uuid_report_templates_report_typeop", + "GetCompaniesCompanyUUIDReportTemplatesReportTypeRequestTypedDict": ".get_companies_company_uuid_report_templates_report_typeop", + "GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion": ".get_companies_company_uuid_suspensionsop", + "GetCompaniesCompanyUUIDSuspensionsRequest": ".get_companies_company_uuid_suspensionsop", + "GetCompaniesCompanyUUIDSuspensionsRequestTypedDict": ".get_companies_company_uuid_suspensionsop", + "GetCompaniesCompanyUUIDTimeOffPoliciesRequest": ".get_companies_company_uuid_time_off_policiesop", + "GetCompaniesCompanyUUIDTimeOffPoliciesRequestTypedDict": ".get_companies_company_uuid_time_off_policiesop", + "GetCompaniesCompanyUUIDWireInRequestUUIDRequest": ".get_companies_company_uuid_wire_in_request_uuidop", + "GetCompaniesCompanyUUIDWireInRequestUUIDRequestTypedDict": ".get_companies_company_uuid_wire_in_request_uuidop", + "GetCompaniesDepartmentsRequest": ".get_companies_departmentsop", + "GetCompaniesDepartmentsRequestTypedDict": ".get_companies_departmentsop", + "GetCompanyNotificationsHeaderXGustoAPIVersion": ".get_company_notificationsop", + "GetCompanyNotificationsRequest": ".get_company_notificationsop", + "GetCompanyNotificationsRequestTypedDict": ".get_company_notificationsop", + "QueryParamStatus": ".get_company_notificationsop", + "GetDepartmentRequest": ".get_departmentop", + "GetDepartmentRequestTypedDict": ".get_departmentop", + "GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequest": ".get_employee_ytd_benefit_amounts_from_different_companyop", + "GetEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict": ".get_employee_ytd_benefit_amounts_from_different_companyop", + "GetEventsRequest": ".get_eventsop", + "GetEventsRequestTypedDict": ".get_eventsop", + "GetEventsSecurity": ".get_eventsop", + "GetEventsSecurityTypedDict": ".get_eventsop", + "GetInformationRequestsRequest": ".get_information_requestsop", + "GetInformationRequestsRequestTypedDict": ".get_information_requestsop", + "GetInvoicesInvoicePeriodRequest": ".get_invoices_invoice_periodop", + "GetInvoicesInvoicePeriodRequestTypedDict": ".get_invoices_invoice_periodop", + "GetInvoicesInvoicePeriodSecurity": ".get_invoices_invoice_periodop", + "GetInvoicesInvoicePeriodSecurityTypedDict": ".get_invoices_invoice_periodop", + "GetNotificationsNotificationUUIDRequest": ".get_notifications_notification_uuidop", + "GetNotificationsNotificationUUIDRequestTypedDict": ".get_notifications_notification_uuidop", + "GetRecoveryCasesRequest": ".get_recovery_casesop", + "GetRecoveryCasesRequestTypedDict": ".get_recovery_casesop", + "GetReportsRequestUUIDRequest": ".get_reports_request_uuidop", + "GetReportsRequestUUIDRequestTypedDict": ".get_reports_request_uuidop", + "GetTimeOffPoliciesTimeOffPolicyUUIDRequest": ".get_time_off_policies_time_off_policy_uuidop", + "GetTimeOffPoliciesTimeOffPolicyUUIDRequestTypedDict": ".get_time_off_policies_time_off_policy_uuidop", + "GetV1BenefitsBenefitIDRequest": ".get_v1_benefits_benefit_idop", + "GetV1BenefitsBenefitIDRequestTypedDict": ".get_v1_benefits_benefit_idop", + "GetV1BenefitsBenefitsIDRequirementsRequest": ".get_v1_benefits_benefits_id_requirementsop", + "GetV1BenefitsBenefitsIDRequirementsRequestTypedDict": ".get_v1_benefits_benefits_id_requirementsop", + "GetV1BenefitsCompanyBenefitIDSummaryRequest": ".get_v1_benefits_company_benefit_id_summaryop", + "GetV1BenefitsCompanyBenefitIDSummaryRequestTypedDict": ".get_v1_benefits_company_benefit_id_summaryop", + "GetV1BenefitsRequest": ".get_v1_benefitsop", + "GetV1BenefitsRequestTypedDict": ".get_v1_benefitsop", + "GetV1CompaniesAttachmentURLRequest": ".get_v1_companies_attachment_urlop", + "GetV1CompaniesAttachmentURLRequestTypedDict": ".get_v1_companies_attachment_urlop", + "GetV1CompaniesAttachmentURLResponseBody": ".get_v1_companies_attachment_urlop", + "GetV1CompaniesAttachmentURLResponseBodyTypedDict": ".get_v1_companies_attachment_urlop", + "GetV1CompaniesAttachmentRequest": ".get_v1_companies_attachmentop", + "GetV1CompaniesAttachmentRequestTypedDict": ".get_v1_companies_attachmentop", + "GetV1CompaniesAttachmentsRequest": ".get_v1_companies_attachmentsop", + "GetV1CompaniesAttachmentsRequestTypedDict": ".get_v1_companies_attachmentsop", + "GetV1CompaniesCompanyIDAdminsRequest": ".get_v1_companies_company_id_adminsop", + "GetV1CompaniesCompanyIDAdminsRequestTypedDict": ".get_v1_companies_company_id_adminsop", + "GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion": ".get_v1_companies_company_id_bank_accountsop", + "GetV1CompaniesCompanyIDBankAccountsRequest": ".get_v1_companies_company_id_bank_accountsop", + "GetV1CompaniesCompanyIDBankAccountsRequestTypedDict": ".get_v1_companies_company_id_bank_accountsop", + "GetV1CompaniesCompanyIDCompanyBenefitsRequest": ".get_v1_companies_company_id_company_benefitsop", + "GetV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict": ".get_v1_companies_company_id_company_benefitsop", + "GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequest": ".get_v1_companies_company_id_contractor_payment_contractor_paymentop", + "GetV1CompaniesCompanyIDContractorPaymentContractorPaymentRequestTypedDict": ".get_v1_companies_company_id_contractor_payment_contractor_paymentop", + "GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion": ".get_v1_companies_company_id_contractor_payment_groupsop", + "GetV1CompaniesCompanyIDContractorPaymentGroupsRequest": ".get_v1_companies_company_id_contractor_payment_groupsop", + "GetV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict": ".get_v1_companies_company_id_contractor_payment_groupsop", + "GetV1CompaniesCompanyIDContractorPaymentsRequest": ".get_v1_companies_company_id_contractor_paymentsop", + "GetV1CompaniesCompanyIDContractorPaymentsRequestTypedDict": ".get_v1_companies_company_id_contractor_paymentsop", + "GetV1CompaniesCompanyIDContractorPaymentsResponseBody": ".get_v1_companies_company_id_contractor_paymentsop", + "GetV1CompaniesCompanyIDContractorPaymentsResponseBodyTypedDict": ".get_v1_companies_company_id_contractor_paymentsop", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion": ".get_v1_companies_company_id_contractors_payment_detailsop", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest": ".get_v1_companies_company_id_contractors_payment_detailsop", + "GetV1CompaniesCompanyIDContractorsPaymentDetailsRequestTypedDict": ".get_v1_companies_company_id_contractors_payment_detailsop", + "GetV1CompaniesCompanyIDCustomFieldsRequest": ".get_v1_companies_company_id_custom_fieldsop", + "GetV1CompaniesCompanyIDCustomFieldsRequestTypedDict": ".get_v1_companies_company_id_custom_fieldsop", + "GetV1CompaniesCompanyIDEarningTypesRequest": ".get_v1_companies_company_id_earning_typesop", + "GetV1CompaniesCompanyIDEarningTypesRequestTypedDict": ".get_v1_companies_company_id_earning_typesop", + "GetV1CompaniesCompanyIDEmployeesPaymentDetailsRequest": ".get_v1_companies_company_id_employees_payment_detailsop", + "GetV1CompaniesCompanyIDEmployeesPaymentDetailsRequestTypedDict": ".get_v1_companies_company_id_employees_payment_detailsop", + "GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion": ".get_v1_companies_company_id_employeesop", + "GetV1CompaniesCompanyIDEmployeesRequest": ".get_v1_companies_company_id_employeesop", + "GetV1CompaniesCompanyIDEmployeesRequestTypedDict": ".get_v1_companies_company_id_employeesop", + "Include": ".get_v1_companies_company_id_employeesop", + "GetV1CompaniesCompanyIDFederalTaxDetailsRequest": ".get_v1_companies_company_id_federal_tax_detailsop", + "GetV1CompaniesCompanyIDFederalTaxDetailsRequestTypedDict": ".get_v1_companies_company_id_federal_tax_detailsop", + "GetV1CompaniesCompanyIDLocationsRequest": ".get_v1_companies_company_id_locationsop", + "GetV1CompaniesCompanyIDLocationsRequestTypedDict": ".get_v1_companies_company_id_locationsop", + "GetV1CompaniesCompanyIDPayPeriodsRequest": ".get_v1_companies_company_id_pay_periodsop", + "GetV1CompaniesCompanyIDPayPeriodsRequestTypedDict": ".get_v1_companies_company_id_pay_periodsop", + "GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequest": ".get_v1_companies_company_id_pay_schedules_assignmentsop", + "GetV1CompaniesCompanyIDPaySchedulesAssignmentsRequestTypedDict": ".get_v1_companies_company_id_pay_schedules_assignmentsop", + "GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequest": ".get_v1_companies_company_id_pay_schedules_pay_schedule_idop", + "GetV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestTypedDict": ".get_v1_companies_company_id_pay_schedules_pay_schedule_idop", + "GetV1CompaniesCompanyIDPaySchedulesPreviewRequest": ".get_v1_companies_company_id_pay_schedules_previewop", + "GetV1CompaniesCompanyIDPaySchedulesPreviewRequestTypedDict": ".get_v1_companies_company_id_pay_schedules_previewop", + "GetV1CompaniesCompanyIDPaySchedulesPreviewResponseBody": ".get_v1_companies_company_id_pay_schedules_previewop", + "GetV1CompaniesCompanyIDPaySchedulesPreviewResponseBodyTypedDict": ".get_v1_companies_company_id_pay_schedules_previewop", + "PayPeriods": ".get_v1_companies_company_id_pay_schedules_previewop", + "PayPeriodsTypedDict": ".get_v1_companies_company_id_pay_schedules_previewop", + "QueryParamFrequency": ".get_v1_companies_company_id_pay_schedules_previewop", + "GetV1CompaniesCompanyIDPaySchedulesRequest": ".get_v1_companies_company_id_pay_schedulesop", + "GetV1CompaniesCompanyIDPaySchedulesRequestTypedDict": ".get_v1_companies_company_id_pay_schedulesop", + "GetV1CompaniesCompanyIDPayrollReversalsRequest": ".get_v1_companies_company_id_payroll_reversalsop", + "GetV1CompaniesCompanyIDPayrollReversalsRequestTypedDict": ".get_v1_companies_company_id_payroll_reversalsop", + "GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion": ".get_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest": ".get_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestTypedDict": ".get_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion": ".get_v1_companies_company_id_payrolls_payroll_idop", + "GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude": ".get_v1_companies_company_id_payrolls_payroll_idop", + "GetV1CompaniesCompanyIDPayrollsPayrollIDRequest": ".get_v1_companies_company_id_payrolls_payroll_idop", + "GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict": ".get_v1_companies_company_id_payrolls_payroll_idop", + "SortBy": ".get_v1_companies_company_id_payrolls_payroll_idop", + "GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion": ".get_v1_companies_company_id_payrollsop", + "GetV1CompaniesCompanyIDPayrollsQueryParamInclude": ".get_v1_companies_company_id_payrollsop", + "GetV1CompaniesCompanyIDPayrollsRequest": ".get_v1_companies_company_id_payrollsop", + "GetV1CompaniesCompanyIDPayrollsRequestTypedDict": ".get_v1_companies_company_id_payrollsop", + "PayrollTypes": ".get_v1_companies_company_id_payrollsop", + "ProcessingStatuses": ".get_v1_companies_company_id_payrollsop", + "QueryParamSortOrder": ".get_v1_companies_company_id_payrollsop", + "GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequest": ".get_v1_companies_company_id_unprocessed_termination_pay_periodsop", + "GetV1CompaniesCompanyIDUnprocessedTerminationPayPeriodsRequestTypedDict": ".get_v1_companies_company_id_unprocessed_termination_pay_periodsop", + "GetV1CompaniesCompanyUUIDContractorsRequest": ".get_v1_companies_company_uuid_contractorsop", + "GetV1CompaniesCompanyUUIDContractorsRequestTypedDict": ".get_v1_companies_company_uuid_contractorsop", + "GetV1CompaniesCompanyUUIDSignatoriesRequest": ".get_v1_companies_company_uuid_signatoriesop", + "GetV1CompaniesCompanyUUIDSignatoriesRequestTypedDict": ".get_v1_companies_company_uuid_signatoriesop", + "GetV1CompaniesCompanyUUIDTaxRequirementsStateRequest": ".get_v1_companies_company_uuid_tax_requirements_stateop", + "GetV1CompaniesCompanyUUIDTaxRequirementsStateRequestTypedDict": ".get_v1_companies_company_uuid_tax_requirements_stateop", + "GetV1CompaniesCompanyUUIDTaxRequirementsRequest": ".get_v1_companies_company_uuid_tax_requirementsop", + "GetV1CompaniesCompanyUUIDTaxRequirementsRequestTypedDict": ".get_v1_companies_company_uuid_tax_requirementsop", + "ResponseBody": ".get_v1_companies_company_uuid_tax_requirementsop", + "ResponseBodyTypedDict": ".get_v1_companies_company_uuid_tax_requirementsop", + "GetV1CompaniesPayrollBlockersCompanyUUIDRequest": ".get_v1_companies_payroll_blockers_company_uuidop", + "GetV1CompaniesPayrollBlockersCompanyUUIDRequestTypedDict": ".get_v1_companies_payroll_blockers_company_uuidop", + "GetV1CompaniesRequest": ".get_v1_companiesop", + "GetV1CompaniesRequestTypedDict": ".get_v1_companiesop", + "GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest": ".get_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict": ".get_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest": ".get_v1_company_benefits_company_benefit_id_employee_benefitsop", + "GetV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict": ".get_v1_company_benefits_company_benefit_id_employee_benefitsop", + "GetV1CompanyBenefitsCompanyBenefitIDRequest": ".get_v1_company_benefits_company_benefit_idop", + "GetV1CompanyBenefitsCompanyBenefitIDRequestTypedDict": ".get_v1_company_benefits_company_benefit_idop", + "GetV1CompanyExternalPayrollsRequest": ".get_v1_company_external_payrollsop", + "GetV1CompanyExternalPayrollsRequestTypedDict": ".get_v1_company_external_payrollsop", + "GetV1CompanyFinishOnboardingRequest": ".get_v1_company_finish_onboardingop", + "GetV1CompanyFinishOnboardingRequestTypedDict": ".get_v1_company_finish_onboardingop", + "GetV1CompanyFormPdfRequest": ".get_v1_company_form_pdfop", + "GetV1CompanyFormPdfRequestTypedDict": ".get_v1_company_form_pdfop", + "GetV1CompanyFormRequest": ".get_v1_company_formop", + "GetV1CompanyFormRequestTypedDict": ".get_v1_company_formop", + "GetV1CompanyFormsRequest": ".get_v1_company_formsop", + "GetV1CompanyFormsRequestTypedDict": ".get_v1_company_formsop", + "GetV1CompanyIndustryRequest": ".get_v1_company_industryop", + "GetV1CompanyIndustryRequestTypedDict": ".get_v1_company_industryop", + "GetV1CompanyOnboardingStatusRequest": ".get_v1_company_onboarding_statusop", + "GetV1CompanyOnboardingStatusRequestTypedDict": ".get_v1_company_onboarding_statusop", + "GetV1CompanyPaymentConfigsRequest": ".get_v1_company_payment_configsop", + "GetV1CompanyPaymentConfigsRequestTypedDict": ".get_v1_company_payment_configsop", + "GetV1CompensationsCompensationIDRequest": ".get_v1_compensations_compensation_idop", + "GetV1CompensationsCompensationIDRequestTypedDict": ".get_v1_compensations_compensation_idop", + "GetV1ContractorDocumentPdfRequest": ".get_v1_contractor_document_pdfop", + "GetV1ContractorDocumentPdfRequestTypedDict": ".get_v1_contractor_document_pdfop", + "GetV1ContractorDocumentRequest": ".get_v1_contractor_documentop", + "GetV1ContractorDocumentRequestTypedDict": ".get_v1_contractor_documentop", + "GetV1ContractorDocumentsRequest": ".get_v1_contractor_documentsop", + "GetV1ContractorDocumentsRequestTypedDict": ".get_v1_contractor_documentsop", + "GetV1ContractorFormPdfRequest": ".get_v1_contractor_form_pdfop", + "GetV1ContractorFormPdfRequestTypedDict": ".get_v1_contractor_form_pdfop", + "GetV1ContractorFormRequest": ".get_v1_contractor_formop", + "GetV1ContractorFormRequestTypedDict": ".get_v1_contractor_formop", + "GetV1ContractorFormsRequest": ".get_v1_contractor_formsop", + "GetV1ContractorFormsRequestTypedDict": ".get_v1_contractor_formsop", + "GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion": ".get_v1_contractor_payment_groups_contractor_payment_group_idop", + "GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest": ".get_v1_contractor_payment_groups_contractor_payment_group_idop", + "GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict": ".get_v1_contractor_payment_groups_contractor_payment_group_idop", + "GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion": ".get_v1_contractor_payment_groups_id_partner_disbursementsop", + "GetV1ContractorPaymentGroupsIDPartnerDisbursementsRequest": ".get_v1_contractor_payment_groups_id_partner_disbursementsop", + "GetV1ContractorPaymentGroupsIDPartnerDisbursementsRequestTypedDict": ".get_v1_contractor_payment_groups_id_partner_disbursementsop", + "GetV1ContractorPaymentsContractorPaymentUUIDFundRequest": ".get_v1_contractor_payments_contractor_payment_uuid_fundop", + "GetV1ContractorPaymentsContractorPaymentUUIDFundRequestTypedDict": ".get_v1_contractor_payments_contractor_payment_uuid_fundop", + "GetV1ContractorPaymentsContractorPaymentUUIDReceiptRequest": ".get_v1_contractor_payments_contractor_payment_uuid_receiptop", + "GetV1ContractorPaymentsContractorPaymentUUIDReceiptRequestTypedDict": ".get_v1_contractor_payments_contractor_payment_uuid_receiptop", + "GetV1ContractorsContractorUUIDAddressRequest": ".get_v1_contractors_contractor_uuid_addressop", + "GetV1ContractorsContractorUUIDAddressRequestTypedDict": ".get_v1_contractors_contractor_uuid_addressop", + "GetV1ContractorsContractorUUIDBankAccountsRequest": ".get_v1_contractors_contractor_uuid_bank_accountsop", + "GetV1ContractorsContractorUUIDBankAccountsRequestTypedDict": ".get_v1_contractors_contractor_uuid_bank_accountsop", + "GetV1ContractorsContractorUUIDOnboardingStatusRequest": ".get_v1_contractors_contractor_uuid_onboarding_statusop", + "GetV1ContractorsContractorUUIDOnboardingStatusRequestTypedDict": ".get_v1_contractors_contractor_uuid_onboarding_statusop", + "GetV1ContractorsContractorUUIDPaymentMethodRequest": ".get_v1_contractors_contractor_uuid_payment_methodop", + "GetV1ContractorsContractorUUIDPaymentMethodRequestTypedDict": ".get_v1_contractors_contractor_uuid_payment_methodop", + "GetV1ContractorsContractorUUIDRequest": ".get_v1_contractors_contractor_uuidop", + "GetV1ContractorsContractorUUIDRequestTypedDict": ".get_v1_contractors_contractor_uuidop", + "GetV1EmployeeBenefitsEmployeeBenefitIDRequest": ".get_v1_employee_benefits_employee_benefit_idop", + "GetV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict": ".get_v1_employee_benefits_employee_benefit_idop", + "GetV1EmployeeFormPdfRequest": ".get_v1_employee_form_pdfop", + "GetV1EmployeeFormPdfRequestTypedDict": ".get_v1_employee_form_pdfop", + "GetV1EmployeeFormRequest": ".get_v1_employee_formop", + "GetV1EmployeeFormRequestTypedDict": ".get_v1_employee_formop", + "GetV1EmployeeFormsRequest": ".get_v1_employee_formsop", + "GetV1EmployeeFormsRequestTypedDict": ".get_v1_employee_formsop", + "GetV1EmployeesEmployeeIDBankAccountsRequest": ".get_v1_employees_employee_id_bank_accountsop", + "GetV1EmployeesEmployeeIDBankAccountsRequestTypedDict": ".get_v1_employees_employee_id_bank_accountsop", + "GetV1EmployeesEmployeeIDCustomFieldsRequest": ".get_v1_employees_employee_id_custom_fieldsop", + "GetV1EmployeesEmployeeIDCustomFieldsRequestTypedDict": ".get_v1_employees_employee_id_custom_fieldsop", + "GetV1EmployeesEmployeeIDCustomFieldsResponseBody": ".get_v1_employees_employee_id_custom_fieldsop", + "GetV1EmployeesEmployeeIDCustomFieldsResponseBodyTypedDict": ".get_v1_employees_employee_id_custom_fieldsop", + "GetV1EmployeesEmployeeIDEmployeeBenefitsRequest": ".get_v1_employees_employee_id_employee_benefitsop", + "GetV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict": ".get_v1_employees_employee_id_employee_benefitsop", + "GetV1EmployeesEmployeeIDEmploymentHistoryHeaderXGustoAPIVersion": ".get_v1_employees_employee_id_employment_historyop", + "GetV1EmployeesEmployeeIDEmploymentHistoryRequest": ".get_v1_employees_employee_id_employment_historyop", + "GetV1EmployeesEmployeeIDEmploymentHistoryRequestTypedDict": ".get_v1_employees_employee_id_employment_historyop", + "GetV1EmployeesEmployeeIDFederalTaxesRequest": ".get_v1_employees_employee_id_federal_taxesop", + "GetV1EmployeesEmployeeIDFederalTaxesRequestTypedDict": ".get_v1_employees_employee_id_federal_taxesop", + "GetV1EmployeesEmployeeIDGarnishmentsRequest": ".get_v1_employees_employee_id_garnishmentsop", + "GetV1EmployeesEmployeeIDGarnishmentsRequestTypedDict": ".get_v1_employees_employee_id_garnishmentsop", + "GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion": ".get_v1_employees_employee_id_home_addressesop", + "GetV1EmployeesEmployeeIDHomeAddressesRequest": ".get_v1_employees_employee_id_home_addressesop", + "GetV1EmployeesEmployeeIDHomeAddressesRequestTypedDict": ".get_v1_employees_employee_id_home_addressesop", + "GetV1EmployeesEmployeeIDI9AuthorizationDocumentOptionsRequest": ".get_v1_employees_employee_id_i9_authorization_document_optionsop", + "GetV1EmployeesEmployeeIDI9AuthorizationDocumentOptionsRequestTypedDict": ".get_v1_employees_employee_id_i9_authorization_document_optionsop", + "GetV1EmployeesEmployeeIDI9AuthorizationDocumentsRequest": ".get_v1_employees_employee_id_i9_authorization_documentsop", + "GetV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestTypedDict": ".get_v1_employees_employee_id_i9_authorization_documentsop", + "GetV1EmployeesEmployeeIDI9AuthorizationRequest": ".get_v1_employees_employee_id_i9_authorizationop", + "GetV1EmployeesEmployeeIDI9AuthorizationRequestTypedDict": ".get_v1_employees_employee_id_i9_authorizationop", + "GetV1EmployeesEmployeeIDJobsQueryParamInclude": ".get_v1_employees_employee_id_jobsop", + "GetV1EmployeesEmployeeIDJobsRequest": ".get_v1_employees_employee_id_jobsop", + "GetV1EmployeesEmployeeIDJobsRequestTypedDict": ".get_v1_employees_employee_id_jobsop", + "GetV1EmployeesEmployeeIDOnboardingStatusHeaderXGustoAPIVersion": ".get_v1_employees_employee_id_onboarding_statusop", + "GetV1EmployeesEmployeeIDOnboardingStatusRequest": ".get_v1_employees_employee_id_onboarding_statusop", + "GetV1EmployeesEmployeeIDOnboardingStatusRequestTypedDict": ".get_v1_employees_employee_id_onboarding_statusop", + "GetV1EmployeesEmployeeIDPaymentMethodRequest": ".get_v1_employees_employee_id_payment_methodop", + "GetV1EmployeesEmployeeIDPaymentMethodRequestTypedDict": ".get_v1_employees_employee_id_payment_methodop", + "GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion": ".get_v1_employees_employee_id_recurring_reimbursementsop", + "GetV1EmployeesEmployeeIDRecurringReimbursementsRequest": ".get_v1_employees_employee_id_recurring_reimbursementsop", + "GetV1EmployeesEmployeeIDRecurringReimbursementsRequestTypedDict": ".get_v1_employees_employee_id_recurring_reimbursementsop", + "GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBody": ".get_v1_employees_employee_id_recurring_reimbursementsop", + "GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBodyTypedDict": ".get_v1_employees_employee_id_recurring_reimbursementsop", + "GetV1EmployeesEmployeeIDRehireRequest": ".get_v1_employees_employee_id_rehireop", + "GetV1EmployeesEmployeeIDRehireRequestTypedDict": ".get_v1_employees_employee_id_rehireop", + "GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion": ".get_v1_employees_employee_id_state_taxesop", + "GetV1EmployeesEmployeeIDStateTaxesRequest": ".get_v1_employees_employee_id_state_taxesop", + "GetV1EmployeesEmployeeIDStateTaxesRequestTypedDict": ".get_v1_employees_employee_id_state_taxesop", + "GetV1EmployeesEmployeeIDTerminationsRequest": ".get_v1_employees_employee_id_terminationsop", + "GetV1EmployeesEmployeeIDTerminationsRequestTypedDict": ".get_v1_employees_employee_id_terminationsop", + "GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion": ".get_v1_employees_employee_id_work_addressesop", + "GetV1EmployeesEmployeeIDWorkAddressesRequest": ".get_v1_employees_employee_id_work_addressesop", + "GetV1EmployeesEmployeeIDWorkAddressesRequestTypedDict": ".get_v1_employees_employee_id_work_addressesop", + "GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion": ".get_v1_employees_employee_uuid_pay_stubsop", + "GetV1EmployeesEmployeeUUIDPayStubsRequest": ".get_v1_employees_employee_uuid_pay_stubsop", + "GetV1EmployeesEmployeeUUIDPayStubsRequestTypedDict": ".get_v1_employees_employee_uuid_pay_stubsop", + "GetV1EmployeesHeaderXGustoAPIVersion": ".get_v1_employeesop", + "GetV1EmployeesRequest": ".get_v1_employeesop", + "GetV1EmployeesRequestTypedDict": ".get_v1_employeesop", + "QueryParamInclude": ".get_v1_employeesop", + "GetV1ExternalPayrollCalculateTaxesRequest": ".get_v1_external_payroll_calculate_taxesop", + "GetV1ExternalPayrollCalculateTaxesRequestTypedDict": ".get_v1_external_payroll_calculate_taxesop", + "GetV1ExternalPayrollRequest": ".get_v1_external_payrollop", + "GetV1ExternalPayrollRequestTypedDict": ".get_v1_external_payrollop", + "GetV1GarnishmentsChildSupportRequest": ".get_v1_garnishments_child_supportop", + "GetV1GarnishmentsChildSupportRequestTypedDict": ".get_v1_garnishments_child_supportop", + "GetV1GarnishmentsGarnishmentIDRequest": ".get_v1_garnishments_garnishment_idop", + "GetV1GarnishmentsGarnishmentIDRequestTypedDict": ".get_v1_garnishments_garnishment_idop", + "GetV1GeneratedDocumentsDocumentTypeRequestUUIDRequest": ".get_v1_generated_documents_document_type_request_uuidop", + "GetV1GeneratedDocumentsDocumentTypeRequestUUIDRequestTypedDict": ".get_v1_generated_documents_document_type_request_uuidop", + "GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion": ".get_v1_home_addresses_home_address_uuidop", + "GetV1HomeAddressesHomeAddressUUIDRequest": ".get_v1_home_addresses_home_address_uuidop", + "GetV1HomeAddressesHomeAddressUUIDRequestTypedDict": ".get_v1_home_addresses_home_address_uuidop", + "GetV1JobsJobIDCompensationsQueryParamInclude": ".get_v1_jobs_job_id_compensationsop", + "GetV1JobsJobIDCompensationsRequest": ".get_v1_jobs_job_id_compensationsop", + "GetV1JobsJobIDCompensationsRequestTypedDict": ".get_v1_jobs_job_id_compensationsop", + "GetV1JobsJobIDQueryParamInclude": ".get_v1_jobs_job_idop", + "GetV1JobsJobIDRequest": ".get_v1_jobs_job_idop", + "GetV1JobsJobIDRequestTypedDict": ".get_v1_jobs_job_idop", + "GetV1LocationsLocationIDRequest": ".get_v1_locations_location_idop", + "GetV1LocationsLocationIDRequestTypedDict": ".get_v1_locations_location_idop", + "XGustoAPIVersion": ".get_v1_locations_location_idop", + "GetV1LocationsLocationUUIDMinimumWagesHeaderXGustoAPIVersion": ".get_v1_locations_location_uuid_minimum_wagesop", + "GetV1LocationsLocationUUIDMinimumWagesRequest": ".get_v1_locations_location_uuid_minimum_wagesop", + "GetV1LocationsLocationUUIDMinimumWagesRequestTypedDict": ".get_v1_locations_location_uuid_minimum_wagesop", + "GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion": ".get_v1_payment_receipts_payrolls_payroll_uuidop", + "GetV1PaymentReceiptsPayrollsPayrollUUIDRequest": ".get_v1_payment_receipts_payrolls_payroll_uuidop", + "GetV1PaymentReceiptsPayrollsPayrollUUIDRequestTypedDict": ".get_v1_payment_receipts_payrolls_payroll_uuidop", + "GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion": ".get_v1_payrolls_payroll_uuid_employees_employee_uuid_pay_stubop", + "GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequest": ".get_v1_payrolls_payroll_uuid_employees_employee_uuid_pay_stubop", + "GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequestTypedDict": ".get_v1_payrolls_payroll_uuid_employees_employee_uuid_pay_stubop", + "GetV1RecurringReimbursementsHeaderXGustoAPIVersion": ".get_v1_recurring_reimbursementsop", + "GetV1RecurringReimbursementsRequest": ".get_v1_recurring_reimbursementsop", + "GetV1RecurringReimbursementsRequestTypedDict": ".get_v1_recurring_reimbursementsop", + "GetV1RecurringReimbursementsResponseBody": ".get_v1_recurring_reimbursementsop", + "GetV1RecurringReimbursementsResponseBodyTypedDict": ".get_v1_recurring_reimbursementsop", + "GetV1SalaryEstimatesIDHeaderXGustoAPIVersion": ".get_v1_salary_estimates_idop", + "GetV1SalaryEstimatesIDRequest": ".get_v1_salary_estimates_idop", + "GetV1SalaryEstimatesIDRequestTypedDict": ".get_v1_salary_estimates_idop", + "GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion": ".get_v1_salary_estimates_occupationsop", + "GetV1SalaryEstimatesOccupationsRequest": ".get_v1_salary_estimates_occupationsop", + "GetV1SalaryEstimatesOccupationsRequestTypedDict": ".get_v1_salary_estimates_occupationsop", + "GetV1SalaryEstimatesOccupationsSecurity": ".get_v1_salary_estimates_occupationsop", + "GetV1SalaryEstimatesOccupationsSecurityTypedDict": ".get_v1_salary_estimates_occupationsop", + "GetV1TaxLiabilitiesRequest": ".get_v1_tax_liabilitiesop", + "GetV1TaxLiabilitiesRequestTypedDict": ".get_v1_tax_liabilitiesop", + "GetV1TokenInfoRequest": ".get_v1_token_infoop", + "GetV1TokenInfoRequestTypedDict": ".get_v1_token_infoop", + "GetV1TokenInfoResponseBody": ".get_v1_token_infoop", + "GetV1TokenInfoResponseBodyTypedDict": ".get_v1_token_infoop", + "GetV1TokenInfoType": ".get_v1_token_infoop", + "Resource": ".get_v1_token_infoop", + "ResourceOwner": ".get_v1_token_infoop", + "ResourceOwnerTypedDict": ".get_v1_token_infoop", + "ResourceTypedDict": ".get_v1_token_infoop", + "GetV1WebhookSubscriptionUUIDRequest": ".get_v1_webhook_subscription_uuidop", + "GetV1WebhookSubscriptionUUIDRequestTypedDict": ".get_v1_webhook_subscription_uuidop", + "GetV1WebhookSubscriptionUUIDSecurity": ".get_v1_webhook_subscription_uuidop", + "GetV1WebhookSubscriptionUUIDSecurityTypedDict": ".get_v1_webhook_subscription_uuidop", + "GetV1WebhookSubscriptionVerificationTokenUUIDRequest": ".get_v1_webhook_subscription_verification_token_uuidop", + "GetV1WebhookSubscriptionVerificationTokenUUIDRequestTypedDict": ".get_v1_webhook_subscription_verification_token_uuidop", + "GetV1WebhookSubscriptionVerificationTokenUUIDSecurity": ".get_v1_webhook_subscription_verification_token_uuidop", + "GetV1WebhookSubscriptionVerificationTokenUUIDSecurityTypedDict": ".get_v1_webhook_subscription_verification_token_uuidop", + "GetV1WebhookSubscriptionsRequest": ".get_v1_webhook_subscriptionsop", + "GetV1WebhookSubscriptionsRequestTypedDict": ".get_v1_webhook_subscriptionsop", + "GetV1WebhookSubscriptionsSecurity": ".get_v1_webhook_subscriptionsop", + "GetV1WebhookSubscriptionsSecurityTypedDict": ".get_v1_webhook_subscriptionsop", + "GetV1WebhooksHealthCheckHeaderXGustoAPIVersion": ".get_v1_webhooks_health_checkop", + "GetV1WebhooksHealthCheckRequest": ".get_v1_webhooks_health_checkop", + "GetV1WebhooksHealthCheckRequestTypedDict": ".get_v1_webhooks_health_checkop", + "GetV1WebhooksHealthCheckSecurity": ".get_v1_webhooks_health_checkop", + "GetV1WebhooksHealthCheckSecurityTypedDict": ".get_v1_webhooks_health_checkop", + "GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion": ".get_v1_work_addresses_work_address_uuidop", + "GetV1WorkAddressesWorkAddressUUIDRequest": ".get_v1_work_addresses_work_address_uuidop", + "GetV1WorkAddressesWorkAddressUUIDRequestTypedDict": ".get_v1_work_addresses_work_address_uuidop", + "GetVersionEmployeesTimeOffActivitiesRequest": ".get_version_employees_time_off_activitiesop", + "GetVersionEmployeesTimeOffActivitiesRequestTypedDict": ".get_version_employees_time_off_activitiesop", + "GetWireInRequestsWireInRequestUUIDRequest": ".get_wire_in_requests_wire_in_request_uuidop", + "GetWireInRequestsWireInRequestUUIDRequestTypedDict": ".get_wire_in_requests_wire_in_request_uuidop", + "GrossUpPay": ".gross_up_pay", + "GrossUpPayTypedDict": ".gross_up_pay", + "EmployeeStateTaxes": ".historical_employee_body", + "EmployeeStateTaxesTypedDict": ".historical_employee_body", + "HistoricalEmployeeBody": ".historical_employee_body", + "HistoricalEmployeeBodyHomeAddress": ".historical_employee_body", + "HistoricalEmployeeBodyHomeAddressTypedDict": ".historical_employee_body", + "HistoricalEmployeeBodyJob": ".historical_employee_body", + "HistoricalEmployeeBodyJobTypedDict": ".historical_employee_body", + "HistoricalEmployeeBodyTermination": ".historical_employee_body", + "HistoricalEmployeeBodyTerminationTypedDict": ".historical_employee_body", + "HistoricalEmployeeBodyTypedDict": ".historical_employee_body", + "WorkAddress": ".historical_employee_body", + "WorkAddressTypedDict": ".historical_employee_body", + "ColumbusDay": ".holiday_pay_policy", + "ColumbusDayTypedDict": ".holiday_pay_policy", + "FederalHolidays": ".holiday_pay_policy", + "FederalHolidaysTypedDict": ".holiday_pay_policy", + "HolidayPayPolicy": ".holiday_pay_policy", + "HolidayPayPolicyEmployees": ".holiday_pay_policy", + "HolidayPayPolicyEmployeesTypedDict": ".holiday_pay_policy", + "HolidayPayPolicyTypedDict": ".holiday_pay_policy", + "IndependenceDay": ".holiday_pay_policy", + "IndependenceDayTypedDict": ".holiday_pay_policy", + "Juneteenth": ".holiday_pay_policy", + "JuneteenthTypedDict": ".holiday_pay_policy", + "LaborDay": ".holiday_pay_policy", + "LaborDayTypedDict": ".holiday_pay_policy", + "MemorialDay": ".holiday_pay_policy", + "MemorialDayTypedDict": ".holiday_pay_policy", + "MlkDay": ".holiday_pay_policy", + "MlkDayTypedDict": ".holiday_pay_policy", + "NewYearsDay": ".holiday_pay_policy", + "NewYearsDayTypedDict": ".holiday_pay_policy", + "PresidentsDay": ".holiday_pay_policy", + "PresidentsDayTypedDict": ".holiday_pay_policy", + "Thanksgiving": ".holiday_pay_policy", + "ThanksgivingTypedDict": ".holiday_pay_policy", + "VeteransDay": ".holiday_pay_policy", + "VeteransDayTypedDict": ".holiday_pay_policy", + "AuthorizationStatus": ".i9_authorization", + "I9Authorization": ".i9_authorization", + "I9AuthorizationDocumentType": ".i9_authorization", + "I9AuthorizationTypedDict": ".i9_authorization", + "I9AuthorizationDocument": ".i9_authorization_document", + "I9AuthorizationDocumentTypedDict": ".i9_authorization_document", + "I9AuthorizationDocumentOption": ".i9_authorization_document_option", + "I9AuthorizationDocumentOptionTypedDict": ".i9_authorization_document_option", + "Section": ".i9_authorization_document_option", + "Industry": ".industry", + "IndustryTypedDict": ".industry", + "InformationRequest": ".information_request", + "InformationRequestStatus": ".information_request", + "InformationRequestType": ".information_request", + "InformationRequestTypedDict": ".information_request", + "ActiveCompanies": ".invoice_data", + "ActiveCompaniesTypedDict": ".invoice_data", + "InvoiceData": ".invoice_data", + "InvoiceDataTypedDict": ".invoice_data", + "Job": ".job", + "JobTypedDict": ".job", + "Location": ".location", + "LocationTypedDict": ".location", + "MetadataWithMultipleEntities": ".metadata_with_multiple_entities", + "MetadataWithMultipleEntitiesTypedDict": ".metadata_with_multiple_entities", + "MetadataWithOneEntity": ".metadata_with_one_entity", + "MetadataWithOneEntityTypedDict": ".metadata_with_one_entity", + "MinimumWage": ".minimum_wage", + "MinimumWageTypedDict": ".minimum_wage", + "NoResponseError": ".no_response_error", + "NotFoundErrorObject": ".not_found_error_object", + "NotFoundErrorObjectData": ".not_found_error_object", + "Notification": ".notification", + "NotificationEntityType": ".notification", + "NotificationStatus": ".notification", + "NotificationTypedDict": ".notification", + "Resources": ".notification", + "ResourcesTypedDict": ".notification", + "OffCycleReasonType": ".off_cycle_reason_type", + "PaidHolidays": ".paid_holidays", + "PaidHolidaysTypedDict": ".paid_holidays", + "Schema": ".paid_holidays", + "SchemaTypedDict": ".paid_holidays", + "Name": ".paid_time_off", + "PaidTimeOff": ".paid_time_off", + "PaidTimeOffTypedDict": ".paid_time_off", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements": ".patch_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursementsTypedDict": ".patch_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion": ".patch_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentMethod": ".patch_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentStatus": ".patch_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest": ".patch_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBody": ".patch_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBodyTypedDict": ".patch_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestTypedDict": ".patch_v1_companies_company_id_payrolls_id_partner_disbursementsop", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements": ".patch_v1_contractor_payment_groups_id_partner_disbursementsop", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursementsTypedDict": ".patch_v1_contractor_payment_groups_id_partner_disbursementsop", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion": ".patch_v1_contractor_payment_groups_id_partner_disbursementsop", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentMethod": ".patch_v1_contractor_payment_groups_id_partner_disbursementsop", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentStatus": ".patch_v1_contractor_payment_groups_id_partner_disbursementsop", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequest": ".patch_v1_contractor_payment_groups_id_partner_disbursementsop", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBody": ".patch_v1_contractor_payment_groups_id_partner_disbursementsop", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBodyTypedDict": ".patch_v1_contractor_payment_groups_id_partner_disbursementsop", + "PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestTypedDict": ".patch_v1_contractor_payment_groups_id_partner_disbursementsop", + "PayPeriod": ".pay_period", + "PayPeriodPayroll": ".pay_period", + "PayPeriodPayrollTypedDict": ".pay_period", + "PayPeriodTypedDict": ".pay_period", + "PayrollType": ".pay_period", + "PayScheduleAssignment": ".pay_schedule_assignment", + "PayScheduleAssignmentTypedDict": ".pay_schedule_assignment", + "Type": ".pay_schedule_assignment", + "DepartmentsModel": ".pay_schedule_assignment_body", + "DepartmentsModelTypedDict": ".pay_schedule_assignment_body", + "EmployeesModel": ".pay_schedule_assignment_body", + "EmployeesModelTypedDict": ".pay_schedule_assignment_body", + "PayScheduleAssignmentBody": ".pay_schedule_assignment_body", + "PayScheduleAssignmentBodyType": ".pay_schedule_assignment_body", + "PayScheduleAssignmentBodyTypedDict": ".pay_schedule_assignment_body", + "PayScheduleAssignmentDepartment": ".pay_schedule_assignment_department", + "PayScheduleAssignmentDepartmentTypedDict": ".pay_schedule_assignment_department", + "PayScheduleAssignmentEmployee": ".pay_schedule_assignment_employee", + "PayScheduleAssignmentEmployeeTypedDict": ".pay_schedule_assignment_employee", + "PayScheduleAssignmentEmployeeChange": ".pay_schedule_assignment_employee_change", + "PayScheduleAssignmentEmployeeChangeTypedDict": ".pay_schedule_assignment_employee_change", + "PayScheduleAssignmentPayPeriod": ".pay_schedule_assignment_pay_period", + "PayScheduleAssignmentPayPeriodTypedDict": ".pay_schedule_assignment_pay_period", + "PayScheduleAssignmentPreview": ".pay_schedule_assignment_preview", + "PayScheduleAssignmentPreviewType": ".pay_schedule_assignment_preview", + "PayScheduleAssignmentPreviewTypedDict": ".pay_schedule_assignment_preview", + "PayScheduleAssignmentTransitionPayPeriod": ".pay_schedule_assignment_transition_pay_period", + "PayScheduleAssignmentTransitionPayPeriodTypedDict": ".pay_schedule_assignment_transition_pay_period", + "PayScheduleCreateUpdate": ".pay_schedule_create_update", + "PayScheduleCreateUpdateTypedDict": ".pay_schedule_create_update", + "PayScheduleFrequency": ".pay_schedule_frequency", + "PayScheduleFrequencyCreateUpdate": ".pay_schedule_frequency_create_update", + "PayScheduleList": ".pay_schedule_list", + "PayScheduleListTypedDict": ".pay_schedule_list", + "PayScheduleObject": ".pay_schedule_object", + "PayScheduleObjectTypedDict": ".pay_schedule_object", + "BlockerType": ".payment_configs", + "EarnedFastAchBlockers": ".payment_configs", + "EarnedFastAchBlockersTypedDict": ".payment_configs", + "PaymentConfigs": ".payment_configs", + "PaymentConfigsTypedDict": ".payment_configs", + "PaymentMethodBankAccount": ".payment_method_bank_account", + "PaymentMethodBankAccountTypedDict": ".payment_method_bank_account", + "PaymentSpeedParam": ".payment_speed_param", + "PaymentSpeedRequiredBody": ".payment_speed_required_body", + "PaymentSpeedRequiredBodyTypedDict": ".payment_speed_required_body", + "Payroll": ".payroll", + "PayrollTypedDict": ".payroll", + "PayrollBlocker": ".payroll_blocker", + "PayrollBlockerTypedDict": ".payroll_blocker", + "Errors": ".payroll_blockers_error", + "ErrorsTypedDict": ".payroll_blockers_error", + "PayrollBlockersError": ".payroll_blockers_error", + "PayrollBlockersErrorData": ".payroll_blockers_error", + "PayrollBlockersErrorMetadata": ".payroll_blockers_error", + "PayrollBlockersErrorMetadataTypedDict": ".payroll_blockers_error", + "EmployeeCheckNumberMapping": ".payroll_check", + "EmployeeCheckNumberMappingTypedDict": ".payroll_check", + "PayrollCheck": ".payroll_check", + "PayrollCheckTypedDict": ".payroll_check", + "PayrollCompanyTaxesType": ".payroll_company_taxes_type", + "PayrollCompanyTaxesTypeTypedDict": ".payroll_company_taxes_type", + "PayrollCreditBlockersType": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeMetadata": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeMetadataTypedDict": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeStatus": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeTypedDict": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeUnblockOptions": ".payroll_credit_blockers_type", + "PayrollCreditBlockersTypeUnblockOptionsTypedDict": ".payroll_credit_blockers_type", + "AmountType": ".payroll_employee_compensations_type", + "Deductions": ".payroll_employee_compensations_type", + "DeductionsTypedDict": ".payroll_employee_compensations_type", + "FixedCompensations": ".payroll_employee_compensations_type", + "FixedCompensationsTypedDict": ".payroll_employee_compensations_type", + "HourlyCompensations": ".payroll_employee_compensations_type", + "HourlyCompensationsTypedDict": ".payroll_employee_compensations_type", + "PayrollEmployeeCompensationsType": ".payroll_employee_compensations_type", + "PayrollEmployeeCompensationsTypePaidTimeOff": ".payroll_employee_compensations_type", + "PayrollEmployeeCompensationsTypePaidTimeOffTypedDict": ".payroll_employee_compensations_type", + "PayrollEmployeeCompensationsTypePaymentMethod": ".payroll_employee_compensations_type", + "PayrollEmployeeCompensationsTypeTypedDict": ".payroll_employee_compensations_type", + "ReimbursementsModel": ".payroll_employee_compensations_type", + "ReimbursementsModelTypedDict": ".payroll_employee_compensations_type", + "PayrollFixedCompensationTypesType": ".payroll_fixed_compensation_types_type", + "PayrollFixedCompensationTypesTypeTypedDict": ".payroll_fixed_compensation_types_type", + "PayrollPartnerDisbursements": ".payroll_partner_disbursements", + "PayrollPartnerDisbursementsDisbursements": ".payroll_partner_disbursements", + "PayrollPartnerDisbursementsDisbursementsTypedDict": ".payroll_partner_disbursements", + "PayrollPartnerDisbursementsPaymentMethod": ".payroll_partner_disbursements", + "PayrollPartnerDisbursementsPaymentStatus": ".payroll_partner_disbursements", + "PayrollPartnerDisbursementsTypedDict": ".payroll_partner_disbursements", + "PayrollPayPeriodType": ".payroll_pay_period_type", + "PayrollPayPeriodTypeTypedDict": ".payroll_pay_period_type", + "PayrollPaymentSpeedChangedType": ".payroll_payment_speed_changed_type", + "PayrollPaymentSpeedChangedTypeTypedDict": ".payroll_payment_speed_changed_type", + "PayrollPayrollStatusMetaType": ".payroll_payroll_status_meta_type", + "PayrollPayrollStatusMetaTypeTypedDict": ".payroll_payroll_status_meta_type", + "PayrollPrepareSortBy": ".payroll_prepare_sort_by", + "PayrollPrepared": ".payroll_prepared", + "PayrollPreparedTypedDict": ".payroll_prepared", + "PayrollProcessingRequest": ".payroll_processing_request", + "PayrollProcessingRequestStatus": ".payroll_processing_request", + "PayrollProcessingRequestTypedDict": ".payroll_processing_request", + "Licensee": ".payroll_receipt", + "LicenseeTypedDict": ".payroll_receipt", + "PayrollReceipt": ".payroll_receipt", + "PayrollReceiptEmployeeCompensations": ".payroll_receipt", + "PayrollReceiptEmployeeCompensationsTypedDict": ".payroll_receipt", + "PayrollReceiptPaymentMethod": ".payroll_receipt", + "PayrollReceiptTypedDict": ".payroll_receipt", + "Taxes": ".payroll_receipt", + "TaxesTypedDict": ".payroll_receipt", + "Totals": ".payroll_receipt", + "TotalsTypedDict": ".payroll_receipt", + "PayrollReversal": ".payroll_reversal", + "PayrollReversalTypedDict": ".payroll_reversal", + "EmployeeCompensations": ".payroll_show", + "EmployeeCompensationsTypedDict": ".payroll_show", + "PayrollShow": ".payroll_show", + "PayrollShowAmountType": ".payroll_show", + "PayrollShowBenefits": ".payroll_show", + "PayrollShowBenefitsTypedDict": ".payroll_show", + "PayrollShowDeductions": ".payroll_show", + "PayrollShowDeductionsTypedDict": ".payroll_show", + "PayrollShowFixedCompensations": ".payroll_show", + "PayrollShowFixedCompensationsTypedDict": ".payroll_show", + "PayrollShowHourlyCompensations": ".payroll_show", + "PayrollShowHourlyCompensationsTypedDict": ".payroll_show", + "PayrollShowPaidTimeOff": ".payroll_show", + "PayrollShowPaidTimeOffTypedDict": ".payroll_show", + "PayrollShowPaymentMethod": ".payroll_show", + "PayrollShowReimbursements": ".payroll_show", + "PayrollShowReimbursementsTypedDict": ".payroll_show", + "PayrollShowTaxes": ".payroll_show", + "PayrollShowTaxesTypedDict": ".payroll_show", + "PayrollShowTypedDict": ".payroll_show", + "PayrollSubmissionBlockersType": ".payroll_submission_blockers_type", + "PayrollSubmissionBlockersTypeMetadata": ".payroll_submission_blockers_type", + "PayrollSubmissionBlockersTypeMetadataTypedDict": ".payroll_submission_blockers_type", + "PayrollSubmissionBlockersTypeStatus": ".payroll_submission_blockers_type", + "PayrollSubmissionBlockersTypeTypedDict": ".payroll_submission_blockers_type", + "UnblockOptions": ".payroll_submission_blockers_type", + "UnblockOptionsTypedDict": ".payroll_submission_blockers_type", + "PayrollTaxesType": ".payroll_taxes_type", + "PayrollTaxesTypeTypedDict": ".payroll_taxes_type", + "PayrollTotalsType": ".payroll_totals_type", + "PayrollTotalsTypeTypedDict": ".payroll_totals_type", + "PayrollUpdate": ".payroll_update", + "PayrollUpdateAmountType": ".payroll_update", + "PayrollUpdateDeductions": ".payroll_update", + "PayrollUpdateDeductionsTypedDict": ".payroll_update", + "PayrollUpdateEmployeeCompensations": ".payroll_update", + "PayrollUpdateEmployeeCompensationsTypedDict": ".payroll_update", + "PayrollUpdateFixedCompensations": ".payroll_update", + "PayrollUpdateFixedCompensationsTypedDict": ".payroll_update", + "PayrollUpdateHourlyCompensations": ".payroll_update", + "PayrollUpdateHourlyCompensationsTypedDict": ".payroll_update", + "PayrollUpdatePaidTimeOff": ".payroll_update", + "PayrollUpdatePaidTimeOffTypedDict": ".payroll_update", + "PayrollUpdatePaymentMethod": ".payroll_update", + "PayrollUpdateTypedDict": ".payroll_update", + "WithholdingPayPeriod": ".payroll_update", + "PayrollWithholdingPayPeriodType": ".payroll_withholding_pay_period_type", + "ChristmasDay": ".post_companies_company_uuid_holiday_pay_policyop", + "ChristmasDayTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyColumbusDay": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyColumbusDayTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyFederalHolidays": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyFederalHolidaysTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyIndependenceDay": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyIndependenceDayTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyJuneteenth": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyJuneteenthTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyLaborDay": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyLaborDayTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyMemorialDay": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyMemorialDayTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyMlkDay": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyMlkDayTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyNewYearsDay": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyNewYearsDayTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyPresidentsDay": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyPresidentsDayTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyRequest": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyRequestBody": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyRequestBodyTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyThanksgiving": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyThanksgivingTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyVeteransDay": ".post_companies_company_uuid_holiday_pay_policyop", + "PostCompaniesCompanyUUIDHolidayPayPolicyVeteransDayTypedDict": ".post_companies_company_uuid_holiday_pay_policyop", + "Columns": ".post_companies_company_uuid_reportsop", + "EmploymentType": ".post_companies_company_uuid_reportsop", + "FileType": ".post_companies_company_uuid_reportsop", + "Groupings": ".post_companies_company_uuid_reportsop", + "PostCompaniesCompanyUUIDReportsEmploymentStatus": ".post_companies_company_uuid_reportsop", + "PostCompaniesCompanyUUIDReportsPaymentMethod": ".post_companies_company_uuid_reportsop", + "PostCompaniesCompanyUUIDReportsRequest": ".post_companies_company_uuid_reportsop", + "PostCompaniesCompanyUUIDReportsRequestBody": ".post_companies_company_uuid_reportsop", + "PostCompaniesCompanyUUIDReportsRequestBodyTypedDict": ".post_companies_company_uuid_reportsop", + "PostCompaniesCompanyUUIDReportsRequestTypedDict": ".post_companies_company_uuid_reportsop", + "LeavingFor": ".post_companies_company_uuid_suspensionsop", + "PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion": ".post_companies_company_uuid_suspensionsop", + "PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod": ".post_companies_company_uuid_suspensionsop", + "PostCompaniesCompanyUUIDSuspensionsRequest": ".post_companies_company_uuid_suspensionsop", + "PostCompaniesCompanyUUIDSuspensionsRequestBody": ".post_companies_company_uuid_suspensionsop", + "PostCompaniesCompanyUUIDSuspensionsRequestBodyTypedDict": ".post_companies_company_uuid_suspensionsop", + "PostCompaniesCompanyUUIDSuspensionsRequestTypedDict": ".post_companies_company_uuid_suspensionsop", + "Reason": ".post_companies_company_uuid_suspensionsop", + "PostCompaniesCompanyUUIDTimeOffPoliciesAccrualMethod": ".post_companies_company_uuid_time_off_policiesop", + "PostCompaniesCompanyUUIDTimeOffPoliciesRequest": ".post_companies_company_uuid_time_off_policiesop", + "PostCompaniesCompanyUUIDTimeOffPoliciesRequestBody": ".post_companies_company_uuid_time_off_policiesop", + "PostCompaniesCompanyUUIDTimeOffPoliciesRequestBodyTypedDict": ".post_companies_company_uuid_time_off_policiesop", + "PostCompaniesCompanyUUIDTimeOffPoliciesRequestTypedDict": ".post_companies_company_uuid_time_off_policiesop", + "PostCompaniesPayrollSkipCompanyUUIDPayrollType": ".post_companies_payroll_skip_company_uuidop", + "PostCompaniesPayrollSkipCompanyUUIDRequest": ".post_companies_payroll_skip_company_uuidop", + "PostCompaniesPayrollSkipCompanyUUIDRequestBody": ".post_companies_payroll_skip_company_uuidop", + "PostCompaniesPayrollSkipCompanyUUIDRequestBodyTypedDict": ".post_companies_payroll_skip_company_uuidop", + "PostCompaniesPayrollSkipCompanyUUIDRequestTypedDict": ".post_companies_payroll_skip_company_uuidop", + "PostCompaniesPayrollSkipCompanyUUIDResponseBody": ".post_companies_payroll_skip_company_uuidop", + "PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion": ".post_companies_payroll_skip_company_uuidop", + "PostDepartmentsRequest": ".post_departmentsop", + "PostDepartmentsRequestBody": ".post_departmentsop", + "PostDepartmentsRequestBodyTypedDict": ".post_departmentsop", + "PostDepartmentsRequestTypedDict": ".post_departmentsop", + "PostEmployeeYtdBenefitAmountsFromDifferentCompany": ".post_employee_ytd_benefit_amounts_from_different_company", + "PostEmployeeYtdBenefitAmountsFromDifferentCompanyTypedDict": ".post_employee_ytd_benefit_amounts_from_different_company", + "PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest": ".post_employee_ytd_benefit_amounts_from_different_companyop", + "PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequestTypedDict": ".post_employee_ytd_benefit_amounts_from_different_companyop", + "PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequest": ".post_partner_managed_companies_company_uuid_accept_terms_of_serviceop", + "PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequestBody": ".post_partner_managed_companies_company_uuid_accept_terms_of_serviceop", + "PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequestBodyTypedDict": ".post_partner_managed_companies_company_uuid_accept_terms_of_serviceop", + "PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceRequestTypedDict": ".post_partner_managed_companies_company_uuid_accept_terms_of_serviceop", + "PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceResponseBody": ".post_partner_managed_companies_company_uuid_accept_terms_of_serviceop", + "PostPartnerManagedCompaniesCompanyUUIDAcceptTermsOfServiceResponseBodyTypedDict": ".post_partner_managed_companies_company_uuid_accept_terms_of_serviceop", + "PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequest": ".post_partner_managed_companies_company_uuid_retrieve_terms_of_serviceop", + "PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequestBody": ".post_partner_managed_companies_company_uuid_retrieve_terms_of_serviceop", + "PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequestBodyTypedDict": ".post_partner_managed_companies_company_uuid_retrieve_terms_of_serviceop", + "PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceRequestTypedDict": ".post_partner_managed_companies_company_uuid_retrieve_terms_of_serviceop", + "PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceResponseBody": ".post_partner_managed_companies_company_uuid_retrieve_terms_of_serviceop", + "PostPartnerManagedCompaniesCompanyUUIDRetrieveTermsOfServiceResponseBodyTypedDict": ".post_partner_managed_companies_company_uuid_retrieve_terms_of_serviceop", + "PostPayrollsGrossUpPayrollUUIDRequest": ".post_payrolls_gross_up_payroll_uuidop", + "PostPayrollsGrossUpPayrollUUIDRequestBody": ".post_payrolls_gross_up_payroll_uuidop", + "PostPayrollsGrossUpPayrollUUIDRequestBodyTypedDict": ".post_payrolls_gross_up_payroll_uuidop", + "PostPayrollsGrossUpPayrollUUIDRequestTypedDict": ".post_payrolls_gross_up_payroll_uuidop", + "PostPayrollsGrossUpPayrollUUIDResponseBody": ".post_payrolls_gross_up_payroll_uuidop", + "PostPayrollsGrossUpPayrollUUIDResponseBodyUnion": ".post_payrolls_gross_up_payroll_uuidop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequest": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBodyTypedDict": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostPayrollsPayrollUUIDReportsGeneralLedgerRequestTypedDict": ".post_payrolls_payroll_uuid_reports_general_ledgerop", + "PostV1CompaniesAttachmentCategory": ".post_v1_companies_attachmentop", + "PostV1CompaniesAttachmentDocument": ".post_v1_companies_attachmentop", + "PostV1CompaniesAttachmentDocumentTypedDict": ".post_v1_companies_attachmentop", + "PostV1CompaniesAttachmentRequest": ".post_v1_companies_attachmentop", + "PostV1CompaniesAttachmentRequestBody": ".post_v1_companies_attachmentop", + "PostV1CompaniesAttachmentRequestBodyTypedDict": ".post_v1_companies_attachmentop", + "PostV1CompaniesAttachmentRequestTypedDict": ".post_v1_companies_attachmentop", + "PostV1CompaniesCompanyIDAdminsRequest": ".post_v1_companies_company_id_adminsop", + "PostV1CompaniesCompanyIDAdminsRequestBody": ".post_v1_companies_company_id_adminsop", + "PostV1CompaniesCompanyIDAdminsRequestBodyTypedDict": ".post_v1_companies_company_id_adminsop", + "PostV1CompaniesCompanyIDAdminsRequestTypedDict": ".post_v1_companies_company_id_adminsop", + "PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion": ".post_v1_companies_company_id_bank_accountsop", + "PostV1CompaniesCompanyIDBankAccountsRequest": ".post_v1_companies_company_id_bank_accountsop", + "PostV1CompaniesCompanyIDBankAccountsRequestTypedDict": ".post_v1_companies_company_id_bank_accountsop", + "PostV1CompaniesCompanyIDCompanyBenefitsRequest": ".post_v1_companies_company_id_company_benefitsop", + "PostV1CompaniesCompanyIDCompanyBenefitsRequestBody": ".post_v1_companies_company_id_company_benefitsop", + "PostV1CompaniesCompanyIDCompanyBenefitsRequestBodyTypedDict": ".post_v1_companies_company_id_company_benefitsop", + "PostV1CompaniesCompanyIDCompanyBenefitsRequestTypedDict": ".post_v1_companies_company_id_company_benefitsop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments": ".post_v1_companies_company_id_contractor_payment_groups_previewop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict": ".post_v1_companies_company_id_contractor_payment_groups_previewop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion": ".post_v1_companies_company_id_contractor_payment_groups_previewop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod": ".post_v1_companies_company_id_contractor_payment_groups_previewop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest": ".post_v1_companies_company_id_contractor_payment_groups_previewop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody": ".post_v1_companies_company_id_contractor_payment_groups_previewop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBodyTypedDict": ".post_v1_companies_company_id_contractor_payment_groups_previewop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestTypedDict": ".post_v1_companies_company_id_contractor_payment_groups_previewop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPayments": ".post_v1_companies_company_id_contractor_payment_groupsop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPaymentsTypedDict": ".post_v1_companies_company_id_contractor_payment_groupsop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion": ".post_v1_companies_company_id_contractor_payment_groupsop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsPaymentMethod": ".post_v1_companies_company_id_contractor_payment_groupsop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsRequest": ".post_v1_companies_company_id_contractor_payment_groupsop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody": ".post_v1_companies_company_id_contractor_payment_groupsop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBodyTypedDict": ".post_v1_companies_company_id_contractor_payment_groupsop", + "PostV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict": ".post_v1_companies_company_id_contractor_payment_groupsop", + "PostV1CompaniesCompanyIDContractorPaymentsPaymentMethod": ".post_v1_companies_company_id_contractor_paymentsop", + "PostV1CompaniesCompanyIDContractorPaymentsRequest": ".post_v1_companies_company_id_contractor_paymentsop", + "PostV1CompaniesCompanyIDContractorPaymentsRequestBody": ".post_v1_companies_company_id_contractor_paymentsop", + "PostV1CompaniesCompanyIDContractorPaymentsRequestBodyTypedDict": ".post_v1_companies_company_id_contractor_paymentsop", + "PostV1CompaniesCompanyIDContractorPaymentsRequestTypedDict": ".post_v1_companies_company_id_contractor_paymentsop", + "PostV1CompaniesCompanyIDEarningTypesRequest": ".post_v1_companies_company_id_earning_typesop", + "PostV1CompaniesCompanyIDEarningTypesRequestBody": ".post_v1_companies_company_id_earning_typesop", + "PostV1CompaniesCompanyIDEarningTypesRequestBodyTypedDict": ".post_v1_companies_company_id_earning_typesop", + "PostV1CompaniesCompanyIDEarningTypesRequestTypedDict": ".post_v1_companies_company_id_earning_typesop", + "PostV1CompaniesCompanyIDLocationsRequest": ".post_v1_companies_company_id_locationsop", + "PostV1CompaniesCompanyIDLocationsRequestBody": ".post_v1_companies_company_id_locationsop", + "PostV1CompaniesCompanyIDLocationsRequestBodyTypedDict": ".post_v1_companies_company_id_locationsop", + "PostV1CompaniesCompanyIDLocationsRequestTypedDict": ".post_v1_companies_company_id_locationsop", + "PostV1CompaniesCompanyIDPaySchedulesAssignmentPreviewRequest": ".post_v1_companies_company_id_pay_schedules_assignment_previewop", + "PostV1CompaniesCompanyIDPaySchedulesAssignmentPreviewRequestTypedDict": ".post_v1_companies_company_id_pay_schedules_assignment_previewop", + "PostV1CompaniesCompanyIDPaySchedulesAssignRequest": ".post_v1_companies_company_id_pay_schedules_assignop", + "PostV1CompaniesCompanyIDPaySchedulesAssignRequestTypedDict": ".post_v1_companies_company_id_pay_schedules_assignop", + "Frequency": ".post_v1_companies_company_id_pay_schedulesop", + "PostV1CompaniesCompanyIDPaySchedulesRequest": ".post_v1_companies_company_id_pay_schedulesop", + "PostV1CompaniesCompanyIDPaySchedulesRequestBody": ".post_v1_companies_company_id_pay_schedulesop", + "PostV1CompaniesCompanyIDPaySchedulesRequestBodyTypedDict": ".post_v1_companies_company_id_pay_schedulesop", + "PostV1CompaniesCompanyIDPaySchedulesRequestTypedDict": ".post_v1_companies_company_id_pay_schedulesop", + "OffCycleReason": ".post_v1_companies_company_id_payrollsop", + "PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion": ".post_v1_companies_company_id_payrollsop", + "PostV1CompaniesCompanyIDPayrollsRequest": ".post_v1_companies_company_id_payrollsop", + "PostV1CompaniesCompanyIDPayrollsRequestBody": ".post_v1_companies_company_id_payrollsop", + "PostV1CompaniesCompanyIDPayrollsRequestBodyTypedDict": ".post_v1_companies_company_id_payrollsop", + "PostV1CompaniesCompanyIDPayrollsRequestTypedDict": ".post_v1_companies_company_id_payrollsop", + "PostV1CompaniesCompanyIDPayrollsWithholdingPayPeriod": ".post_v1_companies_company_id_payrollsop", + "PostV1CompaniesCompanyUUIDContractorsRequest": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompaniesCompanyUUIDContractorsRequestBody": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompaniesCompanyUUIDContractorsRequestBodyTypedDict": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompaniesCompanyUUIDContractorsRequestTypedDict": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompaniesCompanyUUIDContractorsType": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompaniesCompanyUUIDContractorsWageType": ".post_v1_companies_company_uuid_contractorsop", + "PostV1CompaniesCompanyUUIDSignatoriesInviteRequest": ".post_v1_companies_company_uuid_signatories_inviteop", + "PostV1CompaniesCompanyUUIDSignatoriesInviteRequestBody": ".post_v1_companies_company_uuid_signatories_inviteop", + "PostV1CompaniesCompanyUUIDSignatoriesInviteRequestBodyTypedDict": ".post_v1_companies_company_uuid_signatories_inviteop", + "PostV1CompaniesCompanyUUIDSignatoriesInviteRequestTypedDict": ".post_v1_companies_company_uuid_signatories_inviteop", + "PostV1CompanyFlowsEntityType": ".post_v1_company_flowsop", + "PostV1CompanyFlowsRequest": ".post_v1_company_flowsop", + "PostV1CompanyFlowsRequestBody": ".post_v1_company_flowsop", + "PostV1CompanyFlowsRequestBodyTypedDict": ".post_v1_company_flowsop", + "PostV1CompanyFlowsRequestTypedDict": ".post_v1_company_flowsop", + "PostV1CompanySignatoriesHomeAddress": ".post_v1_company_signatoriesop", + "PostV1CompanySignatoriesHomeAddressTypedDict": ".post_v1_company_signatoriesop", + "PostV1CompanySignatoriesRequest": ".post_v1_company_signatoriesop", + "PostV1CompanySignatoriesRequestBody": ".post_v1_company_signatoriesop", + "PostV1CompanySignatoriesRequestBodyTypedDict": ".post_v1_company_signatoriesop", + "PostV1CompanySignatoriesRequestTypedDict": ".post_v1_company_signatoriesop", + "PostV1CompensationsCompensationIDMinimumWages": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDMinimumWagesTypedDict": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDPaymentUnit": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDRequest": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDRequestBody": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDRequestBodyTypedDict": ".post_v1_compensations_compensation_idop", + "PostV1CompensationsCompensationIDRequestTypedDict": ".post_v1_compensations_compensation_idop", + "PostV1ContractorsContractorUUIDBankAccountsAccountType": ".post_v1_contractors_contractor_uuid_bank_accountsop", + "PostV1ContractorsContractorUUIDBankAccountsRequest": ".post_v1_contractors_contractor_uuid_bank_accountsop", + "PostV1ContractorsContractorUUIDBankAccountsRequestBody": ".post_v1_contractors_contractor_uuid_bank_accountsop", + "PostV1ContractorsContractorUUIDBankAccountsRequestBodyTypedDict": ".post_v1_contractors_contractor_uuid_bank_accountsop", + "PostV1ContractorsContractorUUIDBankAccountsRequestTypedDict": ".post_v1_contractors_contractor_uuid_bank_accountsop", + "PostV1EmployeesEmployeeIDBankAccountsAccountType": ".post_v1_employees_employee_id_bank_accountsop", + "PostV1EmployeesEmployeeIDBankAccountsRequest": ".post_v1_employees_employee_id_bank_accountsop", + "PostV1EmployeesEmployeeIDBankAccountsRequestBody": ".post_v1_employees_employee_id_bank_accountsop", + "PostV1EmployeesEmployeeIDBankAccountsRequestBodyTypedDict": ".post_v1_employees_employee_id_bank_accountsop", + "PostV1EmployeesEmployeeIDBankAccountsRequestTypedDict": ".post_v1_employees_employee_id_bank_accountsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsContribution": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsContributionTypedDict": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsDeductionReducesTaxableIncome": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsLimitOption": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsRequest": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBody": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsRequestBodyTypedDict": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsRequestTypedDict": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsType": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsValue": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsValue2": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsValue2TypedDict": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDEmployeeBenefitsValueTypedDict": ".post_v1_employees_employee_id_employee_benefitsop", + "PostV1EmployeesEmployeeIDGarnishmentsGarnishmentType": ".post_v1_employees_employee_id_garnishmentsop", + "PostV1EmployeesEmployeeIDGarnishmentsRequest": ".post_v1_employees_employee_id_garnishmentsop", + "PostV1EmployeesEmployeeIDGarnishmentsRequestBody": ".post_v1_employees_employee_id_garnishmentsop", + "PostV1EmployeesEmployeeIDGarnishmentsRequestBodyTypedDict": ".post_v1_employees_employee_id_garnishmentsop", + "PostV1EmployeesEmployeeIDGarnishmentsRequestTypedDict": ".post_v1_employees_employee_id_garnishmentsop", + "PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion": ".post_v1_employees_employee_id_home_addressesop", + "PostV1EmployeesEmployeeIDHomeAddressesRequest": ".post_v1_employees_employee_id_home_addressesop", + "PostV1EmployeesEmployeeIDHomeAddressesRequestBody": ".post_v1_employees_employee_id_home_addressesop", + "PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict": ".post_v1_employees_employee_id_home_addressesop", + "PostV1EmployeesEmployeeIDHomeAddressesRequestTypedDict": ".post_v1_employees_employee_id_home_addressesop", + "PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion": ".post_v1_employees_employee_id_recurring_reimbursementsop", + "PostV1EmployeesEmployeeIDRecurringReimbursementsRequest": ".post_v1_employees_employee_id_recurring_reimbursementsop", + "PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBody": ".post_v1_employees_employee_id_recurring_reimbursementsop", + "PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBodyTypedDict": ".post_v1_employees_employee_id_recurring_reimbursementsop", + "PostV1EmployeesEmployeeIDRecurringReimbursementsRequestTypedDict": ".post_v1_employees_employee_id_recurring_reimbursementsop", + "PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBody": ".post_v1_employees_employee_id_recurring_reimbursementsop", + "PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBodyTypedDict": ".post_v1_employees_employee_id_recurring_reimbursementsop", + "PostV1EmployeesEmployeeIDRehireRequest": ".post_v1_employees_employee_id_rehireop", + "PostV1EmployeesEmployeeIDRehireRequestTypedDict": ".post_v1_employees_employee_id_rehireop", + "PostV1EmployeesEmployeeIDSalaryEstimatesExperienceLevel": ".post_v1_employees_employee_id_salary_estimatesop", + "PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion": ".post_v1_employees_employee_id_salary_estimatesop", + "PostV1EmployeesEmployeeIDSalaryEstimatesOccupations": ".post_v1_employees_employee_id_salary_estimatesop", + "PostV1EmployeesEmployeeIDSalaryEstimatesOccupationsTypedDict": ".post_v1_employees_employee_id_salary_estimatesop", + "PostV1EmployeesEmployeeIDSalaryEstimatesRequest": ".post_v1_employees_employee_id_salary_estimatesop", + "PostV1EmployeesEmployeeIDSalaryEstimatesRequestBody": ".post_v1_employees_employee_id_salary_estimatesop", + "PostV1EmployeesEmployeeIDSalaryEstimatesRequestBodyTypedDict": ".post_v1_employees_employee_id_salary_estimatesop", + "PostV1EmployeesEmployeeIDSalaryEstimatesRequestTypedDict": ".post_v1_employees_employee_id_salary_estimatesop", + "PostV1EmployeesEmployeeIDTerminationsRequest": ".post_v1_employees_employee_id_terminationsop", + "PostV1EmployeesEmployeeIDTerminationsRequestBody": ".post_v1_employees_employee_id_terminationsop", + "PostV1EmployeesEmployeeIDTerminationsRequestBodyTypedDict": ".post_v1_employees_employee_id_terminationsop", + "PostV1EmployeesEmployeeIDTerminationsRequestTypedDict": ".post_v1_employees_employee_id_terminationsop", + "PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion": ".post_v1_employees_employee_id_work_addressesop", + "PostV1EmployeesEmployeeIDWorkAddressesRequest": ".post_v1_employees_employee_id_work_addressesop", + "PostV1EmployeesEmployeeIDWorkAddressesRequestBody": ".post_v1_employees_employee_id_work_addressesop", + "PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict": ".post_v1_employees_employee_id_work_addressesop", + "PostV1EmployeesEmployeeIDWorkAddressesRequestTypedDict": ".post_v1_employees_employee_id_work_addressesop", + "PostV1EmployeesHeaderXGustoAPIVersion": ".post_v1_employeesop", + "PostV1EmployeesRequest": ".post_v1_employeesop", + "PostV1EmployeesRequestBody": ".post_v1_employeesop", + "PostV1EmployeesRequestBodyTypedDict": ".post_v1_employeesop", + "PostV1EmployeesRequestTypedDict": ".post_v1_employeesop", + "PostV1ExternalPayrollRequest": ".post_v1_external_payrollop", + "PostV1ExternalPayrollRequestBody": ".post_v1_external_payrollop", + "PostV1ExternalPayrollRequestBodyTypedDict": ".post_v1_external_payrollop", + "PostV1ExternalPayrollRequestTypedDict": ".post_v1_external_payrollop", + "PostV1HistoricalEmployeesRequest": ".post_v1_historical_employeesop", + "PostV1HistoricalEmployeesRequestTypedDict": ".post_v1_historical_employeesop", + "PostV1JobsJobIDRequest": ".post_v1_jobs_job_idop", + "PostV1JobsJobIDRequestBody": ".post_v1_jobs_job_idop", + "PostV1JobsJobIDRequestBodyTypedDict": ".post_v1_jobs_job_idop", + "PostV1JobsJobIDRequestTypedDict": ".post_v1_jobs_job_idop", + "PostV1PartnerManagedCompaniesCompany": ".post_v1_partner_managed_companiesop", + "PostV1PartnerManagedCompaniesCompanyTypedDict": ".post_v1_partner_managed_companiesop", + "PostV1PartnerManagedCompaniesRequest": ".post_v1_partner_managed_companiesop", + "PostV1PartnerManagedCompaniesRequestBody": ".post_v1_partner_managed_companiesop", + "PostV1PartnerManagedCompaniesRequestBodyTypedDict": ".post_v1_partner_managed_companiesop", + "PostV1PartnerManagedCompaniesRequestTypedDict": ".post_v1_partner_managed_companiesop", + "PostV1PartnerManagedCompaniesResponseBody": ".post_v1_partner_managed_companiesop", + "PostV1PartnerManagedCompaniesResponseBodyTypedDict": ".post_v1_partner_managed_companiesop", + "PostV1PartnerManagedCompaniesSecurity": ".post_v1_partner_managed_companiesop", + "PostV1PartnerManagedCompaniesSecurityTypedDict": ".post_v1_partner_managed_companiesop", + "User": ".post_v1_partner_managed_companiesop", + "UserTypedDict": ".post_v1_partner_managed_companiesop", + "PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequest": ".post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop", + "PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBody": ".post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop", + "PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestBodyTypedDict": ".post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop", + "PostV1PayrollsPayrollIDCalculateAccruingTimeOffHoursRequestTypedDict": ".post_v1_payrolls_payroll_id_calculate_accruing_time_off_hoursop", + "PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequest": ".post_v1_payrolls_payroll_uuid_generated_documents_printable_payroll_checksop", + "PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBody": ".post_v1_payrolls_payroll_uuid_generated_documents_printable_payroll_checksop", + "PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBodyTypedDict": ".post_v1_payrolls_payroll_uuid_generated_documents_printable_payroll_checksop", + "PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestTypedDict": ".post_v1_payrolls_payroll_uuid_generated_documents_printable_payroll_checksop", + "PrintingFormat": ".post_v1_payrolls_payroll_uuid_generated_documents_printable_payroll_checksop", + "OwnerType": ".post_v1_plaid_processor_tokenop", + "PostV1PlaidProcessorTokenRequest": ".post_v1_plaid_processor_tokenop", + "PostV1PlaidProcessorTokenRequestBody": ".post_v1_plaid_processor_tokenop", + "PostV1PlaidProcessorTokenRequestBodyTypedDict": ".post_v1_plaid_processor_tokenop", + "PostV1PlaidProcessorTokenRequestTypedDict": ".post_v1_plaid_processor_tokenop", + "PostV1PlaidProcessorTokenResponseBody": ".post_v1_plaid_processor_tokenop", + "PostV1PlaidProcessorTokenResponseBodyTypedDict": ".post_v1_plaid_processor_tokenop", + "PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion": ".post_v1_salary_estimates_uuid_acceptop", + "PostV1SalaryEstimatesUUIDAcceptRequest": ".post_v1_salary_estimates_uuid_acceptop", + "PostV1SalaryEstimatesUUIDAcceptRequestBody": ".post_v1_salary_estimates_uuid_acceptop", + "PostV1SalaryEstimatesUUIDAcceptRequestBodyTypedDict": ".post_v1_salary_estimates_uuid_acceptop", + "PostV1SalaryEstimatesUUIDAcceptRequestTypedDict": ".post_v1_salary_estimates_uuid_acceptop", + "PostV1SandboxGenerate1099Request": ".post_v1_sandbox_generate_1099op", + "PostV1SandboxGenerate1099RequestBody": ".post_v1_sandbox_generate_1099op", + "PostV1SandboxGenerate1099RequestBodyTypedDict": ".post_v1_sandbox_generate_1099op", + "PostV1SandboxGenerate1099RequestTypedDict": ".post_v1_sandbox_generate_1099op", + "PostV1SandboxGenerateW2Form": ".post_v1_sandbox_generate_w2op", + "PostV1SandboxGenerateW2FormTypedDict": ".post_v1_sandbox_generate_w2op", + "PostV1SandboxGenerateW2Request": ".post_v1_sandbox_generate_w2op", + "PostV1SandboxGenerateW2RequestBody": ".post_v1_sandbox_generate_w2op", + "PostV1SandboxGenerateW2RequestBodyTypedDict": ".post_v1_sandbox_generate_w2op", + "PostV1SandboxGenerateW2RequestTypedDict": ".post_v1_sandbox_generate_w2op", + "PostV1WebhookSubscriptionRequest": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionRequestBody": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionRequestBodyTypedDict": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionRequestTypedDict": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionSecurity": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionSecurityTypedDict": ".post_v1_webhook_subscriptionop", + "PostV1WebhookSubscriptionSubscriptionTypes": ".post_v1_webhook_subscriptionop", + "PutAddPeopleToDepartmentContractors": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentContractorsTypedDict": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentEmployees": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentEmployeesTypedDict": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentRequest": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentRequestBody": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentRequestBodyTypedDict": ".put_add_people_to_departmentop", + "PutAddPeopleToDepartmentRequestTypedDict": ".put_add_people_to_departmentop", + "PutAPIV1CompaniesCompanyIDPayrollsPayrollIDCancelRequest": ".put_api_v1_companies_company_id_payrolls_payroll_id_cancelop", + "PutAPIV1CompaniesCompanyIDPayrollsPayrollIDCancelRequestTypedDict": ".put_api_v1_companies_company_id_payrolls_payroll_id_cancelop", + "PutCompaniesCompanyUUIDHolidayPayPolicyAddEmployees": ".put_companies_company_uuid_holiday_pay_policy_addop", + "PutCompaniesCompanyUUIDHolidayPayPolicyAddEmployeesTypedDict": ".put_companies_company_uuid_holiday_pay_policy_addop", + "PutCompaniesCompanyUUIDHolidayPayPolicyAddRequest": ".put_companies_company_uuid_holiday_pay_policy_addop", + "PutCompaniesCompanyUUIDHolidayPayPolicyAddRequestBody": ".put_companies_company_uuid_holiday_pay_policy_addop", + "PutCompaniesCompanyUUIDHolidayPayPolicyAddRequestBodyTypedDict": ".put_companies_company_uuid_holiday_pay_policy_addop", + "PutCompaniesCompanyUUIDHolidayPayPolicyAddRequestTypedDict": ".put_companies_company_uuid_holiday_pay_policy_addop", + "PutCompaniesCompanyUUIDHolidayPayPolicyRemoveEmployees": ".put_companies_company_uuid_holiday_pay_policy_removeop", + "PutCompaniesCompanyUUIDHolidayPayPolicyRemoveEmployeesTypedDict": ".put_companies_company_uuid_holiday_pay_policy_removeop", + "PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequest": ".put_companies_company_uuid_holiday_pay_policy_removeop", + "PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequestBody": ".put_companies_company_uuid_holiday_pay_policy_removeop", + "PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequestBodyTypedDict": ".put_companies_company_uuid_holiday_pay_policy_removeop", + "PutCompaniesCompanyUUIDHolidayPayPolicyRemoveRequestTypedDict": ".put_companies_company_uuid_holiday_pay_policy_removeop", + "PutCompaniesCompanyUUIDHolidayPayPolicyChristmasDay": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyChristmasDayTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyColumbusDay": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyColumbusDayTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyFederalHolidays": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyFederalHolidaysTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyIndependenceDay": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyIndependenceDayTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyJuneteenth": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyJuneteenthTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyLaborDay": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyLaborDayTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyMemorialDay": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyMemorialDayTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyMlkDay": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyMlkDayTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyNewYearsDay": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyNewYearsDayTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyPresidentsDay": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyPresidentsDayTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyRequest": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyRequestBody": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyRequestBodyTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyRequestTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyThanksgiving": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyThanksgivingTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyVeteransDay": ".put_companies_company_uuid_holiday_pay_policyop", + "PutCompaniesCompanyUUIDHolidayPayPolicyVeteransDayTypedDict": ".put_companies_company_uuid_holiday_pay_policyop", + "PutDepartmentsRequest": ".put_departmentsop", + "PutDepartmentsRequestBody": ".put_departmentsop", + "PutDepartmentsRequestBodyTypedDict": ".put_departmentsop", + "PutDepartmentsRequestTypedDict": ".put_departmentsop", + "PutRemovePeopleFromDepartmentContractors": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentContractorsTypedDict": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentEmployees": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentEmployeesTypedDict": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentRequest": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentRequestBody": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentRequestBodyTypedDict": ".put_remove_people_from_departmentop", + "PutRemovePeopleFromDepartmentRequestTypedDict": ".put_remove_people_from_departmentop", + "AccrualMethod": ".put_time_off_policies_time_off_policy_uuidop", + "PutTimeOffPoliciesTimeOffPolicyUUIDRequest": ".put_time_off_policies_time_off_policy_uuidop", + "PutTimeOffPoliciesTimeOffPolicyUUIDRequestBody": ".put_time_off_policies_time_off_policy_uuidop", + "PutTimeOffPoliciesTimeOffPolicyUUIDRequestBodyTypedDict": ".put_time_off_policies_time_off_policy_uuidop", + "PutTimeOffPoliciesTimeOffPolicyUUIDRequestTypedDict": ".put_time_off_policies_time_off_policy_uuidop", + "PutV1CompaniesCompanyIDBankAccountsVerifyRequest": ".put_v1_companies_company_id_bank_accounts_verifyop", + "PutV1CompaniesCompanyIDBankAccountsVerifyRequestBody": ".put_v1_companies_company_id_bank_accounts_verifyop", + "PutV1CompaniesCompanyIDBankAccountsVerifyRequestBodyTypedDict": ".put_v1_companies_company_id_bank_accounts_verifyop", + "PutV1CompaniesCompanyIDBankAccountsVerifyRequestTypedDict": ".put_v1_companies_company_id_bank_accounts_verifyop", + "PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequest": ".put_v1_companies_company_id_earning_types_earning_type_uuidop", + "PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBody": ".put_v1_companies_company_id_earning_types_earning_type_uuidop", + "PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestBodyTypedDict": ".put_v1_companies_company_id_earning_types_earning_type_uuidop", + "PutV1CompaniesCompanyIDEarningTypesEarningTypeUUIDRequestTypedDict": ".put_v1_companies_company_id_earning_types_earning_type_uuidop", + "FilingForm": ".put_v1_companies_company_id_federal_tax_detailsop", + "PutV1CompaniesCompanyIDFederalTaxDetailsRequest": ".put_v1_companies_company_id_federal_tax_detailsop", + "PutV1CompaniesCompanyIDFederalTaxDetailsRequestBody": ".put_v1_companies_company_id_federal_tax_detailsop", + "PutV1CompaniesCompanyIDFederalTaxDetailsRequestBodyTypedDict": ".put_v1_companies_company_id_federal_tax_detailsop", + "PutV1CompaniesCompanyIDFederalTaxDetailsRequestTypedDict": ".put_v1_companies_company_id_federal_tax_detailsop", + "TaxPayerType": ".put_v1_companies_company_id_federal_tax_detailsop", + "PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDFrequency": ".put_v1_companies_company_id_pay_schedules_pay_schedule_idop", + "PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequest": ".put_v1_companies_company_id_pay_schedules_pay_schedule_idop", + "PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestBody": ".put_v1_companies_company_id_pay_schedules_pay_schedule_idop", + "PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestBodyTypedDict": ".put_v1_companies_company_id_pay_schedules_pay_schedule_idop", + "PutV1CompaniesCompanyIDPaySchedulesPayScheduleIDRequestTypedDict": ".put_v1_companies_company_id_pay_schedules_pay_schedule_idop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequest": ".put_v1_companies_company_id_payrolls_payroll_id_calculateop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequestTypedDict": ".put_v1_companies_company_id_payrolls_payroll_id_calculateop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBody": ".put_v1_companies_company_id_payrolls_payroll_id_calculateop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion": ".put_v1_companies_company_id_payrolls_payroll_id_calculateop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest": ".put_v1_companies_company_id_payrolls_payroll_id_prepareop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody": ".put_v1_companies_company_id_payrolls_payroll_id_prepareop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBodyTypedDict": ".put_v1_companies_company_id_payrolls_payroll_id_prepareop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestTypedDict": ".put_v1_companies_company_id_payrolls_payroll_id_prepareop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequest": ".put_v1_companies_company_id_payrolls_payroll_id_submitop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody": ".put_v1_companies_company_id_payrolls_payroll_id_submitop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBodyTypedDict": ".put_v1_companies_company_id_payrolls_payroll_id_submitop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestTypedDict": ".put_v1_companies_company_id_payrolls_payroll_id_submitop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBody": ".put_v1_companies_company_id_payrolls_payroll_id_submitop", + "PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion": ".put_v1_companies_company_id_payrolls_payroll_id_submitop", + "SubmissionBlockers": ".put_v1_companies_company_id_payrolls_payroll_id_submitop", + "SubmissionBlockersTypedDict": ".put_v1_companies_company_id_payrolls_payroll_id_submitop", + "PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion": ".put_v1_companies_company_id_payrollsop", + "PutV1CompaniesCompanyIDPayrollsRequest": ".put_v1_companies_company_id_payrollsop", + "PutV1CompaniesCompanyIDPayrollsRequestTypedDict": ".put_v1_companies_company_id_payrollsop", + "PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDHomeAddress": ".put_v1_companies_company_uuid_signatories_signatory_uuidop", + "PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDHomeAddressTypedDict": ".put_v1_companies_company_uuid_signatories_signatory_uuidop", + "PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequest": ".put_v1_companies_company_uuid_signatories_signatory_uuidop", + "PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestBody": ".put_v1_companies_company_uuid_signatories_signatory_uuidop", + "PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestBodyTypedDict": ".put_v1_companies_company_uuid_signatories_signatory_uuidop", + "PutV1CompaniesCompanyUUIDSignatoriesSignatoryUUIDRequestTypedDict": ".put_v1_companies_company_uuid_signatories_signatory_uuidop", + "PutV1CompaniesCompanyUUIDTaxRequirementsStateRequest": ".put_v1_companies_company_uuid_tax_requirements_stateop", + "PutV1CompaniesCompanyUUIDTaxRequirementsStateRequestBody": ".put_v1_companies_company_uuid_tax_requirements_stateop", + "PutV1CompaniesCompanyUUIDTaxRequirementsStateRequestBodyTypedDict": ".put_v1_companies_company_uuid_tax_requirements_stateop", + "PutV1CompaniesCompanyUUIDTaxRequirementsStateRequestTypedDict": ".put_v1_companies_company_uuid_tax_requirements_stateop", + "PutV1CompaniesCompanyUUIDTaxRequirementsStateRequirements": ".put_v1_companies_company_uuid_tax_requirements_stateop", + "PutV1CompaniesCompanyUUIDTaxRequirementsStateRequirementsTypedDict": ".put_v1_companies_company_uuid_tax_requirements_stateop", + "RequirementSets": ".put_v1_companies_company_uuid_tax_requirements_stateop", + "RequirementSetsTypedDict": ".put_v1_companies_company_uuid_tax_requirements_stateop", + "PutV1CompaniesRequest": ".put_v1_companiesop", + "PutV1CompaniesRequestBody": ".put_v1_companiesop", + "PutV1CompaniesRequestBodyTypedDict": ".put_v1_companiesop", + "PutV1CompaniesRequestTypedDict": ".put_v1_companiesop", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest": ".put_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody": ".put_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBodyTypedDict": ".put_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict": ".put_v1_company_benefits_company_benefit_id_contribution_exclusionsop", + "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequest": ".put_v1_company_benefits_company_benefit_id_employee_benefitsop", + "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBody": ".put_v1_company_benefits_company_benefit_id_employee_benefitsop", + "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestBodyTypedDict": ".put_v1_company_benefits_company_benefit_id_employee_benefitsop", + "PutV1CompanyBenefitsCompanyBenefitIDEmployeeBenefitsRequestTypedDict": ".put_v1_company_benefits_company_benefit_id_employee_benefitsop", + "PutV1CompanyBenefitsCompanyBenefitIDRequest": ".put_v1_company_benefits_company_benefit_idop", + "PutV1CompanyBenefitsCompanyBenefitIDRequestBody": ".put_v1_company_benefits_company_benefit_idop", + "PutV1CompanyBenefitsCompanyBenefitIDRequestBodyTypedDict": ".put_v1_company_benefits_company_benefit_idop", + "PutV1CompanyBenefitsCompanyBenefitIDRequestTypedDict": ".put_v1_company_benefits_company_benefit_idop", + "PutV1CompanyFormSignRequest": ".put_v1_company_form_signop", + "PutV1CompanyFormSignRequestBody": ".put_v1_company_form_signop", + "PutV1CompanyFormSignRequestBodyTypedDict": ".put_v1_company_form_signop", + "PutV1CompanyFormSignRequestTypedDict": ".put_v1_company_form_signop", + "PutV1CompanyIndustryRequest": ".put_v1_company_industryop", + "PutV1CompanyIndustryRequestBody": ".put_v1_company_industryop", + "PutV1CompanyIndustryRequestBodyTypedDict": ".put_v1_company_industryop", + "PutV1CompanyIndustryRequestTypedDict": ".put_v1_company_industryop", + "PutV1CompanyPaymentConfigsRequest": ".put_v1_company_payment_configsop", + "PutV1CompanyPaymentConfigsRequestBody": ".put_v1_company_payment_configsop", + "PutV1CompanyPaymentConfigsRequestBodyTypedDict": ".put_v1_company_payment_configsop", + "PutV1CompanyPaymentConfigsRequestTypedDict": ".put_v1_company_payment_configsop", + "PutV1CompensationsCompensationIDMinimumWages": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDMinimumWagesTypedDict": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDPaymentUnit": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDRequest": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDRequestBody": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDRequestBodyTypedDict": ".put_v1_compensations_compensation_idop", + "PutV1CompensationsCompensationIDRequestTypedDict": ".put_v1_compensations_compensation_idop", + "PutV1ContractorDocumentSignFields": ".put_v1_contractor_document_signop", + "PutV1ContractorDocumentSignFieldsTypedDict": ".put_v1_contractor_document_signop", + "PutV1ContractorDocumentSignRequest": ".put_v1_contractor_document_signop", + "PutV1ContractorDocumentSignRequestBody": ".put_v1_contractor_document_signop", + "PutV1ContractorDocumentSignRequestBodyTypedDict": ".put_v1_contractor_document_signop", + "PutV1ContractorDocumentSignRequestTypedDict": ".put_v1_contractor_document_signop", + "PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion": ".put_v1_contractor_payment_groups_contractor_payment_group_id_fundop", + "PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequest": ".put_v1_contractor_payment_groups_contractor_payment_group_id_fundop", + "PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequestTypedDict": ".put_v1_contractor_payment_groups_contractor_payment_group_id_fundop", + "PutV1ContractorsContractorIDPaymentMethodRequest": ".put_v1_contractors_contractor_id_payment_methodop", + "PutV1ContractorsContractorIDPaymentMethodRequestBody": ".put_v1_contractors_contractor_id_payment_methodop", + "PutV1ContractorsContractorIDPaymentMethodRequestBodyTypedDict": ".put_v1_contractors_contractor_id_payment_methodop", + "PutV1ContractorsContractorIDPaymentMethodRequestTypedDict": ".put_v1_contractors_contractor_id_payment_methodop", + "PutV1ContractorsContractorIDPaymentMethodType": ".put_v1_contractors_contractor_id_payment_methodop", + "PutV1ContractorsContractorUUIDAddressRequest": ".put_v1_contractors_contractor_uuid_addressop", + "PutV1ContractorsContractorUUIDAddressRequestBody": ".put_v1_contractors_contractor_uuid_addressop", + "PutV1ContractorsContractorUUIDAddressRequestBodyTypedDict": ".put_v1_contractors_contractor_uuid_addressop", + "PutV1ContractorsContractorUUIDAddressRequestTypedDict": ".put_v1_contractors_contractor_uuid_addressop", + "PutV1ContractorsContractorUUIDOnboardingStatusOnboardingStatus": ".put_v1_contractors_contractor_uuid_onboarding_statusop", + "PutV1ContractorsContractorUUIDOnboardingStatusRequest": ".put_v1_contractors_contractor_uuid_onboarding_statusop", + "PutV1ContractorsContractorUUIDOnboardingStatusRequestBody": ".put_v1_contractors_contractor_uuid_onboarding_statusop", + "PutV1ContractorsContractorUUIDOnboardingStatusRequestBodyTypedDict": ".put_v1_contractors_contractor_uuid_onboarding_statusop", + "PutV1ContractorsContractorUUIDOnboardingStatusRequestTypedDict": ".put_v1_contractors_contractor_uuid_onboarding_statusop", + "PutV1ContractorsContractorUUIDRequest": ".put_v1_contractors_contractor_uuidop", + "PutV1ContractorsContractorUUIDRequestBody": ".put_v1_contractors_contractor_uuidop", + "PutV1ContractorsContractorUUIDRequestBodyTypedDict": ".put_v1_contractors_contractor_uuidop", + "PutV1ContractorsContractorUUIDRequestTypedDict": ".put_v1_contractors_contractor_uuidop", + "PutV1ContractorsContractorUUIDType": ".put_v1_contractors_contractor_uuidop", + "PutV1ContractorsContractorUUIDWageType": ".put_v1_contractors_contractor_uuidop", + "PutV1EmployeeBenefitsEmployeeBenefitIDContribution": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDContributionTypedDict": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDDeductionReducesTaxableIncome": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDLimitOption": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDRequest": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDRequestBody": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDRequestBodyTypedDict": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDRequestTypedDict": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDType": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDValue": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDValue2": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDValue2TypedDict": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeBenefitsEmployeeBenefitIDValueTypedDict": ".put_v1_employee_benefits_employee_benefit_idop", + "PutV1EmployeeFormSignRequest": ".put_v1_employee_form_signop", + "PutV1EmployeeFormSignRequestBody": ".put_v1_employee_form_signop", + "PutV1EmployeeFormSignRequestBodyTypedDict": ".put_v1_employee_form_signop", + "PutV1EmployeeFormSignRequestTypedDict": ".put_v1_employee_form_signop", + "PutV1EmployeesEmployeeIDBankAccountsAccountType": ".put_v1_employees_employee_id_bank_accountsop", + "PutV1EmployeesEmployeeIDBankAccountsRequest": ".put_v1_employees_employee_id_bank_accountsop", + "PutV1EmployeesEmployeeIDBankAccountsRequestBody": ".put_v1_employees_employee_id_bank_accountsop", + "PutV1EmployeesEmployeeIDBankAccountsRequestBodyTypedDict": ".put_v1_employees_employee_id_bank_accountsop", + "PutV1EmployeesEmployeeIDBankAccountsRequestTypedDict": ".put_v1_employees_employee_id_bank_accountsop", + "PutV1EmployeesEmployeeIDFederalTaxesRequest": ".put_v1_employees_employee_id_federal_taxesop", + "PutV1EmployeesEmployeeIDFederalTaxesRequestBody": ".put_v1_employees_employee_id_federal_taxesop", + "PutV1EmployeesEmployeeIDFederalTaxesRequestBodyTypedDict": ".put_v1_employees_employee_id_federal_taxesop", + "PutV1EmployeesEmployeeIDFederalTaxesRequestTypedDict": ".put_v1_employees_employee_id_federal_taxesop", + "Documents": ".put_v1_employees_employee_id_i9_authorization_documentsop", + "DocumentsTypedDict": ".put_v1_employees_employee_id_i9_authorization_documentsop", + "PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequest": ".put_v1_employees_employee_id_i9_authorization_documentsop", + "PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestBody": ".put_v1_employees_employee_id_i9_authorization_documentsop", + "PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestBodyTypedDict": ".put_v1_employees_employee_id_i9_authorization_documentsop", + "PutV1EmployeesEmployeeIDI9AuthorizationDocumentsRequestTypedDict": ".put_v1_employees_employee_id_i9_authorization_documentsop", + "PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequest": ".put_v1_employees_employee_id_i9_authorization_employer_signop", + "PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestBody": ".put_v1_employees_employee_id_i9_authorization_employer_signop", + "PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestBodyTypedDict": ".put_v1_employees_employee_id_i9_authorization_employer_signop", + "PutV1EmployeesEmployeeIDI9AuthorizationEmployerSignRequestTypedDict": ".put_v1_employees_employee_id_i9_authorization_employer_signop", + "PutV1EmployeesEmployeeIDI9AuthorizationAuthorizationStatus": ".put_v1_employees_employee_id_i9_authorizationop", + "PutV1EmployeesEmployeeIDI9AuthorizationDocumentType": ".put_v1_employees_employee_id_i9_authorizationop", + "PutV1EmployeesEmployeeIDI9AuthorizationRequest": ".put_v1_employees_employee_id_i9_authorizationop", + "PutV1EmployeesEmployeeIDI9AuthorizationRequestBody": ".put_v1_employees_employee_id_i9_authorizationop", + "PutV1EmployeesEmployeeIDI9AuthorizationRequestBodyTypedDict": ".put_v1_employees_employee_id_i9_authorizationop", + "PutV1EmployeesEmployeeIDI9AuthorizationRequestTypedDict": ".put_v1_employees_employee_id_i9_authorizationop", + "PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequest": ".put_v1_employees_employee_id_onboarding_documents_configop", + "PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequestBody": ".put_v1_employees_employee_id_onboarding_documents_configop", + "PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequestBodyTypedDict": ".put_v1_employees_employee_id_onboarding_documents_configop", + "PutV1EmployeesEmployeeIDOnboardingDocumentsConfigRequestTypedDict": ".put_v1_employees_employee_id_onboarding_documents_configop", + "PutV1EmployeesEmployeeIDOnboardingStatusHeaderXGustoAPIVersion": ".put_v1_employees_employee_id_onboarding_statusop", + "PutV1EmployeesEmployeeIDOnboardingStatusOnboardingStatus": ".put_v1_employees_employee_id_onboarding_statusop", + "PutV1EmployeesEmployeeIDOnboardingStatusRequest": ".put_v1_employees_employee_id_onboarding_statusop", + "PutV1EmployeesEmployeeIDOnboardingStatusRequestBody": ".put_v1_employees_employee_id_onboarding_statusop", + "PutV1EmployeesEmployeeIDOnboardingStatusRequestBodyTypedDict": ".put_v1_employees_employee_id_onboarding_statusop", + "PutV1EmployeesEmployeeIDOnboardingStatusRequestTypedDict": ".put_v1_employees_employee_id_onboarding_statusop", + "PutV1EmployeesEmployeeIDPaymentMethodRequest": ".put_v1_employees_employee_id_payment_methodop", + "PutV1EmployeesEmployeeIDPaymentMethodRequestBody": ".put_v1_employees_employee_id_payment_methodop", + "PutV1EmployeesEmployeeIDPaymentMethodRequestBodyTypedDict": ".put_v1_employees_employee_id_payment_methodop", + "PutV1EmployeesEmployeeIDPaymentMethodRequestTypedDict": ".put_v1_employees_employee_id_payment_methodop", + "PutV1EmployeesEmployeeIDPaymentMethodSplitBy": ".put_v1_employees_employee_id_payment_methodop", + "PutV1EmployeesEmployeeIDPaymentMethodSplits": ".put_v1_employees_employee_id_payment_methodop", + "PutV1EmployeesEmployeeIDPaymentMethodSplitsTypedDict": ".put_v1_employees_employee_id_payment_methodop", + "PutV1EmployeesEmployeeIDPaymentMethodType": ".put_v1_employees_employee_id_payment_methodop", + "PutV1EmployeesEmployeeIDRehireEmploymentStatus": ".put_v1_employees_employee_id_rehireop", + "PutV1EmployeesEmployeeIDRehireRequest": ".put_v1_employees_employee_id_rehireop", + "PutV1EmployeesEmployeeIDRehireRequestBody": ".put_v1_employees_employee_id_rehireop", + "PutV1EmployeesEmployeeIDRehireRequestBodyTypedDict": ".put_v1_employees_employee_id_rehireop", + "PutV1EmployeesEmployeeIDRehireRequestTypedDict": ".put_v1_employees_employee_id_rehireop", + "PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion": ".put_v1_employees_employee_id_state_taxesop", + "PutV1EmployeesEmployeeIDStateTaxesRequest": ".put_v1_employees_employee_id_state_taxesop", + "PutV1EmployeesEmployeeIDStateTaxesRequestTypedDict": ".put_v1_employees_employee_id_state_taxesop", + "PutV1EmployeesHeaderXGustoAPIVersion": ".put_v1_employeesop", + "PutV1EmployeesRequest": ".put_v1_employeesop", + "PutV1EmployeesRequestBody": ".put_v1_employeesop", + "PutV1EmployeesRequestBodyTypedDict": ".put_v1_employeesop", + "PutV1EmployeesRequestTypedDict": ".put_v1_employeesop", + "PutV1ExternalPayrollBenefits": ".put_v1_external_payrollop", + "PutV1ExternalPayrollBenefitsTypedDict": ".put_v1_external_payrollop", + "PutV1ExternalPayrollEarningType": ".put_v1_external_payrollop", + "PutV1ExternalPayrollEarnings": ".put_v1_external_payrollop", + "PutV1ExternalPayrollEarningsTypedDict": ".put_v1_external_payrollop", + "PutV1ExternalPayrollExternalPayrollItems": ".put_v1_external_payrollop", + "PutV1ExternalPayrollExternalPayrollItemsTypedDict": ".put_v1_external_payrollop", + "PutV1ExternalPayrollRequest": ".put_v1_external_payrollop", + "PutV1ExternalPayrollRequestBody": ".put_v1_external_payrollop", + "PutV1ExternalPayrollRequestBodyTypedDict": ".put_v1_external_payrollop", + "PutV1ExternalPayrollRequestTypedDict": ".put_v1_external_payrollop", + "PutV1ExternalPayrollTaxes": ".put_v1_external_payrollop", + "PutV1ExternalPayrollTaxesTypedDict": ".put_v1_external_payrollop", + "PutV1GarnishmentsGarnishmentIDRequest": ".put_v1_garnishments_garnishment_idop", + "PutV1GarnishmentsGarnishmentIDRequestBody": ".put_v1_garnishments_garnishment_idop", + "PutV1GarnishmentsGarnishmentIDRequestBodyTypedDict": ".put_v1_garnishments_garnishment_idop", + "PutV1GarnishmentsGarnishmentIDRequestTypedDict": ".put_v1_garnishments_garnishment_idop", + "PutV1HistoricalEmployeesEmployeeStateTaxes": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesEmployeeStateTaxesTypedDict": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesHomeAddress": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesHomeAddressTypedDict": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesJob": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesJobTypedDict": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesRequest": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesRequestBody": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesRequestBodyTypedDict": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesRequestTypedDict": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesTermination": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesTerminationTypedDict": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesWorkAddress": ".put_v1_historical_employeesop", + "PutV1HistoricalEmployeesWorkAddressTypedDict": ".put_v1_historical_employeesop", + "PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion": ".put_v1_home_addresses_home_address_uuidop", + "PutV1HomeAddressesHomeAddressUUIDRequest": ".put_v1_home_addresses_home_address_uuidop", + "PutV1HomeAddressesHomeAddressUUIDRequestBody": ".put_v1_home_addresses_home_address_uuidop", + "PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict": ".put_v1_home_addresses_home_address_uuidop", + "PutV1HomeAddressesHomeAddressUUIDRequestTypedDict": ".put_v1_home_addresses_home_address_uuidop", + "PutV1JobsJobIDRequest": ".put_v1_jobs_job_idop", + "PutV1JobsJobIDRequestBody": ".put_v1_jobs_job_idop", + "PutV1JobsJobIDRequestBodyTypedDict": ".put_v1_jobs_job_idop", + "PutV1JobsJobIDRequestTypedDict": ".put_v1_jobs_job_idop", + "HeaderXGustoAPIVersion": ".put_v1_locations_location_idop", + "PutV1LocationsLocationIDRequest": ".put_v1_locations_location_idop", + "PutV1LocationsLocationIDRequestBody": ".put_v1_locations_location_idop", + "PutV1LocationsLocationIDRequestBodyTypedDict": ".put_v1_locations_location_idop", + "PutV1LocationsLocationIDRequestTypedDict": ".put_v1_locations_location_idop", + "MigrationStatus": ".put_v1_partner_managed_companies_company_uuid_migrateop", + "PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequest": ".put_v1_partner_managed_companies_company_uuid_migrateop", + "PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequestBody": ".put_v1_partner_managed_companies_company_uuid_migrateop", + "PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequestBodyTypedDict": ".put_v1_partner_managed_companies_company_uuid_migrateop", + "PutV1PartnerManagedCompaniesCompanyUUIDMigrateRequestTypedDict": ".put_v1_partner_managed_companies_company_uuid_migrateop", + "PutV1PartnerManagedCompaniesCompanyUUIDMigrateResponseBody": ".put_v1_partner_managed_companies_company_uuid_migrateop", + "PutV1PartnerManagedCompaniesCompanyUUIDMigrateResponseBodyTypedDict": ".put_v1_partner_managed_companies_company_uuid_migrateop", + "PutV1RecurringReimbursementsHeaderXGustoAPIVersion": ".put_v1_recurring_reimbursementsop", + "PutV1RecurringReimbursementsRequest": ".put_v1_recurring_reimbursementsop", + "PutV1RecurringReimbursementsRequestBody": ".put_v1_recurring_reimbursementsop", + "PutV1RecurringReimbursementsRequestBodyTypedDict": ".put_v1_recurring_reimbursementsop", + "PutV1RecurringReimbursementsRequestTypedDict": ".put_v1_recurring_reimbursementsop", + "PutV1RecurringReimbursementsResponseBody": ".put_v1_recurring_reimbursementsop", + "PutV1RecurringReimbursementsResponseBodyTypedDict": ".put_v1_recurring_reimbursementsop", + "PutV1SalaryEstimatesIDExperienceLevel": ".put_v1_salary_estimates_idop", + "PutV1SalaryEstimatesIDHeaderXGustoAPIVersion": ".put_v1_salary_estimates_idop", + "PutV1SalaryEstimatesIDOccupations": ".put_v1_salary_estimates_idop", + "PutV1SalaryEstimatesIDOccupationsTypedDict": ".put_v1_salary_estimates_idop", + "PutV1SalaryEstimatesIDRequest": ".put_v1_salary_estimates_idop", + "PutV1SalaryEstimatesIDRequestBody": ".put_v1_salary_estimates_idop", + "PutV1SalaryEstimatesIDRequestBodyTypedDict": ".put_v1_salary_estimates_idop", + "PutV1SalaryEstimatesIDRequestTypedDict": ".put_v1_salary_estimates_idop", + "PutV1TaxLiabilitiesFinishRequest": ".put_v1_tax_liabilities_finishop", + "PutV1TaxLiabilitiesFinishRequestTypedDict": ".put_v1_tax_liabilities_finishop", + "LiabilitySelections": ".put_v1_tax_liabilitiesop", + "LiabilitySelectionsTypedDict": ".put_v1_tax_liabilitiesop", + "PutV1TaxLiabilitiesRequest": ".put_v1_tax_liabilitiesop", + "PutV1TaxLiabilitiesRequestBody": ".put_v1_tax_liabilitiesop", + "PutV1TaxLiabilitiesRequestBodyTypedDict": ".put_v1_tax_liabilitiesop", + "PutV1TaxLiabilitiesRequestTypedDict": ".put_v1_tax_liabilitiesop", + "PutV1TerminationsEmployeeIDRequest": ".put_v1_terminations_employee_idop", + "PutV1TerminationsEmployeeIDRequestBody": ".put_v1_terminations_employee_idop", + "PutV1TerminationsEmployeeIDRequestBodyTypedDict": ".put_v1_terminations_employee_idop", + "PutV1TerminationsEmployeeIDRequestTypedDict": ".put_v1_terminations_employee_idop", + "PutV1TimeOffPoliciesTimeOffPolicyUUIDDeactivateRequest": ".put_v1_time_off_policies_time_off_policy_uuid_deactivateop", + "PutV1TimeOffPoliciesTimeOffPolicyUUIDDeactivateRequestTypedDict": ".put_v1_time_off_policies_time_off_policy_uuid_deactivateop", + "PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesEmployees": ".put_v1_time_off_policies_time_off_policy_uuid_remove_employeesop", + "PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesEmployeesTypedDict": ".put_v1_time_off_policies_time_off_policy_uuid_remove_employeesop", + "PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequest": ".put_v1_time_off_policies_time_off_policy_uuid_remove_employeesop", + "PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequestBody": ".put_v1_time_off_policies_time_off_policy_uuid_remove_employeesop", + "PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequestBodyTypedDict": ".put_v1_time_off_policies_time_off_policy_uuid_remove_employeesop", + "PutV1TimeOffPoliciesTimeOffPolicyUUIDRemoveEmployeesRequestTypedDict": ".put_v1_time_off_policies_time_off_policy_uuid_remove_employeesop", + "PutV1VerifyWebhookSubscriptionUUIDRequest": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1VerifyWebhookSubscriptionUUIDRequestBody": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1VerifyWebhookSubscriptionUUIDRequestBodyTypedDict": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1VerifyWebhookSubscriptionUUIDRequestTypedDict": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1VerifyWebhookSubscriptionUUIDSecurity": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1VerifyWebhookSubscriptionUUIDSecurityTypedDict": ".put_v1_verify_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDRequest": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDRequestBody": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDRequestBodyTypedDict": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDRequestTypedDict": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDSecurity": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDSecurityTypedDict": ".put_v1_webhook_subscription_uuidop", + "PutV1WebhookSubscriptionUUIDSubscriptionTypes": ".put_v1_webhook_subscription_uuidop", + "PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion": ".put_v1_work_addresses_work_address_uuidop", + "PutV1WorkAddressesWorkAddressUUIDRequest": ".put_v1_work_addresses_work_address_uuidop", + "PutV1WorkAddressesWorkAddressUUIDRequestBody": ".put_v1_work_addresses_work_address_uuidop", + "PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict": ".put_v1_work_addresses_work_address_uuidop", + "PutV1WorkAddressesWorkAddressUUIDRequestTypedDict": ".put_v1_work_addresses_work_address_uuidop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesEmployees": ".put_version_time_off_policies_time_off_policy_uuid_add_employeesop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesEmployeesTypedDict": ".put_version_time_off_policies_time_off_policy_uuid_add_employeesop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequest": ".put_version_time_off_policies_time_off_policy_uuid_add_employeesop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequestBody": ".put_version_time_off_policies_time_off_policy_uuid_add_employeesop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequestBodyTypedDict": ".put_version_time_off_policies_time_off_policy_uuid_add_employeesop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDAddEmployeesRequestTypedDict": ".put_version_time_off_policies_time_off_policy_uuid_add_employeesop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceEmployees": ".put_version_time_off_policies_time_off_policy_uuid_balanceop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceEmployeesTypedDict": ".put_version_time_off_policies_time_off_policy_uuid_balanceop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequest": ".put_version_time_off_policies_time_off_policy_uuid_balanceop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequestBody": ".put_version_time_off_policies_time_off_policy_uuid_balanceop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequestBodyTypedDict": ".put_version_time_off_policies_time_off_policy_uuid_balanceop", + "PutVersionTimeOffPoliciesTimeOffPolicyUUIDBalanceRequestTypedDict": ".put_version_time_off_policies_time_off_policy_uuid_balanceop", + "PutWireInRequestsWireInRequestUUIDRequest": ".put_wire_in_requests_wire_in_request_uuidop", + "PutWireInRequestsWireInRequestUUIDRequestBody": ".put_wire_in_requests_wire_in_request_uuidop", + "PutWireInRequestsWireInRequestUUIDRequestBodyTypedDict": ".put_wire_in_requests_wire_in_request_uuidop", + "PutWireInRequestsWireInRequestUUIDRequestTypedDict": ".put_wire_in_requests_wire_in_request_uuidop", + "RecoveryCase": ".recovery_case", + "RecoveryCaseStatus": ".recovery_case", + "RecoveryCaseTypedDict": ".recovery_case", + "RedebitRecoveryCaseRequest": ".redebit_recovery_caseop", + "RedebitRecoveryCaseRequestTypedDict": ".redebit_recovery_caseop", + "RefreshAccessTokenRequest": ".refresh_access_tokenop", + "RefreshAccessTokenRequestBody": ".refresh_access_tokenop", + "RefreshAccessTokenRequestBodyTypedDict": ".refresh_access_tokenop", + "RefreshAccessTokenRequestTypedDict": ".refresh_access_tokenop", + "Rehire": ".rehire", + "RehireEmploymentStatus": ".rehire", + "RehireTypedDict": ".rehire", + "EmploymentStatus": ".rehire_body", + "RehireBody": ".rehire_body", + "RehireBodyTypedDict": ".rehire_body", + "Report": ".report", + "ReportTypedDict": ".report", + "ReportTemplate": ".report_template", + "ReportTemplateTypedDict": ".report_template", + "ResponseValidationError": ".responsevalidationerror", + "ExperienceLevel": ".salary_estimate", + "Occupations": ".salary_estimate", + "OccupationsTypedDict": ".salary_estimate", + "SalaryEstimate": ".salary_estimate", + "SalaryEstimateTypedDict": ".salary_estimate", + "Security": ".security", + "SecurityTypedDict": ".security", + "CurrentEmploymentStatus": ".show_employees", + "OnboardingDocumentsConfig": ".show_employees", + "OnboardingDocumentsConfigTypedDict": ".show_employees", + "OnboardingStatus": ".show_employees", + "PaymentMethod": ".show_employees", + "ShowEmployees": ".show_employees", + "ShowEmployeesTypedDict": ".show_employees", + "HomeAddress": ".signatory", + "HomeAddressTypedDict": ".signatory", + "IdentityVerificationStatus": ".signatory", + "Signatory": ".signatory", + "SignatoryTypedDict": ".signatory", + "SortOrder": ".sort_order", + "SupportedBenefit": ".supported_benefit", + "SupportedBenefitTypedDict": ".supported_benefit", + "PossibleLiabilities": ".tax_liabilities_selections", + "PossibleLiabilitiesTypedDict": ".tax_liabilities_selections", + "TaxLiabilitiesSelections": ".tax_liabilities_selections", + "TaxLiabilitiesSelectionsTypedDict": ".tax_liabilities_selections", + "ApplicableIf": ".tax_requirement", + "ApplicableIfTypedDict": ".tax_requirement", + "TaxRequirement": ".tax_requirement", + "TaxRequirementApplicableIfValue": ".tax_requirement", + "TaxRequirementApplicableIfValueTypedDict": ".tax_requirement", + "TaxRequirementTypedDict": ".tax_requirement", + "TaxRequirementValue": ".tax_requirement", + "TaxRequirementValueTypedDict": ".tax_requirement", + "RateType": ".tax_requirement_metadata", + "TaxRequirementMetadata": ".tax_requirement_metadata", + "TaxRequirementMetadataOptions": ".tax_requirement_metadata", + "TaxRequirementMetadataOptionsTypedDict": ".tax_requirement_metadata", + "TaxRequirementMetadataType": ".tax_requirement_metadata", + "TaxRequirementMetadataTypedDict": ".tax_requirement_metadata", + "TaxRequirementMetadataValidationType": ".tax_requirement_metadata", + "TaxRequirementMetadataValue": ".tax_requirement_metadata", + "TaxRequirementMetadataValueTypedDict": ".tax_requirement_metadata", + "Validation": ".tax_requirement_metadata", + "ValidationTypedDict": ".tax_requirement_metadata", + "TaxRequirementSet": ".tax_requirement_set", + "TaxRequirementSetTypedDict": ".tax_requirement_set", + "TaxRequirementsState": ".tax_requirements_state", + "TaxRequirementsStateTypedDict": ".tax_requirements_state", + "Termination": ".termination", + "TerminationTypedDict": ".termination", + "TimeOffActivity": ".time_off_activity", + "TimeOffActivityTypedDict": ".time_off_activity", + "TimeOffType": ".time_off_activity", + "PolicyType": ".time_off_policy", + "TimeOffPolicy": ".time_off_policy", + "TimeOffPolicyEmployees": ".time_off_policy", + "TimeOffPolicyEmployeesTypedDict": ".time_off_policy", + "TimeOffPolicyTypedDict": ".time_off_policy", + "UnprocessableEntityErrorObject": ".unprocessable_entity_error_object", + "UnprocessableEntityErrorObjectData": ".unprocessable_entity_error_object", + "UnprocessedTerminationPayPeriod": ".unprocessed_termination_pay_period", + "UnprocessedTerminationPayPeriodTypedDict": ".unprocessed_termination_pay_period", + "VersionHeader": ".versionheader", + "SubscriptionTypes": ".webhook_subscription", + "WebhookSubscription": ".webhook_subscription", + "WebhookSubscriptionStatus": ".webhook_subscription", + "WebhookSubscriptionTypedDict": ".webhook_subscription", + "WebhooksHealthCheckStatus": ".webhooks_health_check_status", + "WebhooksHealthCheckStatusStatus": ".webhooks_health_check_status", + "WebhooksHealthCheckStatusTypedDict": ".webhooks_health_check_status", + "PaymentType": ".wire_in_request", + "WireInRequest": ".wire_in_request", + "WireInRequestStatus": ".wire_in_request", + "WireInRequestTypedDict": ".wire_in_request", + "YtdBenefitAmountsFromDifferentCompany": ".ytd_benefit_amounts_from_different_company", + "YtdBenefitAmountsFromDifferentCompanyTypedDict": ".ytd_benefit_amounts_from_different_company", +} + + +def dynamic_import(modname, retries=3): + for attempt in range(retries): + try: + return import_module(modname, __package__) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + +def __getattr__(attr_name: str) -> object: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError( + f"No {attr_name} found in _dynamic_imports for module name -> {__name__} " + ) + + try: + module = dynamic_import(module_name) + result = getattr(module, attr_name) + return result + except ImportError as e: + raise ImportError( + f"Failed to import {attr_name} from {module_name}: {e}" + ) from e + except AttributeError as e: + raise AttributeError( + f"Failed to get {attr_name} from {module_name}: {e}" + ) from e + + +def __dir__(): + lazy_attrs = builtins.list(_dynamic_imports.keys()) + return builtins.sorted(lazy_attrs) diff --git a/gusto_embedded/src/gusto_embedded/models/ach_transaction.py b/gusto_embedded/src/gusto_embedded/models/ach_transaction.py index 7fa5dbd8..0b8613d5 100644 --- a/gusto_embedded/src/gusto_embedded/models/ach_transaction.py +++ b/gusto_embedded/src/gusto_embedded/models/ach_transaction.py @@ -2,7 +2,14 @@ from __future__ import annotations from enum import Enum -from gusto_embedded.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -48,7 +55,7 @@ class AchTransactionTypedDict(TypedDict): r"""The type of payment event associated with the ACH transaction""" payment_event_uuid: NotRequired[str] r"""Unique identifier for the payment event associated with the ACH transaction""" - recipient_type: NotRequired[AchTransactionRecipientType] + recipient_type: NotRequired[Nullable[AchTransactionRecipientType]] r"""The type of recipient associated with the ACH transaction""" recipient_uuid: NotRequired[str] r"""Unique identifier for the recipient associated with the ACH transaction""" @@ -85,7 +92,7 @@ class AchTransaction(BaseModel): payment_event_uuid: Optional[str] = None r"""Unique identifier for the payment event associated with the ACH transaction""" - recipient_type: Optional[AchTransactionRecipientType] = None + recipient_type: OptionalNullable[AchTransactionRecipientType] = UNSET r"""The type of recipient associated with the ACH transaction""" recipient_uuid: Optional[str] = None @@ -114,3 +121,47 @@ class AchTransaction(BaseModel): description: Optional[str] = None r"""The description of the ACH transaction. Can be used to identify the ACH transaction on the recipient's bank statement.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "company_uuid", + "payment_event_type", + "payment_event_uuid", + "recipient_type", + "recipient_uuid", + "error_code", + "transaction_type", + "payment_status", + "payment_direction", + "payment_event_check_date", + "payment_date", + "amount", + "description", + ] + nullable_fields = ["recipient_type"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/admin.py b/gusto_embedded/src/gusto_embedded/models/admin.py index 11bf1b8c..51c6069b 100644 --- a/gusto_embedded/src/gusto_embedded/models/admin.py +++ b/gusto_embedded/src/gusto_embedded/models/admin.py @@ -12,7 +12,7 @@ class AdminTypedDict(TypedDict): uuid: str r"""The unique id of the admin.""" email: NotRequired[str] - r"""The email of the admin for Gusto's system. If the email matches an existing user, this will create an admin account for them.""" + r"""The email of the admin for Gusto's system.""" first_name: NotRequired[str] r"""The first name of the admin.""" last_name: NotRequired[str] @@ -26,7 +26,7 @@ class Admin(BaseModel): r"""The unique id of the admin.""" email: Optional[str] = None - r"""The email of the admin for Gusto's system. If the email matches an existing user, this will create an admin account for them.""" + r"""The email of the admin for Gusto's system.""" first_name: Optional[str] = None r"""The first name of the admin.""" diff --git a/gusto_embedded/src/gusto_embedded/models/apierror.py b/gusto_embedded/src/gusto_embedded/models/apierror.py index d4b6b02a..86358fbf 100644 --- a/gusto_embedded/src/gusto_embedded/models/apierror.py +++ b/gusto_embedded/src/gusto_embedded/models/apierror.py @@ -1,22 +1,40 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from dataclasses import dataclass -from typing import Optional import httpx +from typing import Optional +from dataclasses import dataclass + +from gusto_embedded.models import GustoError + +MAX_MESSAGE_LEN = 10_000 + + +@dataclass(unsafe_hash=True) +class APIError(GustoError): + """The fallback error class if no more specific error class is matched.""" + + def __init__( + self, message: str, raw_response: httpx.Response, body: Optional[str] = None + ): + body_display = body or raw_response.text or '""' + if message: + message += ": " + message += f"Status {raw_response.status_code}" -@dataclass -class APIError(Exception): - """Represents an error returned by the API.""" + headers = raw_response.headers + content_type = headers.get("content-type", '""') + if content_type != "application/json": + if " " in content_type: + content_type = f'"{content_type}"' + message += f" Content-Type {content_type}" - message: str - status_code: int = -1 - body: str = "" - raw_response: Optional[httpx.Response] = None + if len(body_display) > MAX_MESSAGE_LEN: + truncated = body_display[:MAX_MESSAGE_LEN] + remaining = len(body_display) - MAX_MESSAGE_LEN + body_display = f"{truncated}...and {remaining} more chars" - def __str__(self): - body = "" - if len(self.body) > 0: - body = f"\n{self.body}" + message += f". Body: {body_display}" + message = message.strip() - return f"{self.message}: Status {self.status_code}{body}" + super().__init__(message, raw_response, body) diff --git a/gusto_embedded/src/gusto_embedded/models/bls_occupation.py b/gusto_embedded/src/gusto_embedded/models/bls_occupation.py new file mode 100644 index 00000000..81758444 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/bls_occupation.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gusto_embedded.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class BLSOccupationTypedDict(TypedDict): + r"""A Bureau of Labor Statistics occupation code with its title and description, used for salary estimate calculations.""" + + code: str + r"""Bureau of Labor Statistics (BLS) occupation code.""" + title: str + r"""Occupation title.""" + description: NotRequired[str] + r"""Occupation description.""" + + +class BLSOccupation(BaseModel): + r"""A Bureau of Labor Statistics occupation code with its title and description, used for salary estimate calculations.""" + + code: str + r"""Bureau of Labor Statistics (BLS) occupation code.""" + + title: str + r"""Occupation title.""" + + description: Optional[str] = None + r"""Occupation description.""" diff --git a/gusto_embedded/src/gusto_embedded/models/company_address.py b/gusto_embedded/src/gusto_embedded/models/company_address.py index cabb5e3e..386a7c6f 100644 --- a/gusto_embedded/src/gusto_embedded/models/company_address.py +++ b/gusto_embedded/src/gusto_embedded/models/company_address.py @@ -22,7 +22,7 @@ class CompanyAddressTypedDict(TypedDict): state: NotRequired[str] zip: NotRequired[str] country: NotRequired[str] - active: NotRequired[bool] + inactive: NotRequired[bool] r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" @@ -41,7 +41,7 @@ class CompanyAddress(BaseModel): country: Optional[str] = "USA" - active: Optional[bool] = None + inactive: Optional[bool] = None r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" @model_serializer(mode="wrap") @@ -53,7 +53,7 @@ def serialize_model(self, handler): "state", "zip", "country", - "active", + "inactive", ] nullable_fields = ["street_2"] null_default_fields = [] diff --git a/gusto_embedded/src/gusto_embedded/models/company_bank_account_request.py b/gusto_embedded/src/gusto_embedded/models/company_bank_account_request.py new file mode 100644 index 00000000..a7a2f169 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/company_bank_account_request.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from typing_extensions import TypedDict + + +class CompanyBankAccountRequestAccountType(str, Enum): + r"""The bank account type""" + + CHECKING = "Checking" + SAVINGS = "Savings" + + +class CompanyBankAccountRequestTypedDict(TypedDict): + routing_number: str + r"""The bank routing number""" + account_number: str + r"""The bank account number""" + account_type: CompanyBankAccountRequestAccountType + r"""The bank account type""" + + +class CompanyBankAccountRequest(BaseModel): + routing_number: str + r"""The bank routing number""" + + account_number: str + r"""The bank account number""" + + account_type: CompanyBankAccountRequestAccountType + r"""The bank account type""" diff --git a/gusto_embedded/src/gusto_embedded/models/company_benefit_with_employee_benefits.py b/gusto_embedded/src/gusto_embedded/models/company_benefit_with_employee_benefits.py index 94921ca5..402555ee 100644 --- a/gusto_embedded/src/gusto_embedded/models/company_benefit_with_employee_benefits.py +++ b/gusto_embedded/src/gusto_embedded/models/company_benefit_with_employee_benefits.py @@ -28,11 +28,15 @@ class CompanyBenefitWithEmployeeBenefitsValueTiersTypedDict(TypedDict): rate: NotRequired[str] r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: NotRequired[str] - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + For example: + + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: NotRequired[str] r"""The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold.""" @@ -45,11 +49,15 @@ class CompanyBenefitWithEmployeeBenefitsValueTiers(BaseModel): r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: Optional[str] = None - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. + + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. + + For example: - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: Optional[str] = None diff --git a/gusto_embedded/src/gusto_embedded/models/company_custom_field.py b/gusto_embedded/src/gusto_embedded/models/company_custom_field.py index bfddfb62..6b7ac9e2 100644 --- a/gusto_embedded/src/gusto_embedded/models/company_custom_field.py +++ b/gusto_embedded/src/gusto_embedded/models/company_custom_field.py @@ -10,7 +10,7 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import List, Optional +from typing import List from typing_extensions import NotRequired, TypedDict @@ -23,7 +23,7 @@ class CompanyCustomFieldTypedDict(TypedDict): r"""Name of the company custom field""" type: CustomFieldType r"""Input type for the custom field.""" - description: NotRequired[str] + description: NotRequired[Nullable[str]] r"""Description of the company custom field""" selection_options: NotRequired[Nullable[List[str]]] r"""An array of options for fields of type radio. Otherwise, null.""" @@ -41,7 +41,7 @@ class CompanyCustomField(BaseModel): type: CustomFieldType r"""Input type for the custom field.""" - description: Optional[str] = None + description: OptionalNullable[str] = UNSET r"""Description of the company custom field""" selection_options: OptionalNullable[List[str]] = UNSET @@ -50,7 +50,7 @@ class CompanyCustomField(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = ["description", "selection_options"] - nullable_fields = ["selection_options"] + nullable_fields = ["description", "selection_options"] null_default_fields = [] serialized = handler(self) diff --git a/gusto_embedded/src/gusto_embedded/models/company_forms_sort_by.py b/gusto_embedded/src/gusto_embedded/models/company_forms_sort_by.py new file mode 100644 index 00000000..3f5f746b --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/company_forms_sort_by.py @@ -0,0 +1,12 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class CompanyFormsSortBy(str, Enum): + NAME = "name" + YEAR = "year" + QUARTER = "quarter" + DRAFT = "draft" + DOCUMENT_CONTENT_TYPE = "document_content_type" diff --git a/gusto_embedded/src/gusto_embedded/models/company_onboarding_status.py b/gusto_embedded/src/gusto_embedded/models/company_onboarding_status.py index 4f48dcaa..a3346f80 100644 --- a/gusto_embedded/src/gusto_embedded/models/company_onboarding_status.py +++ b/gusto_embedded/src/gusto_embedded/models/company_onboarding_status.py @@ -2,7 +2,14 @@ from __future__ import annotations from enum import Enum -from gusto_embedded.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -44,10 +51,12 @@ class OnboardingStepTypedDict(TypedDict): r"""The boolean flag indicating whether the step is required or optional""" completed: NotRequired[bool] r"""The boolean flag indicating whether the step is completed or not.""" + completed_at: NotRequired[Nullable[str]] + r"""The ISO 8601 timestamp indicating when the onboarding step was completed.""" skippable: NotRequired[bool] r"""The boolean flag indicating whether the step can be skipped or not.""" requirements: NotRequired[List[Requirements]] - r"""A list of onboarding step that are required to be completed in order to proceed with the current onboarding step.""" + r"""A list of onboarding steps that are required to be completed in order to proceed with the current onboarding step.""" class OnboardingStep(BaseModel): @@ -63,11 +72,52 @@ class OnboardingStep(BaseModel): completed: Optional[bool] = None r"""The boolean flag indicating whether the step is completed or not.""" + completed_at: OptionalNullable[str] = UNSET + r"""The ISO 8601 timestamp indicating when the onboarding step was completed.""" + skippable: Optional[bool] = None r"""The boolean flag indicating whether the step can be skipped or not.""" requirements: Optional[List[Requirements]] = None - r"""A list of onboarding step that are required to be completed in order to proceed with the current onboarding step.""" + r"""A list of onboarding steps that are required to be completed in order to proceed with the current onboarding step.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "title", + "id", + "required", + "completed", + "completed_at", + "skippable", + "requirements", + ] + nullable_fields = ["completed_at"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m class CompanyOnboardingStatusTypedDict(TypedDict): diff --git a/gusto_embedded/src/gusto_embedded/models/company_suspension.py b/gusto_embedded/src/gusto_embedded/models/company_suspension.py index a7d831de..fcbebf24 100644 --- a/gusto_embedded/src/gusto_embedded/models/company_suspension.py +++ b/gusto_embedded/src/gusto_embedded/models/company_suspension.py @@ -2,8 +2,15 @@ from __future__ import annotations from enum import Enum -from gusto_embedded.types import BaseModel -from typing import Optional +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -15,11 +22,6 @@ class ReconcileTaxMethod(str, Enum): class TaxRefundsTypedDict(TypedDict): - r"""Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid - by Gusto, depending on the value in `reconcile_tax_method`. - - """ - amount: NotRequired[str] r"""Dollar amount.""" description: NotRequired[str] @@ -27,11 +29,6 @@ class TaxRefundsTypedDict(TypedDict): class TaxRefunds(BaseModel): - r"""Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid - by Gusto, depending on the value in `reconcile_tax_method`. - - """ - amount: Optional[str] = None r"""Dollar amount.""" @@ -48,27 +45,24 @@ class CompanySuspensionTypedDict(TypedDict): r"""Unique identifier for the company which is suspended.""" effective_date: NotRequired[str] r"""Date that the suspension took effect.""" - leaving_for: NotRequired[str] + leaving_for: NotRequired[Nullable[str]] r"""Which competitor the company is joining instead. Only required if `reason` is `'switching_provider'`.""" reason: NotRequired[str] r"""Explanation for why the company's account was suspended.""" reconcile_tax_method: NotRequired[ReconcileTaxMethod] r"""How Gusto will handle taxes already collected.""" file_quarterly_forms: NotRequired[bool] - r"""Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company - is suspending their account, and how taxes are being reconciled. + r"""Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. """ file_yearly_forms: NotRequired[bool] - r"""Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company - is suspending their account, and how taxes are being reconciled. + r"""Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. """ - comments: NotRequired[str] - r"""User-supplied comments describing why then are suspending their account.""" - tax_refunds: NotRequired[TaxRefundsTypedDict] - r"""Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid - by Gusto, depending on the value in `reconcile_tax_method`. + comments: NotRequired[Nullable[str]] + r"""User-supplied comments describing why they are suspending their account.""" + tax_refunds: NotRequired[List[TaxRefundsTypedDict]] + r"""Describes the taxes which are refundable to the company for this suspension. These may be refunded or paid by Gusto depending on the value in `reconcile_tax_method`. """ @@ -85,7 +79,7 @@ class CompanySuspension(BaseModel): effective_date: Optional[str] = None r"""Date that the suspension took effect.""" - leaving_for: Optional[str] = None + leaving_for: OptionalNullable[str] = UNSET r"""Which competitor the company is joining instead. Only required if `reason` is `'switching_provider'`.""" reason: Optional[str] = None @@ -95,22 +89,60 @@ class CompanySuspension(BaseModel): r"""How Gusto will handle taxes already collected.""" file_quarterly_forms: Optional[bool] = None - r"""Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company - is suspending their account, and how taxes are being reconciled. + r"""Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. """ file_yearly_forms: Optional[bool] = None - r"""Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company - is suspending their account, and how taxes are being reconciled. + r"""Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. """ - comments: Optional[str] = None - r"""User-supplied comments describing why then are suspending their account.""" + comments: OptionalNullable[str] = UNSET + r"""User-supplied comments describing why they are suspending their account.""" - tax_refunds: Optional[TaxRefunds] = None - r"""Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid - by Gusto, depending on the value in `reconcile_tax_method`. + tax_refunds: Optional[List[TaxRefunds]] = None + r"""Describes the taxes which are refundable to the company for this suspension. These may be refunded or paid by Gusto depending on the value in `reconcile_tax_method`. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "uuid", + "company_uuid", + "effective_date", + "leaving_for", + "reason", + "reconcile_tax_method", + "file_quarterly_forms", + "file_yearly_forms", + "comments", + "tax_refunds", + ] + nullable_fields = ["leaving_for", "comments"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/company_suspension_creation_errors_error.py b/gusto_embedded/src/gusto_embedded/models/company_suspension_creation_errors_error.py new file mode 100644 index 00000000..e56c645e --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/company_suspension_creation_errors_error.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .entity_error_object import EntityErrorObject +from dataclasses import dataclass, field +from gusto_embedded.models import GustoError +from gusto_embedded.types import BaseModel +import httpx +from typing import List, Optional + + +class CompanySuspensionCreationErrorsErrorData(BaseModel): + errors: List[EntityErrorObject] + + +@dataclass(unsafe_hash=True) +class CompanySuspensionCreationErrorsError(GustoError): + r"""Unprocessable Entity + + This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. + + """ + + data: CompanySuspensionCreationErrorsErrorData = field(hash=False) + + def __init__( + self, + data: CompanySuspensionCreationErrorsErrorData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/gusto_embedded/src/gusto_embedded/models/contractor.py b/gusto_embedded/src/gusto_embedded/models/contractor.py index b19b80c4..96186df4 100644 --- a/gusto_embedded/src/gusto_embedded/models/contractor.py +++ b/gusto_embedded/src/gusto_embedded/models/contractor.py @@ -139,7 +139,7 @@ class ContractorTypedDict(TypedDict): r"""The contractor’s home address.""" hourly_rate: NotRequired[str] r"""The contractor’s hourly rate. This attribute is required if the wage_type is “Hourly”.""" - file_new_hire_report: NotRequired[bool] + file_new_hire_report: NotRequired[Nullable[bool]] r"""The boolean flag indicating whether Gusto will file a new hire report for the contractor""" work_state: NotRequired[Nullable[str]] r"""State where the contractor will be conducting the majority of their work for the company. @@ -153,6 +153,10 @@ class ContractorTypedDict(TypedDict): r"""The contractor's payment method.""" has_ssn: NotRequired[bool] r"""Indicates whether the contractor has an SSN in Gusto.""" + department: NotRequired[Nullable[str]] + r"""The contractor's department in the company.""" + dismissal_date: NotRequired[Nullable[str]] + r"""The contractor's dismissal date.""" department_uuid: NotRequired[Nullable[str]] r"""The UUID of the department the contractor is under""" @@ -208,7 +212,7 @@ class Contractor(BaseModel): hourly_rate: Optional[str] = None r"""The contractor’s hourly rate. This attribute is required if the wage_type is “Hourly”.""" - file_new_hire_report: Optional[bool] = False + file_new_hire_report: OptionalNullable[bool] = UNSET r"""The boolean flag indicating whether Gusto will file a new hire report for the contractor""" work_state: OptionalNullable[str] = UNSET @@ -228,6 +232,12 @@ class Contractor(BaseModel): has_ssn: Optional[bool] = None r"""Indicates whether the contractor has an SSN in Gusto.""" + department: OptionalNullable[str] = UNSET + r"""The contractor's department in the company.""" + + dismissal_date: OptionalNullable[str] = UNSET + r"""The contractor's dismissal date.""" + department_uuid: OptionalNullable[str] = UNSET r"""The UUID of the department the contractor is under""" @@ -255,6 +265,8 @@ def serialize_model(self, handler): "onboarding_status", "payment_method", "has_ssn", + "department", + "dismissal_date", "department_uuid", ] nullable_fields = [ @@ -266,8 +278,11 @@ def serialize_model(self, handler): "has_ein", "email", "address", + "file_new_hire_report", "work_state", "payment_method", + "department", + "dismissal_date", "department_uuid", ] null_default_fields = [] diff --git a/gusto_embedded/src/gusto_embedded/models/contractor_address.py b/gusto_embedded/src/gusto_embedded/models/contractor_address.py index ab7f7bad..ef994494 100644 --- a/gusto_embedded/src/gusto_embedded/models/contractor_address.py +++ b/gusto_embedded/src/gusto_embedded/models/contractor_address.py @@ -16,12 +16,12 @@ class ContractorAddressTypedDict(TypedDict): version: NotRequired[str] r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" - street_1: NotRequired[str] + street_1: NotRequired[Nullable[str]] street_2: NotRequired[Nullable[str]] - city: NotRequired[str] - state: NotRequired[str] - zip: NotRequired[str] - country: NotRequired[str] + city: NotRequired[Nullable[str]] + state: NotRequired[Nullable[str]] + zip: NotRequired[Nullable[str]] + country: NotRequired[Nullable[str]] active: NotRequired[bool] r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" contractor_uuid: NotRequired[str] @@ -32,17 +32,17 @@ class ContractorAddress(BaseModel): version: Optional[str] = None r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" - street_1: Optional[str] = None + street_1: OptionalNullable[str] = UNSET street_2: OptionalNullable[str] = UNSET - city: Optional[str] = None + city: OptionalNullable[str] = UNSET - state: Optional[str] = None + state: OptionalNullable[str] = UNSET - zip: Optional[str] = None + zip: OptionalNullable[str] = UNSET - country: Optional[str] = "USA" + country: OptionalNullable[str] = "USA" active: Optional[bool] = None r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" @@ -63,7 +63,7 @@ def serialize_model(self, handler): "active", "contractor_uuid", ] - nullable_fields = ["street_2"] + nullable_fields = ["street_1", "street_2", "city", "state", "zip", "country"] null_default_fields = [] serialized = handler(self) diff --git a/gusto_embedded/src/gusto_embedded/models/contractor_onboarding_status.py b/gusto_embedded/src/gusto_embedded/models/contractor_onboarding_status.py index b361b8e3..a2c7087f 100644 --- a/gusto_embedded/src/gusto_embedded/models/contractor_onboarding_status.py +++ b/gusto_embedded/src/gusto_embedded/models/contractor_onboarding_status.py @@ -13,6 +13,10 @@ class ContractorOnboardingStatusOnboardingStatus(str, Enum): ONBOARDING_COMPLETED = "onboarding_completed" ADMIN_ONBOARDING_REVIEW = "admin_onboarding_review" ADMIN_ONBOARDING_INCOMPLETE = "admin_onboarding_incomplete" + SELF_ONBOARDING_NOT_INVITED = "self_onboarding_not_invited" + SELF_ONBOARDING_INVITED = "self_onboarding_invited" + SELF_ONBOARDING_STARTED = "self_onboarding_started" + SELF_ONBOARDING_REVIEW = "self_onboarding_review" class ContractorOnboardingStatusOnboardingStepTypedDict(TypedDict): diff --git a/gusto_embedded/src/gusto_embedded/models/contractor_payment_details_list.py b/gusto_embedded/src/gusto_embedded/models/contractor_payment_details_list.py new file mode 100644 index 00000000..3fd19634 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/contractor_payment_details_list.py @@ -0,0 +1,162 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class ContractorPaymentDetailsListPaymentMethod(str, Enum): + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class ContractorPaymentDetailsListSplitBy(str, Enum): + r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + + AMOUNT = "Amount" + PERCENTAGE = "Percentage" + + +class SplitsTypedDict(TypedDict): + bank_account_uuid: NotRequired[str] + name: NotRequired[str] + hidden_account_number: NotRequired[str] + r"""An obfuscated version of the account number which can be used for display purposes.""" + encrypted_account_number: NotRequired[Nullable[str]] + r"""Ciphertext containing the full bank account number, which must be decrypted using a key provided by Gusto. Only visible with the `contractor_payment_methods:read:account_number` scope.""" + routing_number: NotRequired[str] + priority: NotRequired[int] + r"""The order of priority for each payment split, with priority 1 being the first bank account paid. Priority must be unique and sequential.""" + split_amount: NotRequired[float] + account_type: NotRequired[str] + + +class Splits(BaseModel): + bank_account_uuid: Optional[str] = None + + name: Optional[str] = None + + hidden_account_number: Optional[str] = None + r"""An obfuscated version of the account number which can be used for display purposes.""" + + encrypted_account_number: OptionalNullable[str] = UNSET + r"""Ciphertext containing the full bank account number, which must be decrypted using a key provided by Gusto. Only visible with the `contractor_payment_methods:read:account_number` scope.""" + + routing_number: Optional[str] = None + + priority: Optional[int] = None + r"""The order of priority for each payment split, with priority 1 being the first bank account paid. Priority must be unique and sequential.""" + + split_amount: Optional[float] = None + + account_type: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "bank_account_uuid", + "name", + "hidden_account_number", + "encrypted_account_number", + "routing_number", + "priority", + "split_amount", + "account_type", + ] + nullable_fields = ["encrypted_account_number"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class ContractorPaymentDetailsListTypedDict(TypedDict): + contractor_uuid: NotRequired[str] + payment_method: NotRequired[ContractorPaymentDetailsListPaymentMethod] + first_name: NotRequired[str] + last_name: NotRequired[str] + split_by: NotRequired[Nullable[ContractorPaymentDetailsListSplitBy]] + r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + splits: NotRequired[Nullable[List[SplitsTypedDict]]] + + +class ContractorPaymentDetailsList(BaseModel): + contractor_uuid: Optional[str] = None + + payment_method: Optional[ContractorPaymentDetailsListPaymentMethod] = None + + first_name: Optional[str] = None + + last_name: Optional[str] = None + + split_by: OptionalNullable[ContractorPaymentDetailsListSplitBy] = UNSET + r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + + splits: OptionalNullable[List[Splits]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "contractor_uuid", + "payment_method", + "first_name", + "last_name", + "split_by", + "splits", + ] + nullable_fields = ["split_by", "splits"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_app_int/src/gusto_app_integration/models/contractor_payment_for_group.py b/gusto_embedded/src/gusto_embedded/models/contractor_payment_for_group_preview.py similarity index 56% rename from gusto_app_int/src/gusto_app_integration/models/contractor_payment_for_group.py rename to gusto_embedded/src/gusto_embedded/models/contractor_payment_for_group_preview.py index f37709a9..510a5099 100644 --- a/gusto_app_int/src/gusto_app_integration/models/contractor_payment_for_group.py +++ b/gusto_embedded/src/gusto_embedded/models/contractor_payment_for_group_preview.py @@ -2,12 +2,19 @@ from __future__ import annotations from enum import Enum -from gusto_app_integration.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict -class ContractorPaymentForGroupPaymentMethod(str, Enum): +class ContractorPaymentForGroupPreviewPaymentMethod(str, Enum): r"""The payment method.""" DIRECT_DEPOSIT = "Direct Deposit" @@ -16,24 +23,24 @@ class ContractorPaymentForGroupPaymentMethod(str, Enum): CORRECTION_PAYMENT = "Correction Payment" -class ContractorPaymentForGroupStatus(str, Enum): +class ContractorPaymentForGroupPreviewStatus(str, Enum): r"""The status of the contractor payment. Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`.""" FUNDED = "Funded" UNFUNDED = "Unfunded" -class ContractorPaymentForGroupWageType(str, Enum): +class ContractorPaymentForGroupPreviewWageType(str, Enum): r"""The wage type for the payment.""" HOURLY = "Hourly" FIXED = "Fixed" -class ContractorPaymentForGroupTypedDict(TypedDict): - r"""The representation of a single contractor payment.""" +class ContractorPaymentForGroupPreviewTypedDict(TypedDict): + r"""Preview representation of a single contractor payment with nullable uuid.""" - uuid: NotRequired[str] + uuid: NotRequired[Nullable[str]] r"""The unique identifier of the contractor payment in Gusto.""" contractor_uuid: NotRequired[str] r"""The UUID of the contractor.""" @@ -41,11 +48,11 @@ class ContractorPaymentForGroupTypedDict(TypedDict): r"""The bonus amount in the payment.""" hours: NotRequired[str] r"""The number of hours worked for the payment.""" - payment_method: NotRequired[ContractorPaymentForGroupPaymentMethod] + payment_method: NotRequired[ContractorPaymentForGroupPreviewPaymentMethod] r"""The payment method.""" reimbursement: NotRequired[str] r"""The reimbursement amount in the payment.""" - status: NotRequired[ContractorPaymentForGroupStatus] + status: NotRequired[ContractorPaymentForGroupPreviewStatus] r"""The status of the contractor payment. Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`.""" hourly_rate: NotRequired[str] r"""The rate per hour worked for the payment.""" @@ -53,16 +60,16 @@ class ContractorPaymentForGroupTypedDict(TypedDict): r"""Determine if the contractor payment can be cancelled.""" wage: NotRequired[str] r"""The fixed wage of the payment, regardless of hours worked.""" - wage_type: NotRequired[ContractorPaymentForGroupWageType] + wage_type: NotRequired[ContractorPaymentForGroupPreviewWageType] r"""The wage type for the payment.""" wage_total: NotRequired[str] r"""(hours * hourly_rate) + wage + bonus""" -class ContractorPaymentForGroup(BaseModel): - r"""The representation of a single contractor payment.""" +class ContractorPaymentForGroupPreview(BaseModel): + r"""Preview representation of a single contractor payment with nullable uuid.""" - uuid: Optional[str] = None + uuid: OptionalNullable[str] = UNSET r"""The unique identifier of the contractor payment in Gusto.""" contractor_uuid: Optional[str] = None @@ -74,13 +81,13 @@ class ContractorPaymentForGroup(BaseModel): hours: Optional[str] = None r"""The number of hours worked for the payment.""" - payment_method: Optional[ContractorPaymentForGroupPaymentMethod] = None + payment_method: Optional[ContractorPaymentForGroupPreviewPaymentMethod] = None r"""The payment method.""" reimbursement: Optional[str] = None r"""The reimbursement amount in the payment.""" - status: Optional[ContractorPaymentForGroupStatus] = None + status: Optional[ContractorPaymentForGroupPreviewStatus] = None r"""The status of the contractor payment. Will transition to `Funded` during payments processing if the payment should be funded, i.e. has `Direct Deposit` for payment method. Contractors payments with `Check` payment method will remain `Unfunded`.""" hourly_rate: Optional[str] = None @@ -92,8 +99,51 @@ class ContractorPaymentForGroup(BaseModel): wage: Optional[str] = None r"""The fixed wage of the payment, regardless of hours worked.""" - wage_type: Optional[ContractorPaymentForGroupWageType] = None + wage_type: Optional[ContractorPaymentForGroupPreviewWageType] = None r"""The wage type for the payment.""" wage_total: Optional[str] = None r"""(hours * hourly_rate) + wage + bonus""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "uuid", + "contractor_uuid", + "bonus", + "hours", + "payment_method", + "reimbursement", + "status", + "hourly_rate", + "may_cancel", + "wage", + "wage_type", + "wage_total", + ] + nullable_fields = ["uuid"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/contractor_payment_group.py b/gusto_embedded/src/gusto_embedded/models/contractor_payment_group.py index 9d2ec307..ef2a82e5 100644 --- a/gusto_embedded/src/gusto_embedded/models/contractor_payment_group.py +++ b/gusto_embedded/src/gusto_embedded/models/contractor_payment_group.py @@ -5,6 +5,14 @@ ContractorPaymentForGroup, ContractorPaymentForGroupTypedDict, ) +from .payroll_credit_blockers_type import ( + PayrollCreditBlockersType, + PayrollCreditBlockersTypeTypedDict, +) +from .payroll_submission_blockers_type import ( + PayrollSubmissionBlockersType, + PayrollSubmissionBlockersTypeTypedDict, +) from enum import Enum from gusto_embedded.types import ( BaseModel, @@ -34,6 +42,8 @@ class ContractorPaymentGroupTotalsTypedDict(TypedDict): r"""The total wage amount for the group of contractor payments.""" reimbursement_amount: NotRequired[str] r"""The total reimbursement amount for the group of contractor payments.""" + check_amount: NotRequired[str] + r"""The total check amount for the group of contractor payments.""" class ContractorPaymentGroupTotals(BaseModel): @@ -49,6 +59,9 @@ class ContractorPaymentGroupTotals(BaseModel): reimbursement_amount: Optional[str] = None r"""The total reimbursement amount for the group of contractor payments.""" + check_amount: Optional[str] = None + r"""The total check amount for the group of contractor payments.""" + class ContractorPaymentGroupTypedDict(TypedDict): r"""The full contractor payment group, including associated contractor payments.""" @@ -65,6 +78,12 @@ class ContractorPaymentGroupTypedDict(TypedDict): r"""The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method.""" creation_token: NotRequired[Nullable[str]] r"""Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token.""" + partner_owned_disbursement: NotRequired[Nullable[bool]] + r"""Whether the disbursement is partner owned.""" + submission_blockers: NotRequired[List[List[PayrollSubmissionBlockersTypeTypedDict]]] + r"""List of submission blockers for the contractor payment group.""" + credit_blockers: NotRequired[List[List[PayrollCreditBlockersTypeTypedDict]]] + r"""List of credit blockers for the contractor payment group.""" totals: NotRequired[ContractorPaymentGroupTotalsTypedDict] contractor_payments: NotRequired[List[ContractorPaymentForGroupTypedDict]] @@ -90,6 +109,15 @@ class ContractorPaymentGroup(BaseModel): creation_token: OptionalNullable[str] = UNSET r"""Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token.""" + partner_owned_disbursement: OptionalNullable[bool] = UNSET + r"""Whether the disbursement is partner owned.""" + + submission_blockers: Optional[List[List[PayrollSubmissionBlockersType]]] = None + r"""List of submission blockers for the contractor payment group.""" + + credit_blockers: Optional[List[List[PayrollCreditBlockersType]]] = None + r"""List of credit blockers for the contractor payment group.""" + totals: Optional[ContractorPaymentGroupTotals] = None contractor_payments: Optional[List[ContractorPaymentForGroup]] = None @@ -103,10 +131,13 @@ def serialize_model(self, handler): "debit_date", "status", "creation_token", + "partner_owned_disbursement", + "submission_blockers", + "credit_blockers", "totals", "contractor_payments", ] - nullable_fields = ["creation_token"] + nullable_fields = ["creation_token", "partner_owned_disbursement"] null_default_fields = [] serialized = handler(self) diff --git a/gusto_embedded/src/gusto_embedded/models/contractor_payment_group_partner_disbursements.py b/gusto_embedded/src/gusto_embedded/models/contractor_payment_group_partner_disbursements.py new file mode 100644 index 00000000..e3e72c62 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/contractor_payment_group_partner_disbursements.py @@ -0,0 +1,71 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class ContractorPaymentGroupPartnerDisbursementsPaymentMethod(str, Enum): + r"""The payment method for the disbursement""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class ContractorPaymentGroupPartnerDisbursementsPaymentStatus(str, Enum): + r"""The status of the payment""" + + PENDING = "Pending" + PAID = "Paid" + NOT_PARTNER_MANAGED = "Not partner managed" + CONVERTED_TO_CHECK = "Converted to check" + + +class DisbursementsTypedDict(TypedDict): + contractor_payment_uuid: NotRequired[str] + r"""The UUID of the contractor payment""" + contractor_uuid: NotRequired[str] + r"""The UUID of the contractor""" + payment_method: NotRequired[ContractorPaymentGroupPartnerDisbursementsPaymentMethod] + r"""The payment method for the disbursement""" + payment_status: NotRequired[ContractorPaymentGroupPartnerDisbursementsPaymentStatus] + r"""The status of the payment""" + + +class Disbursements(BaseModel): + contractor_payment_uuid: Optional[str] = None + r"""The UUID of the contractor payment""" + + contractor_uuid: Optional[str] = None + r"""The UUID of the contractor""" + + payment_method: Optional[ + ContractorPaymentGroupPartnerDisbursementsPaymentMethod + ] = None + r"""The payment method for the disbursement""" + + payment_status: Optional[ + ContractorPaymentGroupPartnerDisbursementsPaymentStatus + ] = None + r"""The status of the payment""" + + +class ContractorPaymentGroupPartnerDisbursementsTypedDict(TypedDict): + r"""Partner disbursements for a contractor payment group""" + + contractor_payment_group_uuid: NotRequired[str] + r"""The UUID of the contractor payment group""" + disbursements: NotRequired[List[DisbursementsTypedDict]] + r"""List of disbursements for the contractor payment group""" + + +class ContractorPaymentGroupPartnerDisbursements(BaseModel): + r"""Partner disbursements for a contractor payment group""" + + contractor_payment_group_uuid: Optional[str] = None + r"""The UUID of the contractor payment group""" + + disbursements: Optional[List[Disbursements]] = None + r"""List of disbursements for the contractor payment group""" diff --git a/gusto_app_int/src/gusto_app_integration/models/contractor_payment_group.py b/gusto_embedded/src/gusto_embedded/models/contractor_payment_group_preview.py similarity index 65% rename from gusto_app_int/src/gusto_app_integration/models/contractor_payment_group.py rename to gusto_embedded/src/gusto_embedded/models/contractor_payment_group_preview.py index af642fd1..e9aff238 100644 --- a/gusto_app_int/src/gusto_app_integration/models/contractor_payment_group.py +++ b/gusto_embedded/src/gusto_embedded/models/contractor_payment_group_preview.py @@ -1,12 +1,20 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .contractor_payment_for_group import ( - ContractorPaymentForGroup, - ContractorPaymentForGroupTypedDict, +from .contractor_payment_for_group_preview import ( + ContractorPaymentForGroupPreview, + ContractorPaymentForGroupPreviewTypedDict, +) +from .payroll_credit_blockers_type import ( + PayrollCreditBlockersType, + PayrollCreditBlockersTypeTypedDict, +) +from .payroll_submission_blockers_type import ( + PayrollSubmissionBlockersType, + PayrollSubmissionBlockersTypeTypedDict, ) from enum import Enum -from gusto_app_integration.types import ( +from gusto_embedded.types import ( BaseModel, Nullable, OptionalNullable, @@ -18,14 +26,14 @@ from typing_extensions import NotRequired, TypedDict -class ContractorPaymentGroupStatus(str, Enum): +class ContractorPaymentGroupPreviewStatus(str, Enum): r"""The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method.""" UNFUNDED = "Unfunded" FUNDED = "Funded" -class ContractorPaymentGroupTotalsTypedDict(TypedDict): +class ContractorPaymentGroupPreviewTotalsTypedDict(TypedDict): amount: NotRequired[str] r"""The total amount for the group of contractor payments.""" debit_amount: NotRequired[str] @@ -34,9 +42,11 @@ class ContractorPaymentGroupTotalsTypedDict(TypedDict): r"""The total wage amount for the group of contractor payments.""" reimbursement_amount: NotRequired[str] r"""The total reimbursement amount for the group of contractor payments.""" + check_amount: NotRequired[str] + r"""The total check amount for the group of contractor payments.""" -class ContractorPaymentGroupTotals(BaseModel): +class ContractorPaymentGroupPreviewTotals(BaseModel): amount: Optional[str] = None r"""The total amount for the group of contractor payments.""" @@ -49,11 +59,14 @@ class ContractorPaymentGroupTotals(BaseModel): reimbursement_amount: Optional[str] = None r"""The total reimbursement amount for the group of contractor payments.""" + check_amount: Optional[str] = None + r"""The total check amount for the group of contractor payments.""" + -class ContractorPaymentGroupTypedDict(TypedDict): - r"""The full contractor payment group, including associated contractor payments.""" +class ContractorPaymentGroupPreviewTypedDict(TypedDict): + r"""Preview of a contractor payment group""" - uuid: NotRequired[str] + uuid: NotRequired[Nullable[str]] r"""The unique identifier of the contractor payment group.""" company_uuid: NotRequired[str] r"""The UUID of the company.""" @@ -61,18 +74,24 @@ class ContractorPaymentGroupTypedDict(TypedDict): r"""The check date of the contractor payment group.""" debit_date: NotRequired[str] r"""The debit date of the contractor payment group.""" - status: NotRequired[ContractorPaymentGroupStatus] + status: NotRequired[ContractorPaymentGroupPreviewStatus] r"""The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method.""" creation_token: NotRequired[Nullable[str]] r"""Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token.""" - totals: NotRequired[ContractorPaymentGroupTotalsTypedDict] - contractor_payments: NotRequired[List[ContractorPaymentForGroupTypedDict]] + partner_owned_disbursement: NotRequired[Nullable[bool]] + r"""Whether the disbursement is partner owned.""" + submission_blockers: NotRequired[List[List[PayrollSubmissionBlockersTypeTypedDict]]] + r"""List of submission blockers for the contractor payment group.""" + credit_blockers: NotRequired[List[List[PayrollCreditBlockersTypeTypedDict]]] + r"""List of credit blockers for the contractor payment group.""" + totals: NotRequired[ContractorPaymentGroupPreviewTotalsTypedDict] + contractor_payments: NotRequired[List[ContractorPaymentForGroupPreviewTypedDict]] -class ContractorPaymentGroup(BaseModel): - r"""The full contractor payment group, including associated contractor payments.""" +class ContractorPaymentGroupPreview(BaseModel): + r"""Preview of a contractor payment group""" - uuid: Optional[str] = None + uuid: OptionalNullable[str] = UNSET r"""The unique identifier of the contractor payment group.""" company_uuid: Optional[str] = None @@ -84,15 +103,24 @@ class ContractorPaymentGroup(BaseModel): debit_date: Optional[str] = None r"""The debit date of the contractor payment group.""" - status: Optional[ContractorPaymentGroupStatus] = None + status: Optional[ContractorPaymentGroupPreviewStatus] = None r"""The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method.""" creation_token: OptionalNullable[str] = UNSET r"""Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token.""" - totals: Optional[ContractorPaymentGroupTotals] = None + partner_owned_disbursement: OptionalNullable[bool] = UNSET + r"""Whether the disbursement is partner owned.""" + + submission_blockers: Optional[List[List[PayrollSubmissionBlockersType]]] = None + r"""List of submission blockers for the contractor payment group.""" + + credit_blockers: Optional[List[List[PayrollCreditBlockersType]]] = None + r"""List of credit blockers for the contractor payment group.""" + + totals: Optional[ContractorPaymentGroupPreviewTotals] = None - contractor_payments: Optional[List[ContractorPaymentForGroup]] = None + contractor_payments: Optional[List[ContractorPaymentForGroupPreview]] = None @model_serializer(mode="wrap") def serialize_model(self, handler): @@ -103,10 +131,13 @@ def serialize_model(self, handler): "debit_date", "status", "creation_token", + "partner_owned_disbursement", + "submission_blockers", + "credit_blockers", "totals", "contractor_payments", ] - nullable_fields = ["creation_token"] + nullable_fields = ["uuid", "creation_token", "partner_owned_disbursement"] null_default_fields = [] serialized = handler(self) diff --git a/gusto_embedded/src/gusto_embedded/models/contractor_payment_group_minimal.py b/gusto_embedded/src/gusto_embedded/models/contractor_payment_group_with_blockers.py similarity index 65% rename from gusto_embedded/src/gusto_embedded/models/contractor_payment_group_minimal.py rename to gusto_embedded/src/gusto_embedded/models/contractor_payment_group_with_blockers.py index 83b2f3a3..a8dcc982 100644 --- a/gusto_embedded/src/gusto_embedded/models/contractor_payment_group_minimal.py +++ b/gusto_embedded/src/gusto_embedded/models/contractor_payment_group_with_blockers.py @@ -1,6 +1,14 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .payroll_credit_blockers_type import ( + PayrollCreditBlockersType, + PayrollCreditBlockersTypeTypedDict, +) +from .payroll_submission_blockers_type import ( + PayrollSubmissionBlockersType, + PayrollSubmissionBlockersTypeTypedDict, +) from enum import Enum from gusto_embedded.types import ( BaseModel, @@ -10,18 +18,18 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import Optional +from typing import List, Optional from typing_extensions import NotRequired, TypedDict -class ContractorPaymentGroupMinimalStatus(str, Enum): +class ContractorPaymentGroupWithBlockersStatus(str, Enum): r"""The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method.""" UNFUNDED = "Unfunded" FUNDED = "Funded" -class ContractorPaymentGroupMinimalTotalsTypedDict(TypedDict): +class ContractorPaymentGroupWithBlockersTotalsTypedDict(TypedDict): amount: NotRequired[str] r"""The total amount for the group of contractor payments.""" debit_amount: NotRequired[str] @@ -30,9 +38,11 @@ class ContractorPaymentGroupMinimalTotalsTypedDict(TypedDict): r"""The total wage amount for the group of contractor payments.""" reimbursement_amount: NotRequired[str] r"""The total reimbursement amount for the group of contractor payments.""" + check_amount: NotRequired[str] + r"""The total check amount for the group of contractor payments.""" -class ContractorPaymentGroupMinimalTotals(BaseModel): +class ContractorPaymentGroupWithBlockersTotals(BaseModel): amount: Optional[str] = None r"""The total amount for the group of contractor payments.""" @@ -45,9 +55,12 @@ class ContractorPaymentGroupMinimalTotals(BaseModel): reimbursement_amount: Optional[str] = None r"""The total reimbursement amount for the group of contractor payments.""" + check_amount: Optional[str] = None + r"""The total check amount for the group of contractor payments.""" + -class ContractorPaymentGroupMinimalTypedDict(TypedDict): - r"""The summary of a contractor payment group.""" +class ContractorPaymentGroupWithBlockersTypedDict(TypedDict): + r"""Contractor payment group with submission and credit blockers, but without individual contractor payments.""" uuid: NotRequired[str] r"""The unique identifier of the contractor payment group.""" @@ -57,15 +70,21 @@ class ContractorPaymentGroupMinimalTypedDict(TypedDict): r"""The check date of the contractor payment group.""" debit_date: NotRequired[str] r"""The debit date of the contractor payment group.""" - status: NotRequired[ContractorPaymentGroupMinimalStatus] + status: NotRequired[ContractorPaymentGroupWithBlockersStatus] r"""The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method.""" creation_token: NotRequired[Nullable[str]] r"""Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token.""" - totals: NotRequired[ContractorPaymentGroupMinimalTotalsTypedDict] + partner_owned_disbursement: NotRequired[Nullable[bool]] + r"""Whether the disbursement is partner owned.""" + submission_blockers: NotRequired[List[List[PayrollSubmissionBlockersTypeTypedDict]]] + r"""List of submission blockers for the contractor payment group.""" + credit_blockers: NotRequired[List[List[PayrollCreditBlockersTypeTypedDict]]] + r"""List of credit blockers for the contractor payment group.""" + totals: NotRequired[ContractorPaymentGroupWithBlockersTotalsTypedDict] -class ContractorPaymentGroupMinimal(BaseModel): - r"""The summary of a contractor payment group.""" +class ContractorPaymentGroupWithBlockers(BaseModel): + r"""Contractor payment group with submission and credit blockers, but without individual contractor payments.""" uuid: Optional[str] = None r"""The unique identifier of the contractor payment group.""" @@ -79,13 +98,22 @@ class ContractorPaymentGroupMinimal(BaseModel): debit_date: Optional[str] = None r"""The debit date of the contractor payment group.""" - status: Optional[ContractorPaymentGroupMinimalStatus] = None + status: Optional[ContractorPaymentGroupWithBlockersStatus] = None r"""The status of the contractor payment group. Will be `Funded` if all payments that should be funded (i.e. have `Direct Deposit` for payment method) are funded. A group can have status `Funded` while having associated payments that have status `Unfunded`, i.e. payment with `Check` payment method.""" creation_token: OptionalNullable[str] = UNSET r"""Token used to make contractor payment group creation idempotent. Will error if attempting to create a group with a duplicate token.""" - totals: Optional[ContractorPaymentGroupMinimalTotals] = None + partner_owned_disbursement: OptionalNullable[bool] = UNSET + r"""Whether the disbursement is partner owned.""" + + submission_blockers: Optional[List[List[PayrollSubmissionBlockersType]]] = None + r"""List of submission blockers for the contractor payment group.""" + + credit_blockers: Optional[List[List[PayrollCreditBlockersType]]] = None + r"""List of credit blockers for the contractor payment group.""" + + totals: Optional[ContractorPaymentGroupWithBlockersTotals] = None @model_serializer(mode="wrap") def serialize_model(self, handler): @@ -96,9 +124,12 @@ def serialize_model(self, handler): "debit_date", "status", "creation_token", + "partner_owned_disbursement", + "submission_blockers", + "credit_blockers", "totals", ] - nullable_fields = ["creation_token"] + nullable_fields = ["creation_token", "partner_owned_disbursement"] null_default_fields = [] serialized = handler(self) diff --git a/gusto_embedded/src/gusto_embedded/models/contractor_payment_method.py b/gusto_embedded/src/gusto_embedded/models/contractor_payment_method.py index 2b04d05a..4cb447d6 100644 --- a/gusto_embedded/src/gusto_embedded/models/contractor_payment_method.py +++ b/gusto_embedded/src/gusto_embedded/models/contractor_payment_method.py @@ -19,14 +19,14 @@ class ContractorPaymentMethodType(str, Enum): - r"""The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required.""" + r"""The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required.""" DIRECT_DEPOSIT = "Direct Deposit" CHECK = "Check" class ContractorPaymentMethodSplitBy(str, Enum): - r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + r"""Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last split amount must be nil to capture the remainder.""" AMOUNT = "Amount" PERCENTAGE = "Percentage" @@ -37,10 +37,10 @@ class ContractorPaymentMethodTypedDict(TypedDict): version: NotRequired[str] r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" - type: NotRequired[ContractorPaymentMethodType] - r"""The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required.""" + type: NotRequired[Nullable[ContractorPaymentMethodType]] + r"""The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required.""" split_by: NotRequired[Nullable[ContractorPaymentMethodSplitBy]] - r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + r"""Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last split amount must be nil to capture the remainder.""" splits: NotRequired[Nullable[List[PaymentMethodBankAccountTypedDict]]] @@ -50,18 +50,18 @@ class ContractorPaymentMethod(BaseModel): version: Optional[str] = None r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" - type: Optional[ContractorPaymentMethodType] = None - r"""The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required.""" + type: OptionalNullable[ContractorPaymentMethodType] = UNSET + r"""The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required.""" split_by: OptionalNullable[ContractorPaymentMethodSplitBy] = UNSET - r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + r"""Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last split amount must be nil to capture the remainder.""" splits: OptionalNullable[List[PaymentMethodBankAccount]] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = ["version", "type", "split_by", "splits"] - nullable_fields = ["split_by", "splits"] + nullable_fields = ["type", "split_by", "splits"] null_default_fields = [] serialized = handler(self) diff --git a/gusto_embedded/src/gusto_embedded/models/contractor_payment_receipt.py b/gusto_embedded/src/gusto_embedded/models/contractor_payment_receipt.py index 87fc1e3a..7f264e8b 100644 --- a/gusto_embedded/src/gusto_embedded/models/contractor_payment_receipt.py +++ b/gusto_embedded/src/gusto_embedded/models/contractor_payment_receipt.py @@ -2,6 +2,7 @@ from __future__ import annotations from datetime import date +from enum import Enum from gusto_embedded.types import BaseModel from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -21,6 +22,15 @@ class ContractorPaymentReceiptTotals(BaseModel): r"""The total company debit for the contractor payment.""" +class ContractorPaymentReceiptPaymentMethod(str, Enum): + r"""The payment method.""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + HISTORICAL_PAYMENT = "Historical Payment" + CORRECTION_PAYMENT = "Correction Payment" + + class ContractorPaymentsModelTypedDict(TypedDict): contractor_uuid: NotRequired[str] r"""The UUID of the contractor.""" @@ -35,11 +45,8 @@ class ContractorPaymentsModelTypedDict(TypedDict): `Individual` `Business` """ - payment_method: NotRequired[str] - r"""The payment method. - - `Direct Deposit` `Check` `Historical Payment` `Correction Payment` - """ + payment_method: NotRequired[ContractorPaymentReceiptPaymentMethod] + r"""The payment method.""" wage: NotRequired[str] r"""The fixed wage of the payment, regardless of hours worked.""" bonus: NotRequired[str] @@ -67,11 +74,8 @@ class ContractorPaymentsModel(BaseModel): `Individual` `Business` """ - payment_method: Optional[str] = None - r"""The payment method. - - `Direct Deposit` `Check` `Historical Payment` `Correction Payment` - """ + payment_method: Optional[ContractorPaymentReceiptPaymentMethod] = None + r"""The payment method.""" wage: Optional[str] = None r"""The fixed wage of the payment, regardless of hours worked.""" diff --git a/gusto_embedded/src/gusto_embedded/models/contractors_sort_by.py b/gusto_embedded/src/gusto_embedded/models/contractors_sort_by.py new file mode 100644 index 00000000..05875b31 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/contractors_sort_by.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class ContractorsSortBy(str, Enum): + TYPE = "type" + ONBOARDING_STATUS = "onboarding_status" + NAME = "name" + CREATED_AT = "created_at" diff --git a/gusto_embedded/src/gusto_embedded/models/contribution_exclusion.py b/gusto_embedded/src/gusto_embedded/models/contribution_exclusion.py new file mode 100644 index 00000000..ec42ec36 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/contribution_exclusion.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gusto_embedded.types import BaseModel +from typing_extensions import TypedDict + + +class ContributionExclusionTypedDict(TypedDict): + r"""The representation of a contribution exclusion for a company benefit.""" + + contribution_uuid: str + r"""The UUID of the contribution type.""" + contribution_type: str + r"""The name of the contribution type.""" + excluded: bool + r"""Whether this contribution type is excluded from the benefit.""" + + +class ContributionExclusion(BaseModel): + r"""The representation of a contribution exclusion for a company benefit.""" + + contribution_uuid: str + r"""The UUID of the contribution type.""" + + contribution_type: str + r"""The name of the contribution type.""" + + excluded: bool + r"""Whether this contribution type is excluded from the benefit.""" diff --git a/gusto_embedded/src/gusto_embedded/models/create_report.py b/gusto_embedded/src/gusto_embedded/models/create_report.py index a19b175f..25698c08 100644 --- a/gusto_embedded/src/gusto_embedded/models/create_report.py +++ b/gusto_embedded/src/gusto_embedded/models/create_report.py @@ -1,7 +1,14 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from gusto_embedded.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -13,7 +20,7 @@ class CreateReportTypedDict(TypedDict): r"""A unique identifier of the report request""" company_uuid: NotRequired[str] r"""Company UUID""" - custom_name: NotRequired[str] + custom_name: NotRequired[Nullable[str]] r"""Title of the report""" file_type: NotRequired[str] r"""File type""" @@ -28,8 +35,38 @@ class CreateReport(BaseModel): company_uuid: Optional[str] = None r"""Company UUID""" - custom_name: Optional[str] = None + custom_name: OptionalNullable[str] = UNSET r"""Title of the report""" file_type: Optional[str] = None r"""File type""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["request_uuid", "company_uuid", "custom_name", "file_type"] + nullable_fields = ["custom_name"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/delete_v1_companies_company_id_bank_accounts_bank_account_idop.py b/gusto_embedded/src/gusto_embedded/models/delete_v1_companies_company_id_bank_accounts_bank_account_idop.py new file mode 100644 index 00000000..af8dab18 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/delete_v1_companies_company_id_bank_accounts_bank_account_idop.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion( + str, Enum +): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDRequestTypedDict(TypedDict): + company_id: str + r"""The UUID of the company""" + bank_account_id: str + r"""The UUID of the company bank account""" + x_gusto_api_version: NotRequired[ + DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDRequest(BaseModel): + company_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the company""" + + bank_account_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the company bank account""" + + x_gusto_api_version: Annotated[ + Optional[ + DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion + ], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = DeleteV1CompaniesCompanyIDBankAccountsBankAccountIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/delete_v1_companies_company_id_payrollsop.py b/gusto_embedded/src/gusto_embedded/models/delete_v1_companies_company_id_payrollsop.py index a504a792..45315df5 100644 --- a/gusto_embedded/src/gusto_embedded/models/delete_v1_companies_company_id_payrollsop.py +++ b/gusto_embedded/src/gusto_embedded/models/delete_v1_companies_company_id_payrollsop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( FieldMetadata, @@ -14,6 +14,12 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class DeleteV1CompaniesCompanyIDPayrollsRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" @@ -21,7 +27,9 @@ class DeleteV1CompaniesCompanyIDPayrollsRequestTypedDict(TypedDict): r"""The UUID of the payroll""" async_: NotRequired[bool] r"""When true, request an asynchronous delete of the payroll.""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -44,8 +52,8 @@ class DeleteV1CompaniesCompanyIDPayrollsRequest(BaseModel): r"""When true, request an asynchronous delete of the payroll.""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/delete_v1_company_benefits_company_benefit_idop.py b/gusto_embedded/src/gusto_embedded/models/delete_v1_company_benefits_company_benefit_idop.py index b1b7cc41..6e77460a 100644 --- a/gusto_embedded/src/gusto_embedded/models/delete_v1_company_benefits_company_benefit_idop.py +++ b/gusto_embedded/src/gusto_embedded/models/delete_v1_company_benefits_company_benefit_idop.py @@ -2,9 +2,11 @@ from __future__ import annotations from .versionheader import VersionHeader -from gusto_embedded import utils +from dataclasses import dataclass, field +from gusto_embedded.models import GustoError from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import httpx import pydantic from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -57,15 +59,18 @@ class DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData(BaseModel): errors: Optional[DeleteV1CompanyBenefitsCompanyBenefitIDErrors] = None -class DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody(Exception): +@dataclass(unsafe_hash=True) +class DeleteV1CompanyBenefitsCompanyBenefitIDResponseBody(GustoError): r"""Unprocessable Entity""" - data: DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData - - def __init__(self, data: DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData): - self.data = data - - def __str__(self) -> str: - return utils.marshal_json( - self.data, DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData - ) + data: DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData = field(hash=False) + + def __init__( + self, + data: DeleteV1CompanyBenefitsCompanyBenefitIDResponseBodyData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/gusto_embedded/src/gusto_embedded/models/delete_v1_contractor_payment_groups_contractor_payment_group_idop.py b/gusto_embedded/src/gusto_embedded/models/delete_v1_contractor_payment_groups_contractor_payment_group_idop.py index 22514be0..ccf727d0 100644 --- a/gusto_embedded/src/gusto_embedded/models/delete_v1_contractor_payment_groups_contractor_payment_group_idop.py +++ b/gusto_embedded/src/gusto_embedded/models/delete_v1_contractor_payment_groups_contractor_payment_group_idop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,12 +9,22 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion( + str, Enum +): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict( TypedDict ): contractor_payment_group_uuid: str r"""The UUID of the contractor payment group""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -25,8 +35,10 @@ class DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDRequest(BaseModel): r"""The UUID of the contractor payment group""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[ + DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion + ], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = DeleteV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/delete_v1_home_addresses_home_address_uuidop.py b/gusto_embedded/src/gusto_embedded/models/delete_v1_home_addresses_home_address_uuidop.py index ee92e23b..ce2b9562 100644 --- a/gusto_embedded/src/gusto_embedded/models/delete_v1_home_addresses_home_address_uuidop.py +++ b/gusto_embedded/src/gusto_embedded/models/delete_v1_home_addresses_home_address_uuidop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class DeleteV1HomeAddressesHomeAddressUUIDRequestTypedDict(TypedDict): home_address_uuid: str r"""The UUID of the home address""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class DeleteV1HomeAddressesHomeAddressUUIDRequest(BaseModel): r"""The UUID of the home address""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = DeleteV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/delete_v1_recurring_reimbursementsop.py b/gusto_embedded/src/gusto_embedded/models/delete_v1_recurring_reimbursementsop.py new file mode 100644 index 00000000..c856732a --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/delete_v1_recurring_reimbursementsop.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class DeleteV1RecurringReimbursementsRequestTypedDict(TypedDict): + id: str + r"""The UUID of the reimbursement""" + x_gusto_api_version: NotRequired[ + DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class DeleteV1RecurringReimbursementsRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the reimbursement""" + + x_gusto_api_version: Annotated[ + Optional[DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/delete_v1_work_addresses_work_address_uuidop.py b/gusto_embedded/src/gusto_embedded/models/delete_v1_work_addresses_work_address_uuidop.py index 88df0660..85fb2670 100644 --- a/gusto_embedded/src/gusto_embedded/models/delete_v1_work_addresses_work_address_uuidop.py +++ b/gusto_embedded/src/gusto_embedded/models/delete_v1_work_addresses_work_address_uuidop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class DeleteV1WorkAddressesWorkAddressUUIDRequestTypedDict(TypedDict): work_address_uuid: str r"""The UUID of the work address""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class DeleteV1WorkAddressesWorkAddressUUIDRequest(BaseModel): r"""The UUID of the work address""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = DeleteV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/detailedpaymentaccountsplit.py b/gusto_embedded/src/gusto_embedded/models/detailedpaymentaccountsplit.py new file mode 100644 index 00000000..cae97a41 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/detailedpaymentaccountsplit.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class DetailedPaymentAccountSplitTypedDict(TypedDict): + r"""Details of a single payment split for a payment method.""" + + bank_account_uuid: NotRequired[str] + r"""The UUID of the bank account.""" + hidden_account_number: NotRequired[str] + r"""The masked account number.""" + name: NotRequired[str] + r"""The name of the bank account.""" + priority: NotRequired[int] + r"""The priority of the payment split.""" + split_amount: NotRequired[int] + r"""The amount for the split. If `split_by` is 'Amount', this is in cents (e.g., 500 for $5.00). If `split_by` is 'Percentage', this is the percentage value (e.g., 60 for 60%).""" + encrypted_account_number: NotRequired[Nullable[str]] + r"""Ciphertext containing the full bank account number, which must be decrypted using a key provided by Gusto. Only visible with the appropriate `read:account_number` scope (e.g., `employee_payment_methods:read:account_number`).""" + + +class DetailedPaymentAccountSplit(BaseModel): + r"""Details of a single payment split for a payment method.""" + + bank_account_uuid: Optional[str] = None + r"""The UUID of the bank account.""" + + hidden_account_number: Optional[str] = None + r"""The masked account number.""" + + name: Optional[str] = None + r"""The name of the bank account.""" + + priority: Optional[int] = None + r"""The priority of the payment split.""" + + split_amount: Optional[int] = None + r"""The amount for the split. If `split_by` is 'Amount', this is in cents (e.g., 500 for $5.00). If `split_by` is 'Percentage', this is the percentage value (e.g., 60 for 60%).""" + + encrypted_account_number: OptionalNullable[str] = UNSET + r"""Ciphertext containing the full bank account number, which must be decrypted using a key provided by Gusto. Only visible with the appropriate `read:account_number` scope (e.g., `employee_payment_methods:read:account_number`).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "bank_account_uuid", + "hidden_account_number", + "name", + "priority", + "split_amount", + "encrypted_account_number", + ] + nullable_fields = ["encrypted_account_number"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/employee.py b/gusto_embedded/src/gusto_embedded/models/employee.py index b1a9ffa3..67995e3f 100644 --- a/gusto_embedded/src/gusto_embedded/models/employee.py +++ b/gusto_embedded/src/gusto_embedded/models/employee.py @@ -2,10 +2,12 @@ from __future__ import annotations from .employee_custom_field import EmployeeCustomField, EmployeeCustomFieldTypedDict +from .flsa_status_type import FlsaStatusType from .garnishment import Garnishment, GarnishmentTypedDict from .job import Job, JobTypedDict from .paid_time_off import PaidTimeOff, PaidTimeOffTypedDict from .termination import Termination, TerminationTypedDict +from datetime import date from enum import Enum from gusto_embedded.types import ( BaseModel, @@ -19,7 +21,7 @@ from typing_extensions import NotRequired, TypedDict -class OnboardingStatus(str, Enum): +class EmployeeOnboardingStatus1(str, Enum): r"""The current onboarding status of the employee""" ONBOARDING_COMPLETED = "onboarding_completed" @@ -32,7 +34,7 @@ class OnboardingStatus(str, Enum): SELF_ONBOARDING_AWAITING_ADMIN_REVIEW = "self_onboarding_awaiting_admin_review" -class OnboardingDocumentsConfigTypedDict(TypedDict): +class EmployeeOnboardingDocumentsConfigTypedDict(TypedDict): r"""Configuration for an employee onboarding documents during onboarding""" uuid: NotRequired[Nullable[str]] @@ -41,7 +43,7 @@ class OnboardingDocumentsConfigTypedDict(TypedDict): r"""Whether to include Form I-9 for an employee during onboarding""" -class OnboardingDocumentsConfig(BaseModel): +class EmployeeOnboardingDocumentsConfig(BaseModel): r"""Configuration for an employee onboarding documents during onboarding""" uuid: OptionalNullable[str] = UNSET @@ -81,14 +83,14 @@ def serialize_model(self, handler): return m -class PaymentMethod(str, Enum): +class EmployeePaymentMethod1(str, Enum): r"""The employee's payment method""" DIRECT_DEPOSIT = "Direct Deposit" CHECK = "Check" -class CurrentEmploymentStatus(str, Enum): +class EmployeeCurrentEmploymentStatus(str, Enum): r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" FULL_TIME = "full_time" @@ -120,11 +122,13 @@ class EmployeeTypedDict(TypedDict): r"""Whether the employee is terminated.""" two_percent_shareholder: NotRequired[Nullable[bool]] r"""Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type.""" + work_email: NotRequired[Nullable[str]] + r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" onboarded: NotRequired[bool] r"""Whether the employee has completed onboarding.""" - onboarding_status: NotRequired[Nullable[OnboardingStatus]] + onboarding_status: NotRequired[Nullable[EmployeeOnboardingStatus1]] r"""The current onboarding status of the employee""" - onboarding_documents_config: NotRequired[OnboardingDocumentsConfigTypedDict] + onboarding_documents_config: NotRequired[EmployeeOnboardingDocumentsConfigTypedDict] r"""Configuration for an employee onboarding documents during onboarding""" jobs: NotRequired[List[JobTypedDict]] eligible_paid_time_off: NotRequired[List[PaidTimeOffTypedDict]] @@ -139,12 +143,22 @@ class EmployeeTypedDict(TypedDict): r"""Deprecated. This field always returns an empty string.""" phone: NotRequired[Nullable[str]] preferred_first_name: NotRequired[Nullable[str]] - payment_method: NotRequired[PaymentMethod] + payment_method: NotRequired[EmployeePaymentMethod1] r"""The employee's payment method""" - work_email: NotRequired[Nullable[str]] - r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" - current_employment_status: NotRequired[Nullable[CurrentEmploymentStatus]] + current_employment_status: NotRequired[Nullable[EmployeeCurrentEmploymentStatus]] r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" + historical: NotRequired[bool] + employee_code: NotRequired[str] + r"""The short format code of the employee""" + department_uuid: NotRequired[Nullable[str]] + r"""The UUID of the department the employee is under""" + title: NotRequired[str] + hired_at: NotRequired[date] + r"""The date when the employee was hired to the company""" + hidden_ssn: NotRequired[str] + flsa_status: NotRequired[FlsaStatusType] + r"""The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company.""" + applicable_tax_ids: NotRequired[List[float]] class Employee(BaseModel): @@ -180,13 +194,16 @@ class Employee(BaseModel): two_percent_shareholder: OptionalNullable[bool] = UNSET r"""Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type.""" + work_email: OptionalNullable[str] = UNSET + r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" + onboarded: Optional[bool] = None r"""Whether the employee has completed onboarding.""" - onboarding_status: OptionalNullable[OnboardingStatus] = UNSET + onboarding_status: OptionalNullable[EmployeeOnboardingStatus1] = UNSET r"""The current onboarding status of the employee""" - onboarding_documents_config: Optional[OnboardingDocumentsConfig] = None + onboarding_documents_config: Optional[EmployeeOnboardingDocumentsConfig] = None r"""Configuration for an employee onboarding documents during onboarding""" jobs: Optional[List[Job]] = None @@ -212,15 +229,32 @@ class Employee(BaseModel): preferred_first_name: OptionalNullable[str] = UNSET - payment_method: Optional[PaymentMethod] = PaymentMethod.CHECK + payment_method: Optional[EmployeePaymentMethod1] = EmployeePaymentMethod1.CHECK r"""The employee's payment method""" - work_email: OptionalNullable[str] = UNSET - r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" - - current_employment_status: OptionalNullable[CurrentEmploymentStatus] = UNSET + current_employment_status: OptionalNullable[EmployeeCurrentEmploymentStatus] = UNSET r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" + historical: Optional[bool] = None + + employee_code: Optional[str] = None + r"""The short format code of the employee""" + + department_uuid: OptionalNullable[str] = UNSET + r"""The UUID of the department the employee is under""" + + title: Optional[str] = None + + hired_at: Optional[date] = None + r"""The date when the employee was hired to the company""" + + hidden_ssn: Optional[str] = None + + flsa_status: Optional[FlsaStatusType] = None + r"""The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company.""" + + applicable_tax_ids: Optional[List[float]] = None + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -232,6 +266,7 @@ def serialize_model(self, handler): "department", "terminated", "two_percent_shareholder", + "work_email", "onboarded", "onboarding_status", "onboarding_documents_config", @@ -246,8 +281,15 @@ def serialize_model(self, handler): "phone", "preferred_first_name", "payment_method", - "work_email", "current_employment_status", + "historical", + "employee_code", + "department_uuid", + "title", + "hired_at", + "hidden_ssn", + "flsa_status", + "applicable_tax_ids", ] nullable_fields = [ "middle_initial", @@ -255,12 +297,13 @@ def serialize_model(self, handler): "manager_uuid", "department", "two_percent_shareholder", + "work_email", "onboarding_status", "date_of_birth", "phone", "preferred_first_name", - "work_email", "current_employment_status", + "department_uuid", ] null_default_fields = [] diff --git a/gusto_embedded/src/gusto_embedded/models/employee_address.py b/gusto_embedded/src/gusto_embedded/models/employee_address.py index 3a8ad893..583f0fde 100644 --- a/gusto_embedded/src/gusto_embedded/models/employee_address.py +++ b/gusto_embedded/src/gusto_embedded/models/employee_address.py @@ -15,8 +15,16 @@ class EmployeeAddressTypedDict(TypedDict): - version: NotRequired[str] + uuid: str + r"""The UUID of the employee address""" + version: str r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + employee_uuid: NotRequired[str] + r"""The UUID of the employee""" + effective_date: NotRequired[date] + r"""The date the employee started living at the address.""" + courtesy_withholding: NotRequired[bool] + r"""Determines if home taxes should be withheld and paid for employee.""" street_1: NotRequired[str] street_2: NotRequired[Nullable[str]] city: NotRequired[str] @@ -25,20 +33,24 @@ class EmployeeAddressTypedDict(TypedDict): country: NotRequired[str] active: NotRequired[bool] r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" - uuid: NotRequired[str] - r"""The UUID of the employee address""" - employee_uuid: NotRequired[str] - r"""The UUID of the employee""" - effective_date: NotRequired[date] - r"""The date the employee started living at the address.""" - courtesy_withholding: NotRequired[bool] - r"""Determines if home taxes should be withheld and paid for employee.""" class EmployeeAddress(BaseModel): - version: Optional[str] = None + uuid: str + r"""The UUID of the employee address""" + + version: str r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + employee_uuid: Optional[str] = None + r"""The UUID of the employee""" + + effective_date: Optional[date] = None + r"""The date the employee started living at the address.""" + + courtesy_withholding: Optional[bool] = None + r"""Determines if home taxes should be withheld and paid for employee.""" + street_1: Optional[str] = None street_2: OptionalNullable[str] = UNSET @@ -54,22 +66,12 @@ class EmployeeAddress(BaseModel): active: Optional[bool] = None r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" - uuid: Optional[str] = None - r"""The UUID of the employee address""" - - employee_uuid: Optional[str] = None - r"""The UUID of the employee""" - - effective_date: Optional[date] = None - r"""The date the employee started living at the address.""" - - courtesy_withholding: Optional[bool] = None - r"""Determines if home taxes should be withheld and paid for employee.""" - @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ - "version", + "employee_uuid", + "effective_date", + "courtesy_withholding", "street_1", "street_2", "city", @@ -77,10 +79,6 @@ def serialize_model(self, handler): "zip", "country", "active", - "uuid", - "employee_uuid", - "effective_date", - "courtesy_withholding", ] nullable_fields = ["street_2"] null_default_fields = [] diff --git a/gusto_embedded/src/gusto_embedded/models/employee_benefit.py b/gusto_embedded/src/gusto_embedded/models/employee_benefit.py index 880c37b9..292f7ff3 100644 --- a/gusto_embedded/src/gusto_embedded/models/employee_benefit.py +++ b/gusto_embedded/src/gusto_embedded/models/employee_benefit.py @@ -21,11 +21,15 @@ class TiersTypedDict(TypedDict): rate: NotRequired[str] r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: NotRequired[str] - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + For example: + + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: NotRequired[str] r"""The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold.""" @@ -38,11 +42,15 @@ class Tiers(BaseModel): r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: Optional[str] = None - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. + + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + For example: - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: Optional[str] = None @@ -148,8 +156,8 @@ class EmployeeBenefitTypedDict(TypedDict): `Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. """ - catch_up: NotRequired[bool] - r"""Whether the employee should use a benefit’s \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" + catch_up: NotRequired[Nullable[bool]] + r"""Whether the employee should use a benefit's \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" retirement_loan_identifier: NotRequired[str] r"""Identifier for a 401(k) loan assigned by the 401(k) provider""" coverage_amount: NotRequired[Nullable[str]] @@ -158,8 +166,8 @@ class EmployeeBenefitTypedDict(TypedDict): Nullable[DeductionReducesTaxableIncome] ] r"""Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not \"unset\", coverage amount and coverage salary multiplier are ignored.""" - coverage_salary_multiplier: NotRequired[str] - r"""The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" + coverage_salary_multiplier: NotRequired[Nullable[str]] + r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" company_contribution: NotRequired[str] r"""The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types.""" contribute_as_percentage: NotRequired[bool] @@ -208,8 +216,8 @@ class EmployeeBenefit(BaseModel): `Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. """ - catch_up: Optional[bool] = False - r"""Whether the employee should use a benefit’s \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" + catch_up: OptionalNullable[bool] = False + r"""Whether the employee should use a benefit's \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" retirement_loan_identifier: Optional[str] = None r"""Identifier for a 401(k) loan assigned by the 401(k) provider""" @@ -222,8 +230,8 @@ class EmployeeBenefit(BaseModel): ] = DeductionReducesTaxableIncome.UNSET r"""Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not \"unset\", coverage amount and coverage salary multiplier are ignored.""" - coverage_salary_multiplier: Optional[str] = "0.00" - r"""The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" + coverage_salary_multiplier: OptionalNullable[str] = "0.00" + r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" company_contribution: Annotated[ Optional[str], @@ -273,8 +281,10 @@ def serialize_model(self, handler): "employee_deduction_annual_maximum", "company_contribution_annual_maximum", "limit_option", + "catch_up", "coverage_amount", "deduction_reduces_taxable_income", + "coverage_salary_multiplier", ] null_default_fields = [] diff --git a/gusto_embedded/src/gusto_embedded/models/employee_benefit_for_company_benefit.py b/gusto_embedded/src/gusto_embedded/models/employee_benefit_for_company_benefit.py index f09b3060..73fe335b 100644 --- a/gusto_embedded/src/gusto_embedded/models/employee_benefit_for_company_benefit.py +++ b/gusto_embedded/src/gusto_embedded/models/employee_benefit_for_company_benefit.py @@ -21,11 +21,15 @@ class ValueTiersTypedDict(TypedDict): rate: NotRequired[str] r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: NotRequired[str] - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + For example: + + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: NotRequired[str] r"""The step up difference between this tier's threshold and the previous tier's threshold. In the first tier, this is equivalent to threshold.""" @@ -38,11 +42,15 @@ class ValueTiers(BaseModel): r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: Optional[str] = None - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. + + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + For example: - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + If the first tier has a threshold of \"3\", and `rate` of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ threshold_delta: Optional[str] = None @@ -150,8 +158,8 @@ class EmployeeBenefitForCompanyBenefitTypedDict(TypedDict): `Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. """ - catch_up: NotRequired[bool] - r"""Whether the employee should use a benefit’s \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" + catch_up: NotRequired[Nullable[bool]] + r"""Whether the employee should use a benefit's \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" retirement_loan_identifier: NotRequired[str] r"""Identifier for a 401(k) loan assigned by the 401(k) provider""" coverage_amount: NotRequired[Nullable[str]] @@ -160,8 +168,8 @@ class EmployeeBenefitForCompanyBenefitTypedDict(TypedDict): Nullable[EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome] ] r"""Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not \"unset\", coverage amount and coverage salary multiplier are ignored.""" - coverage_salary_multiplier: NotRequired[str] - r"""The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" + coverage_salary_multiplier: NotRequired[Nullable[str]] + r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" company_contribution: NotRequired[str] r"""The amount to be paid, per pay period, by the company. This field will not appear for tiered contribution types.""" contribute_as_percentage: NotRequired[bool] @@ -206,8 +214,8 @@ class EmployeeBenefitForCompanyBenefit(BaseModel): `Joint Filing or Single` and `Married and Filing Separately` are applicable to Dependent Care FSA benefit. """ - catch_up: Optional[bool] = False - r"""Whether the employee should use a benefit’s \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" + catch_up: OptionalNullable[bool] = False + r"""Whether the employee should use a benefit's \"catch up\" rate. Only Roth 401k and 401k benefits use this value for employees over 50.""" retirement_loan_identifier: Optional[str] = None r"""Identifier for a 401(k) loan assigned by the 401(k) provider""" @@ -220,8 +228,8 @@ class EmployeeBenefitForCompanyBenefit(BaseModel): ] = EmployeeBenefitForCompanyBenefitDeductionReducesTaxableIncome.UNSET r"""Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not \"unset\", coverage amount and coverage salary multiplier are ignored.""" - coverage_salary_multiplier: Optional[str] = "0.00" - r"""The coverage amount as a multiple of the employee’s salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" + coverage_salary_multiplier: OptionalNullable[str] = "0.00" + r"""The coverage amount as a multiple of the employee's salary. Only applicable for Group Term Life benefits. Note: cannot be set if coverage amount is also set.""" company_contribution: Annotated[ Optional[str], @@ -263,8 +271,10 @@ def serialize_model(self, handler): "employee_deduction_annual_maximum", "company_contribution_annual_maximum", "limit_option", + "catch_up", "coverage_amount", "deduction_reduces_taxable_income", + "coverage_salary_multiplier", ] null_default_fields = [] diff --git a/gusto_embedded/src/gusto_embedded/models/employee_federal_tax.py b/gusto_embedded/src/gusto_embedded/models/employee_federal_tax.py index bfbf0390..35b9e3dd 100644 --- a/gusto_embedded/src/gusto_embedded/models/employee_federal_tax.py +++ b/gusto_embedded/src/gusto_embedded/models/employee_federal_tax.py @@ -45,8 +45,11 @@ class EmployeeFederalTaxTypedDict(TypedDict): An exemption from paying a certain amount of income tax. """ - additional_withholding: NotRequired[bool] - r"""*does not apply to rev_2020_w4 form*""" + additional_withholding: NotRequired[str] + r"""*does not apply to rev_2020_w4 form* + + An additional withholding dollar amount + """ class EmployeeFederalTax(BaseModel): @@ -88,8 +91,11 @@ class EmployeeFederalTax(BaseModel): An exemption from paying a certain amount of income tax. """ - additional_withholding: Optional[bool] = None - r"""*does not apply to rev_2020_w4 form*""" + additional_withholding: Optional[str] = None + r"""*does not apply to rev_2020_w4 form* + + An additional withholding dollar amount + """ @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/gusto_embedded/src/gusto_embedded/models/employee_home_address.py b/gusto_embedded/src/gusto_embedded/models/employee_home_address.py new file mode 100644 index 00000000..efc1c2bc --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/employee_home_address.py @@ -0,0 +1,85 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class EmployeeHomeAddressTypedDict(TypedDict): + street_1: NotRequired[Nullable[str]] + street_2: NotRequired[Nullable[str]] + city: NotRequired[Nullable[str]] + state: NotRequired[Nullable[str]] + zip: NotRequired[Nullable[str]] + country: NotRequired[Nullable[str]] + active: NotRequired[bool] + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" + uuid: NotRequired[str] + r"""Unique identifier for this address.""" + + +class EmployeeHomeAddress(BaseModel): + street_1: OptionalNullable[str] = UNSET + + street_2: OptionalNullable[str] = UNSET + + city: OptionalNullable[str] = UNSET + + state: OptionalNullable[str] = UNSET + + zip: OptionalNullable[str] = UNSET + + country: OptionalNullable[str] = "USA" + + active: Optional[bool] = None + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" + + uuid: Optional[str] = None + r"""Unique identifier for this address.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "street_1", + "street_2", + "city", + "state", + "zip", + "country", + "active", + "uuid", + ] + nullable_fields = ["street_1", "street_2", "city", "state", "zip", "country"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/employee_pay_stubs_list.py b/gusto_embedded/src/gusto_embedded/models/employee_pay_stubs_list.py index 3d021210..6c24bb1b 100644 --- a/gusto_embedded/src/gusto_embedded/models/employee_pay_stubs_list.py +++ b/gusto_embedded/src/gusto_embedded/models/employee_pay_stubs_list.py @@ -1,11 +1,19 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from enum import Enum from gusto_embedded.types import BaseModel from typing import Optional from typing_extensions import NotRequired, TypedDict +class EmployeePayStubsListPaymentMethod(str, Enum): + r"""The payment method for the pay stub.""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + class EmployeePayStubsListTypedDict(TypedDict): r"""The representation of an employee pay stub information.""" @@ -21,6 +29,8 @@ class EmployeePayStubsListTypedDict(TypedDict): r"""A unique identifier of the payroll to which the pay stub belongs.""" check_amount: NotRequired[str] r"""The check amount for the pay stub.""" + payment_method: NotRequired[EmployeePayStubsListPaymentMethod] + r"""The payment method for the pay stub.""" class EmployeePayStubsList(BaseModel): @@ -43,3 +53,6 @@ class EmployeePayStubsList(BaseModel): check_amount: Optional[str] = None r"""The check amount for the pay stub.""" + + payment_method: Optional[EmployeePayStubsListPaymentMethod] = None + r"""The payment method for the pay stub.""" diff --git a/gusto_embedded/src/gusto_embedded/models/employee_payment_method.py b/gusto_embedded/src/gusto_embedded/models/employee_payment_method.py index 0dbb5950..8dbd4076 100644 --- a/gusto_embedded/src/gusto_embedded/models/employee_payment_method.py +++ b/gusto_embedded/src/gusto_embedded/models/employee_payment_method.py @@ -19,14 +19,14 @@ class EmployeePaymentMethodType(str, Enum): - r"""The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required.""" + r"""The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required.""" DIRECT_DEPOSIT = "Direct Deposit" CHECK = "Check" -class SplitBy(str, Enum): - r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" +class EmployeePaymentMethodSplitBy(str, Enum): + r"""Describes how the payment will be split. If `split_by` is Percentage, then the split amounts must add up to exactly 100. If `split_by` is Amount, then the last split `amount` must be `null` to capture the remainder.""" AMOUNT = "Amount" PERCENTAGE = "Percentage" @@ -38,9 +38,9 @@ class EmployeePaymentMethodTypedDict(TypedDict): version: NotRequired[str] r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" type: NotRequired[EmployeePaymentMethodType] - r"""The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required.""" - split_by: NotRequired[Nullable[SplitBy]] - r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + r"""The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required.""" + split_by: NotRequired[Nullable[EmployeePaymentMethodSplitBy]] + r"""Describes how the payment will be split. If `split_by` is Percentage, then the split amounts must add up to exactly 100. If `split_by` is Amount, then the last split `amount` must be `null` to capture the remainder.""" splits: NotRequired[Nullable[List[PaymentMethodBankAccountTypedDict]]] @@ -51,10 +51,10 @@ class EmployeePaymentMethod(BaseModel): r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" type: Optional[EmployeePaymentMethodType] = None - r"""The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required.""" + r"""The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required.""" - split_by: OptionalNullable[SplitBy] = UNSET - r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + split_by: OptionalNullable[EmployeePaymentMethodSplitBy] = UNSET + r"""Describes how the payment will be split. If `split_by` is Percentage, then the split amounts must add up to exactly 100. If `split_by` is Amount, then the last split `amount` must be `null` to capture the remainder.""" splits: OptionalNullable[List[PaymentMethodBankAccount]] = UNSET diff --git a/gusto_embedded/src/gusto_embedded/models/employee_state_tax_question.py b/gusto_embedded/src/gusto_embedded/models/employee_state_tax_question.py index 54e40e2e..d1c0a1c8 100644 --- a/gusto_embedded/src/gusto_embedded/models/employee_state_tax_question.py +++ b/gusto_embedded/src/gusto_embedded/models/employee_state_tax_question.py @@ -9,7 +9,8 @@ EmployeeStateTaxInputQuestionFormat, EmployeeStateTaxInputQuestionFormatTypedDict, ) -from gusto_embedded.types import BaseModel +from gusto_embedded.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer from typing import List from typing_extensions import TypedDict @@ -17,10 +18,11 @@ class EmployeeStateTaxQuestionTypedDict(TypedDict): label: str r"""A short title for the question""" - description: str + description: Nullable[str] r"""An explaination of the question - this may contain inline html formatted links.""" key: str r"""A unique identifier of the question (for the given state) - used for updating the answer.""" + is_question_for_admin_only: bool input_question_format: EmployeeStateTaxInputQuestionFormatTypedDict answers: List[EmployeeStateTaxAnswerTypedDict] @@ -29,12 +31,44 @@ class EmployeeStateTaxQuestion(BaseModel): label: str r"""A short title for the question""" - description: str + description: Nullable[str] r"""An explaination of the question - this may contain inline html formatted links.""" key: str r"""A unique identifier of the question (for the given state) - used for updating the answer.""" + is_question_for_admin_only: bool + input_question_format: EmployeeStateTaxInputQuestionFormat answers: List[EmployeeStateTaxAnswer] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["description"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/employee_state_tax.py b/gusto_embedded/src/gusto_embedded/models/employee_state_taxes_list.py similarity index 76% rename from gusto_embedded/src/gusto_embedded/models/employee_state_tax.py rename to gusto_embedded/src/gusto_embedded/models/employee_state_taxes_list.py index 5d64dc74..4ba717c7 100644 --- a/gusto_embedded/src/gusto_embedded/models/employee_state_tax.py +++ b/gusto_embedded/src/gusto_embedded/models/employee_state_taxes_list.py @@ -17,36 +17,38 @@ from typing_extensions import NotRequired, TypedDict -class EmployeeStateTaxTypedDict(TypedDict): - r"""Example response""" - - employee_uuid: str +class EmployeeStateTaxesListTypedDict(TypedDict): + employee_uuid: NotRequired[str] r"""The employee's uuid""" - state: str + state: NotRequired[str] r"""Two letter US state abbreviation""" - questions: List[EmployeeStateTaxQuestionTypedDict] file_new_hire_report: NotRequired[Nullable[bool]] is_work_state: NotRequired[bool] + questions: NotRequired[List[EmployeeStateTaxQuestionTypedDict]] -class EmployeeStateTax(BaseModel): - r"""Example response""" - - employee_uuid: str +class EmployeeStateTaxesList(BaseModel): + employee_uuid: Optional[str] = None r"""The employee's uuid""" - state: str + state: Optional[str] = None r"""Two letter US state abbreviation""" - questions: List[EmployeeStateTaxQuestion] - file_new_hire_report: OptionalNullable[bool] = UNSET is_work_state: Optional[bool] = None + questions: Optional[List[EmployeeStateTaxQuestion]] = None + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["file_new_hire_report", "is_work_state"] + optional_fields = [ + "employee_uuid", + "state", + "file_new_hire_report", + "is_work_state", + "questions", + ] nullable_fields = ["file_new_hire_report"] null_default_fields = [] diff --git a/gusto_embedded/src/gusto_embedded/models/employee_state_taxes_request.py b/gusto_embedded/src/gusto_embedded/models/employee_state_taxes_request.py new file mode 100644 index 00000000..64ec40d9 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/employee_state_taxes_request.py @@ -0,0 +1,97 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, List, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +EmployeeStateTaxesRequestValueTypedDict = TypeAliasType( + "EmployeeStateTaxesRequestValueTypedDict", Union[str, float, bool] +) + + +EmployeeStateTaxesRequestValue = TypeAliasType( + "EmployeeStateTaxesRequestValue", Union[str, float, bool] +) + + +class AnswersTypedDict(TypedDict): + value: Nullable[EmployeeStateTaxesRequestValueTypedDict] + valid_from: str + valid_up_to: NotRequired[Nullable[Any]] + + +class Answers(BaseModel): + value: Nullable[EmployeeStateTaxesRequestValue] + + valid_from: str + + valid_up_to: OptionalNullable[Any] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["valid_up_to"] + nullable_fields = ["value", "valid_up_to"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class QuestionsTypedDict(TypedDict): + key: str + answers: NotRequired[List[AnswersTypedDict]] + + +class Questions(BaseModel): + key: str + + answers: Optional[List[Answers]] = None + + +class StatesTypedDict(TypedDict): + state: str + questions: NotRequired[List[QuestionsTypedDict]] + + +class States(BaseModel): + state: str + + questions: Optional[List[Questions]] = None + + +class EmployeeStateTaxesRequestTypedDict(TypedDict): + states: List[StatesTypedDict] + + +class EmployeeStateTaxesRequest(BaseModel): + states: List[States] diff --git a/gusto_embedded/src/gusto_embedded/models/employee_work_address.py b/gusto_embedded/src/gusto_embedded/models/employee_work_address.py index 8b4d162d..793d66c0 100644 --- a/gusto_embedded/src/gusto_embedded/models/employee_work_address.py +++ b/gusto_embedded/src/gusto_embedded/models/employee_work_address.py @@ -14,8 +14,6 @@ class EmployeeWorkAddressTypedDict(TypedDict): - r"""List of employee work addresses""" - uuid: str r"""The unique identifier of this work address.""" version: str @@ -37,8 +35,6 @@ class EmployeeWorkAddressTypedDict(TypedDict): class EmployeeWorkAddress(BaseModel): - r"""List of employee work addresses""" - uuid: str r"""The unique identifier of this work address.""" diff --git a/gusto_embedded/src/gusto_embedded/models/employeepaymentdetail.py b/gusto_embedded/src/gusto_embedded/models/employeepaymentdetail.py new file mode 100644 index 00000000..e83204f0 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/employeepaymentdetail.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .detailedpaymentaccountsplit import ( + DetailedPaymentAccountSplit, + DetailedPaymentAccountSplitTypedDict, +) +from enum import Enum +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class EmployeePaymentDetailPaymentMethod(str, Enum): + r"""The type of payment method.""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class SplitBy(str, Enum): + r"""How the payment is split. This field is applicable when `payment_method` is \"Direct Deposit\".""" + + PERCENTAGE = "Percentage" + AMOUNT = "Amount" + + +class EmployeePaymentDetailTypedDict(TypedDict): + r"""Represents an employee's payment method details.""" + + employee_uuid: NotRequired[str] + r"""The UUID of the employee.""" + payment_method: NotRequired[EmployeePaymentDetailPaymentMethod] + r"""The type of payment method.""" + split_by: NotRequired[Nullable[SplitBy]] + r"""How the payment is split. This field is applicable when `payment_method` is \"Direct Deposit\".""" + splits: NotRequired[Nullable[List[DetailedPaymentAccountSplitTypedDict]]] + r"""An array of payment splits. This field is applicable when `payment_method` is \"Direct Deposit\".""" + + +class EmployeePaymentDetail(BaseModel): + r"""Represents an employee's payment method details.""" + + employee_uuid: Optional[str] = None + r"""The UUID of the employee.""" + + payment_method: Optional[EmployeePaymentDetailPaymentMethod] = None + r"""The type of payment method.""" + + split_by: OptionalNullable[SplitBy] = UNSET + r"""How the payment is split. This field is applicable when `payment_method` is \"Direct Deposit\".""" + + splits: OptionalNullable[List[DetailedPaymentAccountSplit]] = UNSET + r"""An array of payment splits. This field is applicable when `payment_method` is \"Direct Deposit\".""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["employee_uuid", "payment_method", "split_by", "splits"] + nullable_fields = ["split_by", "splits"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/employment_history_list.py b/gusto_embedded/src/gusto_embedded/models/employment_history_list.py index ef1ce4b4..3e914e5d 100644 --- a/gusto_embedded/src/gusto_embedded/models/employment_history_list.py +++ b/gusto_embedded/src/gusto_embedded/models/employment_history_list.py @@ -2,7 +2,14 @@ from __future__ import annotations from enum import Enum -from gusto_embedded.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -22,7 +29,7 @@ class EmploymentHistoryListTypedDict(TypedDict): hire_date: NotRequired[str] r"""The employee's start day of work for an employment.""" - termination_date: NotRequired[str] + termination_date: NotRequired[Nullable[str]] r"""The employee's last day of work for an employment.""" file_new_hire_report: NotRequired[bool] r"""The boolean flag indicating whether Gusto will file a new hire report for the employee.""" @@ -38,7 +45,7 @@ class EmploymentHistoryList(BaseModel): hire_date: Optional[str] = None r"""The employee's start day of work for an employment.""" - termination_date: Optional[str] = None + termination_date: OptionalNullable[str] = UNSET r"""The employee's last day of work for an employment.""" file_new_hire_report: Optional[bool] = None @@ -49,3 +56,39 @@ class EmploymentHistoryList(BaseModel): employment_status: Optional[EmploymentHistoryListEmploymentStatus] = None r"""The employee's employment status. Supplying an invalid option will set the employment_status to *not_set*.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "hire_date", + "termination_date", + "file_new_hire_report", + "two_percent_shareholder", + "employment_status", + ] + nullable_fields = ["termination_date"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/external_payroll.py b/gusto_embedded/src/gusto_embedded/models/external_payroll.py index ca965295..63161ba1 100644 --- a/gusto_embedded/src/gusto_embedded/models/external_payroll.py +++ b/gusto_embedded/src/gusto_embedded/models/external_payroll.py @@ -2,7 +2,14 @@ from __future__ import annotations from enum import Enum -from gusto_embedded.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -31,13 +38,13 @@ class Earnings(BaseModel): earning_id: Optional[int] = None -class ExternalPayrollBenefitsTypedDict(TypedDict): +class BenefitsTypedDict(TypedDict): benefit_id: NotRequired[int] company_contribution_amount: NotRequired[str] employee_deduction_amount: NotRequired[str] -class ExternalPayrollBenefits(BaseModel): +class Benefits(BaseModel): benefit_id: Optional[int] = None company_contribution_amount: Optional[str] = None @@ -59,7 +66,7 @@ class ExternalPayrollTaxes(BaseModel): class ExternalPayrollItemsTypedDict(TypedDict): employee_uuid: NotRequired[str] earnings: NotRequired[List[EarningsTypedDict]] - benefits: NotRequired[List[ExternalPayrollBenefitsTypedDict]] + benefits: NotRequired[List[BenefitsTypedDict]] taxes: NotRequired[List[ExternalPayrollTaxesTypedDict]] @@ -68,7 +75,7 @@ class ExternalPayrollItems(BaseModel): earnings: Optional[List[Earnings]] = None - benefits: Optional[List[ExternalPayrollBenefits]] = None + benefits: Optional[List[Benefits]] = None taxes: Optional[List[ExternalPayrollTaxes]] = None @@ -161,7 +168,7 @@ class ExternalPayrollTypedDict(TypedDict): r"""External payroll items for employees""" applicable_earnings: NotRequired[List[ApplicableEarningsTypedDict]] r"""Applicable earnings based on company provisioning.""" - applicable_benefits: NotRequired[List[ApplicableBenefitsTypedDict]] + applicable_benefits: NotRequired[Nullable[List[ApplicableBenefitsTypedDict]]] r"""Applicable benefits based on company provisioning.""" applicable_taxes: NotRequired[List[ApplicableTaxesTypedDict]] r"""Applicable taxes based on company provisioning.""" @@ -196,7 +203,7 @@ class ExternalPayroll(BaseModel): applicable_earnings: Optional[List[ApplicableEarnings]] = None r"""Applicable earnings based on company provisioning.""" - applicable_benefits: Optional[List[ApplicableBenefits]] = None + applicable_benefits: OptionalNullable[List[ApplicableBenefits]] = UNSET r"""Applicable benefits based on company provisioning.""" applicable_taxes: Optional[List[ApplicableTaxes]] = None @@ -204,3 +211,44 @@ class ExternalPayroll(BaseModel): metadata: Optional[ExternalPayrollMetadata] = None r"""Stores metadata of the external payroll.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "company_uuid", + "check_date", + "payment_period_start_date", + "payment_period_end_date", + "status", + "external_payroll_items", + "applicable_earnings", + "applicable_benefits", + "applicable_taxes", + "metadata", + ] + nullable_fields = ["applicable_benefits"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/federal_tax_details.py b/gusto_embedded/src/gusto_embedded/models/federal_tax_details.py index eb08f7dd..41147b75 100644 --- a/gusto_embedded/src/gusto_embedded/models/federal_tax_details.py +++ b/gusto_embedded/src/gusto_embedded/models/federal_tax_details.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from enum import Enum from gusto_embedded.types import ( BaseModel, Nullable, @@ -13,6 +14,40 @@ from typing_extensions import NotRequired, TypedDict +class FederalTaxDetailsStatus(str, Enum): + r"""The status of EIN verification: + - `pending`: The EIN verification process has not completed (or the company does not yet have an EIN). + - `verified`: The EIN has been successfully verified as a valid EIN with the IRS. + - `failed`: The company's EIN did not pass verification. Common issues are being entered incorrectly or not matching the company's legal name. + """ + + PENDING = "pending" + VERIFIED = "verified" + FAILED = "failed" + + +class EinVerificationTypedDict(TypedDict): + r"""Information about the status of verifying the company's Employer Identification Number (EIN)""" + + status: NotRequired[FederalTaxDetailsStatus] + r"""The status of EIN verification: + - `pending`: The EIN verification process has not completed (or the company does not yet have an EIN). + - `verified`: The EIN has been successfully verified as a valid EIN with the IRS. + - `failed`: The company's EIN did not pass verification. Common issues are being entered incorrectly or not matching the company's legal name. + """ + + +class EinVerification(BaseModel): + r"""Information about the status of verifying the company's Employer Identification Number (EIN)""" + + status: Optional[FederalTaxDetailsStatus] = None + r"""The status of EIN verification: + - `pending`: The EIN verification process has not completed (or the company does not yet have an EIN). + - `verified`: The EIN has been successfully verified as a valid EIN with the IRS. + - `failed`: The company's EIN did not pass verification. Common issues are being entered incorrectly or not matching the company's legal name. + """ + + class FederalTaxDetailsTypedDict(TypedDict): r"""Example response""" @@ -47,7 +82,9 @@ class FederalTaxDetailsTypedDict(TypedDict): has_ein: NotRequired[bool] r"""Whether company's Employer Identification Number (EIN) is present""" ein_verified: NotRequired[bool] - r"""Whether the EIN was able to be verified as a valid EIN with the IRS.""" + r"""Whether the EIN has been successfully verified as a valid EIN with the IRS.""" + ein_verification: NotRequired[EinVerificationTypedDict] + r"""Information about the status of verifying the company's Employer Identification Number (EIN)""" legal_name: NotRequired[str] r"""The legal name of the company""" effective_date: NotRequired[str] @@ -98,7 +135,10 @@ class FederalTaxDetails(BaseModel): r"""Whether company's Employer Identification Number (EIN) is present""" ein_verified: Optional[bool] = None - r"""Whether the EIN was able to be verified as a valid EIN with the IRS.""" + r"""Whether the EIN has been successfully verified as a valid EIN with the IRS.""" + + ein_verification: Optional[EinVerification] = None + r"""Information about the status of verifying the company's Employer Identification Number (EIN)""" legal_name: Optional[str] = None r"""The legal name of the company""" @@ -121,6 +161,7 @@ def serialize_model(self, handler): "filing_form", "has_ein", "ein_verified", + "ein_verification", "legal_name", "effective_date", "deposit_schedule", diff --git a/gusto_embedded/src/gusto_embedded/models/general_ledger_report.py b/gusto_embedded/src/gusto_embedded/models/general_ledger_report.py new file mode 100644 index 00000000..4066ac95 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/general_ledger_report.py @@ -0,0 +1,94 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class Aggregation(str, Enum): + r"""The breakdown level used for the report""" + + DEFAULT = "default" + JOB = "job" + DEPARTMENT = "department" + INTEGRATION = "integration" + + +class IntegrationType(str, Enum): + r"""The `integration_type` used for the report, if `aggregation` was 'integration.' Otherwise, this will be null.""" + + XERO = "xero" + QBO = "qbo" + + +class GeneralLedgerReportTypedDict(TypedDict): + r"""Successful response for general ledger report generation""" + + payroll_uuid: NotRequired[str] + r"""The UUID of the payroll record for which the report was generated""" + aggregation: NotRequired[Aggregation] + r"""The breakdown level used for the report""" + integration_type: NotRequired[Nullable[IntegrationType]] + r"""The `integration_type` used for the report, if `aggregation` was 'integration.' Otherwise, this will be null.""" + request_uuid: NotRequired[str] + r"""UUID to use for polling the report status""" + + +class GeneralLedgerReport(BaseModel): + r"""Successful response for general ledger report generation""" + + payroll_uuid: Optional[str] = None + r"""The UUID of the payroll record for which the report was generated""" + + aggregation: Optional[Aggregation] = None + r"""The breakdown level used for the report""" + + integration_type: OptionalNullable[IntegrationType] = UNSET + r"""The `integration_type` used for the report, if `aggregation` was 'integration.' Otherwise, this will be null.""" + + request_uuid: Optional[str] = None + r"""UUID to use for polling the report status""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "payroll_uuid", + "aggregation", + "integration_type", + "request_uuid", + ] + nullable_fields = ["integration_type"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/get_companies_company_uuid_contractor_payments_previewop.py b/gusto_embedded/src/gusto_embedded/models/get_companies_company_uuid_contractor_payments_previewop.py index 2509cc3e..07259f91 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_companies_company_uuid_contractor_payments_previewop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_companies_company_uuid_contractor_payments_previewop.py @@ -2,7 +2,8 @@ from __future__ import annotations from .versionheader import VersionHeader -from gusto_embedded import utils +from dataclasses import dataclass, field +from gusto_embedded.models import GustoError from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( FieldMetadata, @@ -10,6 +11,7 @@ PathParamMetadata, RequestMetadata, ) +import httpx import pydantic from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -138,24 +140,25 @@ class GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponse errors: Optional[GetCompaniesCompanyUUIDContractorPaymentsPreviewErrors] = None +@dataclass(unsafe_hash=True) class GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBody( - Exception + GustoError ): r"""Unprocessable Entity (WebDAV)""" - data: GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBodyData + data: GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBodyData = field( + hash=False + ) def __init__( self, data: GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBodyData, + raw_response: httpx.Response, + body: Optional[str] = None, ): - self.data = data - - def __str__(self) -> str: - return utils.marshal_json( - self.data, - GetCompaniesCompanyUUIDContractorPaymentsPreviewContractorPaymentsResponseBodyData, - ) + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) class GetCompaniesCompanyUUIDContractorPaymentsPreviewResponseBodyTypedDict(TypedDict): diff --git a/gusto_embedded/src/gusto_embedded/models/get_companies_company_uuid_suspensionsop.py b/gusto_embedded/src/gusto_embedded/models/get_companies_company_uuid_suspensionsop.py index bd0be735..86a76b67 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_companies_company_uuid_suspensionsop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_companies_company_uuid_suspensionsop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetCompaniesCompanyUUIDSuspensionsRequestTypedDict(TypedDict): company_uuid: str r"""The UUID of the company""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetCompaniesCompanyUUIDSuspensionsRequest(BaseModel): r"""The UUID of the company""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_company_notificationsop.py b/gusto_embedded/src/gusto_embedded/models/get_company_notificationsop.py new file mode 100644 index 00000000..1b847b9a --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/get_company_notificationsop.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class QueryParamStatus(str, Enum): + OPEN = "open" + EXPIRED = "expired" + RESOLVED = "resolved" + + +class GetCompanyNotificationsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetCompanyNotificationsRequestTypedDict(TypedDict): + company_uuid: str + r"""The UUID of the company for which you would like to return notifications""" + status: NotRequired[QueryParamStatus] + x_gusto_api_version: NotRequired[GetCompanyNotificationsHeaderXGustoAPIVersion] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + page: NotRequired[int] + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + per: NotRequired[int] + r"""Number of objects per page. For majority of endpoints will default to 25""" + + +class GetCompanyNotificationsRequest(BaseModel): + company_uuid: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the company for which you would like to return notifications""" + + status: Annotated[ + Optional[QueryParamStatus], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + + x_gusto_api_version: Annotated[ + Optional[GetCompanyNotificationsHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetCompanyNotificationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + + per: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Number of objects per page. For majority of endpoints will default to 25""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_reports_request_uuidop.py b/gusto_embedded/src/gusto_embedded/models/get_reports_request_uuidop.py new file mode 100644 index 00000000..0555657e --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/get_reports_request_uuidop.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .versionheader import VersionHeader +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetReportsRequestUUIDRequestTypedDict(TypedDict): + request_uuid: str + r"""The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint.""" + x_gusto_api_version: NotRequired[VersionHeader] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetReportsRequestUUIDRequest(BaseModel): + request_uuid: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint.""" + + x_gusto_api_version: Annotated[ + Optional[VersionHeader], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_bank_accountsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_bank_accountsop.py index 7052cfda..3b13c714 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_bank_accountsop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_bank_accountsop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1CompaniesCompanyIDBankAccountsRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetV1CompaniesCompanyIDBankAccountsRequest(BaseModel): r"""The UUID of the company""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_contractor_payment_groupsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_contractor_payment_groupsop.py index 849a4a6c..26cf5ed4 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_contractor_payment_groupsop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_contractor_payment_groupsop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( FieldMetadata, @@ -14,6 +14,12 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" @@ -25,7 +31,9 @@ class GetV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict(TypedDict): r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" per: NotRequired[int] r"""Number of objects per page. For majority of endpoints will default to 25""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -60,8 +68,8 @@ class GetV1CompaniesCompanyIDContractorPaymentGroupsRequest(BaseModel): r"""Number of objects per page. For majority of endpoints will default to 25""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_contractors_payment_detailsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_contractors_payment_detailsop.py new file mode 100644 index 00000000..cb0b2da1 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_contractors_payment_detailsop.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetV1CompaniesCompanyIDContractorsPaymentDetailsRequestTypedDict(TypedDict): + company_id: str + r"""The UUID of the company. This identifies the company whose contractor payment details you want to retrieve.""" + contractor_uuid: NotRequired[str] + r"""Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor.""" + contractor_payment_group_uuid: NotRequired[str] + r"""Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group.""" + x_gusto_api_version: NotRequired[ + GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetV1CompaniesCompanyIDContractorsPaymentDetailsRequest(BaseModel): + company_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the company. This identifies the company whose contractor payment details you want to retrieve.""" + + contractor_uuid: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Optional filter to get payment details for a specific contractor. When provided, the response will only include payment details for this contractor.""" + + contractor_payment_group_uuid: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Optional filter to get payment details for contractors in a specific payment group. When provided, the response will only include payment details for contractors in this group.""" + + x_gusto_api_version: Annotated[ + Optional[ + GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion + ], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1CompaniesCompanyIDContractorsPaymentDetailsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_contractor_payment_groupsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_employees_payment_detailsop.py similarity index 75% rename from gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_contractor_payment_groupsop.py rename to gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_employees_payment_detailsop.py index 8198c51b..cd998447 100644 --- a/gusto_app_int/src/gusto_app_integration/models/get_v1_companies_company_id_contractor_payment_groupsop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_employees_payment_detailsop.py @@ -2,8 +2,8 @@ from __future__ import annotations from .versionheader import VersionHeader -from gusto_app_integration.types import BaseModel -from gusto_app_integration.utils import ( +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import ( FieldMetadata, HeaderMetadata, PathParamMetadata, @@ -14,13 +14,13 @@ from typing_extensions import Annotated, NotRequired, TypedDict -class GetV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict(TypedDict): +class GetV1CompaniesCompanyIDEmployeesPaymentDetailsRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" - start_date: NotRequired[str] - r"""The time period for which to retrieve contractor payment groups. Defaults to 6 months ago.""" - end_date: NotRequired[str] - r"""The time period for which to retrieve contractor payment groups. Defaults to today's date.""" + employee_uuid: NotRequired[str] + r"""The UUID of a specific employee to fetch payment details for.""" + payroll_uuid: NotRequired[str] + r"""The UUID of a specific payroll to fetch payment details for employees on that payroll.""" page: NotRequired[int] r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" per: NotRequired[int] @@ -29,23 +29,23 @@ class GetV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict(TypedDict): r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" -class GetV1CompaniesCompanyIDContractorPaymentGroupsRequest(BaseModel): +class GetV1CompaniesCompanyIDEmployeesPaymentDetailsRequest(BaseModel): company_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] r"""The UUID of the company""" - start_date: Annotated[ + employee_uuid: Annotated[ Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None - r"""The time period for which to retrieve contractor payment groups. Defaults to 6 months ago.""" + r"""The UUID of a specific employee to fetch payment details for.""" - end_date: Annotated[ + payroll_uuid: Annotated[ Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None - r"""The time period for which to retrieve contractor payment groups. Defaults to today's date.""" + r"""The UUID of a specific payroll to fetch payment details for employees on that payroll.""" page: Annotated[ Optional[int], diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_employeesop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_employeesop.py index 7b5d89f7..266f3f69 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_employeesop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_employeesop.py @@ -21,9 +21,12 @@ class GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion(str, Enum): class Include(str, Enum): - CUSTOM_FIELDS = "custom_fields" ALL_COMPENSATIONS = "all_compensations" + ALL_HOME_ADDRESSES = "all_home_addresses" COMPANY_NAME = "company_name" + CURRENT_HOME_ADDRESS = "current_home_address" + CUSTOM_FIELDS = "custom_fields" + PORTAL_INVITATIONS = "portal_invitations" class GetV1CompaniesCompanyIDEmployeesRequestTypedDict(TypedDict): @@ -33,16 +36,26 @@ class GetV1CompaniesCompanyIDEmployeesRequestTypedDict(TypedDict): GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + location_uuid: NotRequired[str] + r"""Filter employees by a specific primary work location""" + payroll_uuid: NotRequired[str] + r"""Filter employees by a specific payroll""" search_term: NotRequired[str] r"""A string to search for in the object's names""" + sort_by: NotRequired[str] + r"""Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status""" include: NotRequired[List[Include]] - r"""Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - - custom_fields: Include employees' custom fields - - """ + r"""Include the requested attribute(s) in each employee response. Multiple options are comma separated.""" + onboarded: NotRequired[bool] + r"""Filters employees by those who have completed onboarding""" + onboarded_active: NotRequired[bool] + r"""Filters employees who are ready to work (onboarded AND active today)""" terminated: NotRequired[bool] - r"""Filters employees by the provided boolean""" + r"""Filters employees by those who have been or are scheduled to be terminated""" + terminated_today: NotRequired[bool] + r"""Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated)""" + uuids: NotRequired[List[str]] + r"""Optional subset of employees to fetch.""" page: NotRequired[int] r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" per: NotRequired[int] @@ -62,27 +75,65 @@ class GetV1CompaniesCompanyIDEmployeesRequest(BaseModel): ] = GetV1CompaniesCompanyIDEmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + location_uuid: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter employees by a specific primary work location""" + + payroll_uuid: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter employees by a specific payroll""" + search_term: Annotated[ Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None r"""A string to search for in the object's names""" + sort_by: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Sort employees by field. Cannot be used with search_term. Options: created_at, name, onboarding_status""" + include: Annotated[ Optional[List[Include]], FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), ] = None - r"""Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - - custom_fields: Include employees' custom fields + r"""Include the requested attribute(s) in each employee response. Multiple options are comma separated.""" - """ + onboarded: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filters employees by those who have completed onboarding""" + + onboarded_active: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filters employees who are ready to work (onboarded AND active today)""" terminated: Annotated[ Optional[bool], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None - r"""Filters employees by the provided boolean""" + r"""Filters employees by those who have been or are scheduled to be terminated""" + + terminated_today: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filters employees by those who have been terminated and whose termination is in effect today (excludes active and scheduled to be terminated)""" + + uuids: Annotated[ + Optional[List[str]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""Optional subset of employees to fetch.""" page: Annotated[ Optional[int], diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_payrolls_id_partner_disbursementsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_payrolls_id_partner_disbursementsop.py new file mode 100644 index 00000000..70c5d617 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_payrolls_id_partner_disbursementsop.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion( + str, Enum +): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestTypedDict(TypedDict): + company_id: str + r"""The UUID of the company""" + id: str + r"""The UUID of the payroll""" + x_gusto_api_version: NotRequired[ + GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest(BaseModel): + company_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the company""" + + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the payroll""" + + x_gusto_api_version: Annotated[ + Optional[ + GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion + ], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_payrolls_payroll_idop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_payrolls_payroll_idop.py index 2e8a3e53..48810dc4 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_payrolls_payroll_idop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_payrolls_payroll_idop.py @@ -1,7 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( @@ -15,11 +14,28 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude(str, Enum): BENEFITS = "benefits" DEDUCTIONS = "deductions" TAXES = "taxes" PAYROLL_STATUS_META = "payroll_status_meta" + TOTALS = "totals" + RISK_BLOCKERS = "risk_blockers" + REVERSALS = "reversals" + PAYROLL_TAXES = "payroll_taxes" + + +class SortBy(str, Enum): + r"""Field to sort employee compensations by""" + + FIRST_NAME = "first_name" + LAST_NAME = "last_name" class GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict(TypedDict): @@ -27,12 +43,20 @@ class GetV1CompaniesCompanyIDPayrollsPayrollIDRequestTypedDict(TypedDict): r"""The UUID of the company""" payroll_id: str r"""The UUID of the payroll""" + x_gusto_api_version: NotRequired[ + GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" include: NotRequired[ List[GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude] ] r"""Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes`""" - x_gusto_api_version: NotRequired[VersionHeader] - r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + page: NotRequired[int] + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + per: NotRequired[int] + r"""Number of objects per page. For majority of endpoints will default to 25""" + sort_by: NotRequired[SortBy] + r"""Field to sort employee compensations by""" class GetV1CompaniesCompanyIDPayrollsPayrollIDRequest(BaseModel): @@ -46,15 +70,33 @@ class GetV1CompaniesCompanyIDPayrollsPayrollIDRequest(BaseModel): ] r"""The UUID of the payroll""" + x_gusto_api_version: Annotated[ + Optional[GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + include: Annotated[ Optional[List[GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude]], FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), ] = None r"""Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes`""" - x_gusto_api_version: Annotated[ - Optional[VersionHeader], - pydantic.Field(alias="X-Gusto-API-Version"), - FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 - r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + + per: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Number of objects per page. For majority of endpoints will default to 25""" + + sort_by: Annotated[ + Optional[SortBy], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Field to sort employee compensations by""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_payrollsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_payrollsop.py index 1fc38d52..b23f0037 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_payrollsop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_id_payrollsop.py @@ -1,8 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .sort_order import SortOrder -from .versionheader import VersionHeader from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( @@ -16,9 +14,15 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class ProcessingStatuses(str, Enum): - UNPROCESSED = "unprocessed" PROCESSED = "processed" + UNPROCESSED = "unprocessed" class PayrollTypes(str, Enum): @@ -28,33 +32,47 @@ class PayrollTypes(str, Enum): class GetV1CompaniesCompanyIDPayrollsQueryParamInclude(str, Enum): - TOTALS = "totals" + TAXES = "taxes" PAYROLL_STATUS_META = "payroll_status_meta" + TOTALS = "totals" RISK_BLOCKERS = "risk_blockers" REVERSALS = "reversals" +class QueryParamSortOrder(str, Enum): + r"""A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty.""" + + ASC = "asc" + DESC = "desc" + + class GetV1CompaniesCompanyIDPayrollsRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" + x_gusto_api_version: NotRequired[ + GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" processing_statuses: NotRequired[List[ProcessingStatuses]] r"""Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed`""" payroll_types: NotRequired[List[PayrollTypes]] r"""Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle`""" + processed: NotRequired[bool] + r"""Whether to return processed or unprocessed payrolls""" + include_off_cycle: NotRequired[bool] + r"""Whether to include off cycle payrolls in the response""" include: NotRequired[List[GetV1CompaniesCompanyIDPayrollsQueryParamInclude]] - r"""Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta`""" + r"""Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes`""" start_date: NotRequired[str] r"""Return payrolls whose pay period is after the start date""" end_date: NotRequired[str] r"""Return payrolls whose pay period is before the end date. If left empty, defaults to today's date.""" - sort_order: NotRequired[SortOrder] - r"""A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty.""" page: NotRequired[int] r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" per: NotRequired[int] r"""Number of objects per page. For majority of endpoints will default to 25""" - x_gusto_api_version: NotRequired[VersionHeader] - r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + sort_order: NotRequired[QueryParamSortOrder] + r"""A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty.""" class GetV1CompaniesCompanyIDPayrollsRequest(BaseModel): @@ -63,6 +81,13 @@ class GetV1CompaniesCompanyIDPayrollsRequest(BaseModel): ] r"""The UUID of the company""" + x_gusto_api_version: Annotated[ + Optional[GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + processing_statuses: Annotated[ Optional[List[ProcessingStatuses]], FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), @@ -75,11 +100,23 @@ class GetV1CompaniesCompanyIDPayrollsRequest(BaseModel): ] = None r"""Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle`""" + processed: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Whether to return processed or unprocessed payrolls""" + + include_off_cycle: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Whether to include off cycle payrolls in the response""" + include: Annotated[ Optional[List[GetV1CompaniesCompanyIDPayrollsQueryParamInclude]], FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), ] = None - r"""Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta`""" + r"""Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes`""" start_date: Annotated[ Optional[str], @@ -93,12 +130,6 @@ class GetV1CompaniesCompanyIDPayrollsRequest(BaseModel): ] = None r"""Return payrolls whose pay period is before the end date. If left empty, defaults to today's date.""" - sort_order: Annotated[ - Optional[SortOrder], - FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = None - r"""A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty.""" - page: Annotated[ Optional[int], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -111,9 +142,8 @@ class GetV1CompaniesCompanyIDPayrollsRequest(BaseModel): ] = None r"""Number of objects per page. For majority of endpoints will default to 25""" - x_gusto_api_version: Annotated[ - Optional[VersionHeader], - pydantic.Field(alias="X-Gusto-API-Version"), - FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 - r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + sort_order: Annotated[ + Optional[QueryParamSortOrder], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_uuid_contractorsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_uuid_contractorsop.py index df74b0ce..f7dcea42 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_uuid_contractorsop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_companies_company_uuid_contractorsop.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .contractors_sort_by import ContractorsSortBy from .versionheader import VersionHeader from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( @@ -23,6 +24,8 @@ class GetV1CompaniesCompanyUUIDContractorsRequestTypedDict(TypedDict): r"""Number of objects per page. For majority of endpoints will default to 25""" search_term: NotRequired[str] r"""A string to search for in the object's names""" + sort_by: NotRequired[ContractorsSortBy] + r"""Sort contractors. Options: type, onboarding_status, name, created_at""" x_gusto_api_version: NotRequired[VersionHeader] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -51,6 +54,12 @@ class GetV1CompaniesCompanyUUIDContractorsRequest(BaseModel): ] = None r"""A string to search for in the object's names""" + sort_by: Annotated[ + Optional[ContractorsSortBy], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Sort contractors. Options: type, onboarding_status, name, created_at""" + x_gusto_api_version: Annotated[ Optional[VersionHeader], pydantic.Field(alias="X-Gusto-API-Version"), diff --git a/gusto_embedded/src/gusto_embedded/models/get_reports_report_uuidop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py similarity index 79% rename from gusto_embedded/src/gusto_embedded/models/get_reports_report_uuidop.py rename to gusto_embedded/src/gusto_embedded/models/get_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py index 2faab4ea..3995fc5f 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_reports_report_uuidop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py @@ -9,18 +9,20 @@ from typing_extensions import Annotated, NotRequired, TypedDict -class GetReportsReportUUIDRequestTypedDict(TypedDict): - report_uuid: str - r"""The UUID of the report request""" +class GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict( + TypedDict +): + company_benefit_id: str + r"""The UUID of the company benefit""" x_gusto_api_version: NotRequired[VersionHeader] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" -class GetReportsReportUUIDRequest(BaseModel): - report_uuid: Annotated[ +class GetV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest(BaseModel): + company_benefit_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] - r"""The UUID of the report request""" + r"""The UUID of the company benefit""" x_gusto_api_version: Annotated[ Optional[VersionHeader], diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_company_formsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_company_formsop.py index 11d3d019..911c9459 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_company_formsop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_company_formsop.py @@ -1,9 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .company_forms_sort_by import CompanyFormsSortBy from .versionheader import VersionHeader from gusto_embedded.types import BaseModel -from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) import pydantic from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -12,6 +18,8 @@ class GetV1CompanyFormsRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" + sort_by: NotRequired[CompanyFormsSortBy] + r"""Sort company forms. Options: name, year, quarter, draft, document_content_type""" x_gusto_api_version: NotRequired[VersionHeader] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -22,6 +30,12 @@ class GetV1CompanyFormsRequest(BaseModel): ] r"""The UUID of the company""" + sort_by: Annotated[ + Optional[CompanyFormsSortBy], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Sort company forms. Options: name, year, quarter, draft, document_content_type""" + x_gusto_api_version: Annotated[ Optional[VersionHeader], pydantic.Field(alias="X-Gusto-API-Version"), diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_document_pdfop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_document_pdfop.py index 9c69bd6d..ee38fef1 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_document_pdfop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_document_pdfop.py @@ -11,7 +11,7 @@ class GetV1ContractorDocumentPdfRequestTypedDict(TypedDict): document_uuid: str - r"""The ID or UUID of the document""" + r"""The UUID of the document""" x_gusto_api_version: NotRequired[VersionHeader] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -20,7 +20,7 @@ class GetV1ContractorDocumentPdfRequest(BaseModel): document_uuid: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] - r"""The ID or UUID of the document""" + r"""The UUID of the document""" x_gusto_api_version: Annotated[ Optional[VersionHeader], diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_documentop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_documentop.py index 900360bd..5bf50450 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_documentop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_documentop.py @@ -11,7 +11,7 @@ class GetV1ContractorDocumentRequestTypedDict(TypedDict): document_uuid: str - r"""The ID or UUID of the document""" + r"""The UUID of the document""" x_gusto_api_version: NotRequired[VersionHeader] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -20,7 +20,7 @@ class GetV1ContractorDocumentRequest(BaseModel): document_uuid: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] - r"""The ID or UUID of the document""" + r"""The UUID of the document""" x_gusto_api_version: Annotated[ Optional[VersionHeader], diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_payment_groups_contractor_payment_group_idop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_payment_groups_contractor_payment_group_idop.py index da8fabcd..42959554 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_payment_groups_contractor_payment_group_idop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_payment_groups_contractor_payment_group_idop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,20 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion( + str, Enum +): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequestTypedDict(TypedDict): contractor_payment_group_uuid: str r"""The UUID of the contractor payment group""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +33,10 @@ class GetV1ContractorPaymentGroupsContractorPaymentGroupIDRequest(BaseModel): r"""The UUID of the contractor payment group""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[ + GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion + ], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1ContractorPaymentGroupsContractorPaymentGroupIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_payment_groups_id_partner_disbursementsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_payment_groups_id_partner_disbursementsop.py new file mode 100644 index 00000000..dcc4b632 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_contractor_payment_groups_id_partner_disbursementsop.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion( + str, Enum +): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetV1ContractorPaymentGroupsIDPartnerDisbursementsRequestTypedDict(TypedDict): + id: str + r"""The UUID of the contractor payment group""" + x_gusto_api_version: NotRequired[ + GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetV1ContractorPaymentGroupsIDPartnerDisbursementsRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the contractor payment group""" + + x_gusto_api_version: Annotated[ + Optional[ + GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion + ], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_home_addressesop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_home_addressesop.py index f914492c..6ce5ced4 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_home_addressesop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_home_addressesop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1EmployeesEmployeeIDHomeAddressesRequestTypedDict(TypedDict): employee_id: str r"""The UUID of the employee""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetV1EmployeesEmployeeIDHomeAddressesRequest(BaseModel): r"""The UUID of the employee""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_recurring_reimbursementsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_recurring_reimbursementsop.py new file mode 100644 index 00000000..d894de78 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_recurring_reimbursementsop.py @@ -0,0 +1,85 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetV1EmployeesEmployeeIDRecurringReimbursementsRequestTypedDict(TypedDict): + employee_id: str + r"""The UUID of the employee""" + x_gusto_api_version: NotRequired[ + GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + page: NotRequired[int] + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + per: NotRequired[int] + r"""Number of objects per page. For majority of endpoints will default to 25""" + + +class GetV1EmployeesEmployeeIDRecurringReimbursementsRequest(BaseModel): + employee_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the employee""" + + x_gusto_api_version: Annotated[ + Optional[GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + + per: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Number of objects per page. For majority of endpoints will default to 25""" + + +class GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBodyTypedDict(TypedDict): + uuid: str + employee_uuid: str + description: str + amount: str + version: str + created_at: NotRequired[str] + updated_at: NotRequired[str] + + +class GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBody(BaseModel): + uuid: str + + employee_uuid: str + + description: str + + amount: str + + version: str + + created_at: Optional[str] = None + + updated_at: Optional[str] = None diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_state_taxesop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_state_taxesop.py index 6db2921d..cc1ebab9 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_state_taxesop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_state_taxesop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1EmployeesEmployeeIDStateTaxesRequestTypedDict(TypedDict): employee_uuid: str r"""The UUID of the employee""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetV1EmployeesEmployeeIDStateTaxesRequest(BaseModel): r"""The UUID of the employee""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_work_addressesop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_work_addressesop.py index 93299558..0ccf7cec 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_work_addressesop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_id_work_addressesop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1EmployeesEmployeeIDWorkAddressesRequestTypedDict(TypedDict): employee_id: str r"""The UUID of the employee""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetV1EmployeesEmployeeIDWorkAddressesRequest(BaseModel): r"""The UUID of the employee""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_uuid_pay_stubsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_uuid_pay_stubsop.py index dd872dd3..03a92221 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_uuid_pay_stubsop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_employees_employee_uuid_pay_stubsop.py @@ -3,7 +3,12 @@ from __future__ import annotations from enum import Enum from gusto_embedded.types import BaseModel -from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) import pydantic from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -22,6 +27,10 @@ class GetV1EmployeesEmployeeUUIDPayStubsRequestTypedDict(TypedDict): GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + page: NotRequired[int] + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + per: NotRequired[int] + r"""Number of objects per page. For majority of endpoints will default to 25""" class GetV1EmployeesEmployeeUUIDPayStubsRequest(BaseModel): @@ -36,3 +45,15 @@ class GetV1EmployeesEmployeeUUIDPayStubsRequest(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + + per: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Number of objects per page. For majority of endpoints will default to 25""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_employeesop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_employeesop.py index cef658d2..0d0787a9 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_employeesop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_employeesop.py @@ -21,9 +21,12 @@ class GetV1EmployeesHeaderXGustoAPIVersion(str, Enum): class QueryParamInclude(str, Enum): - CUSTOM_FIELDS = "custom_fields" ALL_COMPENSATIONS = "all_compensations" + ALL_HOME_ADDRESSES = "all_home_addresses" COMPANY_NAME = "company_name" + CURRENT_HOME_ADDRESS = "current_home_address" + CUSTOM_FIELDS = "custom_fields" + PORTAL_INVITATIONS = "portal_invitations" class GetV1EmployeesRequestTypedDict(TypedDict): @@ -32,11 +35,7 @@ class GetV1EmployeesRequestTypedDict(TypedDict): x_gusto_api_version: NotRequired[GetV1EmployeesHeaderXGustoAPIVersion] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" include: NotRequired[List[QueryParamInclude]] - r"""Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - - custom_fields: Include employees' custom fields - - """ + r"""Include the requested attribute(s) in each employee response. Multiple options are comma separated.""" class GetV1EmployeesRequest(BaseModel): @@ -56,8 +55,4 @@ class GetV1EmployeesRequest(BaseModel): Optional[List[QueryParamInclude]], FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), ] = None - r"""Include the requested attribute(s) in each employee response, multiple options are comma separated. Available options: - - all_compensations: Include all effective dated compensations for each job instead of only the current compensation - - custom_fields: Include employees' custom fields - - """ + r"""Include the requested attribute(s) in each employee response. Multiple options are comma separated.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_home_addresses_home_address_uuidop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_home_addresses_home_address_uuidop.py index 9d8e593b..1fba256b 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_home_addresses_home_address_uuidop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_home_addresses_home_address_uuidop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1HomeAddressesHomeAddressUUIDRequestTypedDict(TypedDict): home_address_uuid: str r"""The UUID of the home address""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetV1HomeAddressesHomeAddressUUIDRequest(BaseModel): r"""The UUID of the home address""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_payment_receipts_payrolls_payroll_uuidop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_payment_receipts_payrolls_payroll_uuidop.py index 78cf8cb0..eba6e8d8 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_payment_receipts_payrolls_payroll_uuidop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_payment_receipts_payrolls_payroll_uuidop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1PaymentReceiptsPayrollsPayrollUUIDRequestTypedDict(TypedDict): payroll_uuid: str r"""The UUID of the payroll""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetV1PaymentReceiptsPayrollsPayrollUUIDRequest(BaseModel): r"""The UUID of the payroll""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_recurring_reimbursementsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_recurring_reimbursementsop.py new file mode 100644 index 00000000..d7787f6f --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_recurring_reimbursementsop.py @@ -0,0 +1,66 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetV1RecurringReimbursementsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetV1RecurringReimbursementsRequestTypedDict(TypedDict): + id: str + r"""The UUID of the reimbursement""" + x_gusto_api_version: NotRequired[GetV1RecurringReimbursementsHeaderXGustoAPIVersion] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetV1RecurringReimbursementsRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the reimbursement""" + + x_gusto_api_version: Annotated[ + Optional[GetV1RecurringReimbursementsHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetV1RecurringReimbursementsResponseBodyTypedDict(TypedDict): + r"""successful""" + + uuid: str + employee_uuid: str + description: str + amount: str + version: str + created_at: NotRequired[str] + updated_at: NotRequired[str] + + +class GetV1RecurringReimbursementsResponseBody(BaseModel): + r"""successful""" + + uuid: str + + employee_uuid: str + + description: str + + amount: str + + version: str + + created_at: Optional[str] = None + + updated_at: Optional[str] = None diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_salary_estimates_idop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_salary_estimates_idop.py new file mode 100644 index 00000000..a39f3e07 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_salary_estimates_idop.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetV1SalaryEstimatesIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetV1SalaryEstimatesIDRequestTypedDict(TypedDict): + uuid: str + r"""The UUID of the salary estimate""" + x_gusto_api_version: NotRequired[GetV1SalaryEstimatesIDHeaderXGustoAPIVersion] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetV1SalaryEstimatesIDRequest(BaseModel): + uuid: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the salary estimate""" + + x_gusto_api_version: Annotated[ + Optional[GetV1SalaryEstimatesIDHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1SalaryEstimatesIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_salary_estimates_occupationsop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_salary_estimates_occupationsop.py new file mode 100644 index 00000000..69c74b45 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_salary_estimates_occupationsop.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + QueryParamMetadata, + SecurityMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetV1SalaryEstimatesOccupationsSecurityTypedDict(TypedDict): + system_access_auth: str + + +class GetV1SalaryEstimatesOccupationsSecurity(BaseModel): + system_access_auth: Annotated[ + str, + FieldMetadata( + security=SecurityMetadata( + scheme=True, + scheme_type="http", + sub_type="bearer", + field_name="Authorization", + ) + ), + ] + + +class GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetV1SalaryEstimatesOccupationsRequestTypedDict(TypedDict): + search: str + r"""Search term for occupation (minimum 3 characters)""" + x_gusto_api_version: NotRequired[ + GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetV1SalaryEstimatesOccupationsRequest(BaseModel): + search: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""Search term for occupation (minimum 3 characters)""" + + x_gusto_api_version: Annotated[ + Optional[GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_webhooks_health_checkop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_webhooks_health_checkop.py new file mode 100644 index 00000000..ef8d0361 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_webhooks_health_checkop.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import FieldMetadata, HeaderMetadata, SecurityMetadata +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetV1WebhooksHealthCheckSecurityTypedDict(TypedDict): + system_access_auth: str + + +class GetV1WebhooksHealthCheckSecurity(BaseModel): + system_access_auth: Annotated[ + str, + FieldMetadata( + security=SecurityMetadata( + scheme=True, + scheme_type="http", + sub_type="bearer", + field_name="Authorization", + ) + ), + ] + + +class GetV1WebhooksHealthCheckHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class GetV1WebhooksHealthCheckRequestTypedDict(TypedDict): + x_gusto_api_version: NotRequired[GetV1WebhooksHealthCheckHeaderXGustoAPIVersion] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class GetV1WebhooksHealthCheckRequest(BaseModel): + x_gusto_api_version: Annotated[ + Optional[GetV1WebhooksHealthCheckHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = GetV1WebhooksHealthCheckHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/get_v1_work_addresses_work_address_uuidop.py b/gusto_embedded/src/gusto_embedded/models/get_v1_work_addresses_work_address_uuidop.py index e74e493f..bc554ce6 100644 --- a/gusto_embedded/src/gusto_embedded/models/get_v1_work_addresses_work_address_uuidop.py +++ b/gusto_embedded/src/gusto_embedded/models/get_v1_work_addresses_work_address_uuidop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,10 +9,18 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class GetV1WorkAddressesWorkAddressUUIDRequestTypedDict(TypedDict): work_address_uuid: str r"""The UUID of the work address""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -23,8 +31,8 @@ class GetV1WorkAddressesWorkAddressUUIDRequest(BaseModel): r"""The UUID of the work address""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = GetV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/gustoerror.py b/gusto_embedded/src/gusto_embedded/models/gustoerror.py new file mode 100644 index 00000000..6dfd0624 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/gustoerror.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import httpx +from typing import Optional +from dataclasses import dataclass, field + + +@dataclass(unsafe_hash=True) +class GustoError(Exception): + """The base class for all HTTP error responses.""" + + message: str + status_code: int + body: str + headers: httpx.Headers = field(hash=False) + raw_response: httpx.Response = field(hash=False) + + def __init__( + self, message: str, raw_response: httpx.Response, body: Optional[str] = None + ): + object.__setattr__(self, "message", message) + object.__setattr__(self, "status_code", raw_response.status_code) + object.__setattr__( + self, "body", body if body is not None else raw_response.text + ) + object.__setattr__(self, "headers", raw_response.headers) + object.__setattr__(self, "raw_response", raw_response) + + def __str__(self): + return self.message diff --git a/gusto_embedded/src/gusto_embedded/models/information_request.py b/gusto_embedded/src/gusto_embedded/models/information_request.py index e937f303..b457fd0c 100644 --- a/gusto_embedded/src/gusto_embedded/models/information_request.py +++ b/gusto_embedded/src/gusto_embedded/models/information_request.py @@ -2,7 +2,14 @@ from __future__ import annotations from enum import Enum -from gusto_embedded.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -31,7 +38,7 @@ class InformationRequestTypedDict(TypedDict): r"""Unique identifier of an information request""" company_uuid: NotRequired[str] r"""Unique identifier of the company to which the information requests belongs""" - type: NotRequired[InformationRequestType] + type: NotRequired[Nullable[InformationRequestType]] r"""The type of information request""" status: NotRequired[InformationRequestStatus] r"""The status of the information request""" @@ -48,7 +55,7 @@ class InformationRequest(BaseModel): company_uuid: Optional[str] = None r"""Unique identifier of the company to which the information requests belongs""" - type: Optional[InformationRequestType] = None + type: OptionalNullable[InformationRequestType] = UNSET r"""The type of information request""" status: Optional[InformationRequestStatus] = None @@ -56,3 +63,33 @@ class InformationRequest(BaseModel): blocking_payroll: Optional[bool] = None r"""If true, this information request is blocking payroll, and may require response or requires review from our Risk Ops team.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["uuid", "company_uuid", "type", "status", "blocking_payroll"] + nullable_fields = ["type"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/job.py b/gusto_embedded/src/gusto_embedded/models/job.py index 7172979e..1db2bb3b 100644 --- a/gusto_embedded/src/gusto_embedded/models/job.py +++ b/gusto_embedded/src/gusto_embedded/models/job.py @@ -2,6 +2,7 @@ from __future__ import annotations from .compensation import Compensation, CompensationTypedDict +from .location import Location, LocationTypedDict from gusto_embedded.types import ( BaseModel, Nullable, @@ -42,6 +43,10 @@ class JobTypedDict(TypedDict): state_wc_class_code: NotRequired[Nullable[str]] r"""The risk class code for workers' compensation in Washington state. Please visit [Washington state's Risk Class page](https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/) to learn more.""" compensations: NotRequired[List[CompensationTypedDict]] + location_uuid: NotRequired[str] + r"""The uuid of the employee's work location.""" + location: NotRequired[LocationTypedDict] + r"""The representation of an address in Gusto.""" class Job(BaseModel): @@ -85,6 +90,12 @@ class Job(BaseModel): compensations: Optional[List[Compensation]] = None + location_uuid: Optional[str] = None + r"""The uuid of the employee's work location.""" + + location: Optional[Location] = None + r"""The representation of an address in Gusto.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -100,6 +111,8 @@ def serialize_model(self, handler): "state_wc_covered", "state_wc_class_code", "compensations", + "location_uuid", + "location", ] nullable_fields = [ "title", diff --git a/gusto_embedded/src/gusto_embedded/models/location.py b/gusto_embedded/src/gusto_embedded/models/location.py index 72d3f9c7..5f268ca2 100644 --- a/gusto_embedded/src/gusto_embedded/models/location.py +++ b/gusto_embedded/src/gusto_embedded/models/location.py @@ -30,8 +30,6 @@ class LocationTypedDict(TypedDict): state: NotRequired[str] zip: NotRequired[str] country: NotRequired[str] - active: NotRequired[bool] - r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" mailing_address: NotRequired[bool] r"""Specifies if the location is the company's mailing address. Only included if the location belongs to a company.""" filing_address: NotRequired[bool] @@ -40,6 +38,10 @@ class LocationTypedDict(TypedDict): r"""Datetime for when location is created""" updated_at: NotRequired[str] r"""Datetime for when location is updated""" + active: NotRequired[bool] + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" + inactive: NotRequired[bool] + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" class Location(BaseModel): @@ -69,9 +71,6 @@ class Location(BaseModel): country: Optional[str] = "USA" - active: Optional[bool] = None - r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" - mailing_address: Optional[bool] = None r"""Specifies if the location is the company's mailing address. Only included if the location belongs to a company.""" @@ -84,6 +83,12 @@ class Location(BaseModel): updated_at: Optional[str] = None r"""Datetime for when location is updated""" + active: Optional[bool] = None + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" + + inactive: Optional[bool] = None + r"""The status of the location. Inactive locations have been deleted, but may still have historical data associated with them.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -96,11 +101,12 @@ def serialize_model(self, handler): "state", "zip", "country", - "active", "mailing_address", "filing_address", "created_at", "updated_at", + "active", + "inactive", ] nullable_fields = ["street_2"] null_default_fields = [] diff --git a/gusto_embedded/src/gusto_embedded/models/no_response_error.py b/gusto_embedded/src/gusto_embedded/models/no_response_error.py new file mode 100644 index 00000000..1deab64b --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/no_response_error.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from dataclasses import dataclass + + +@dataclass(unsafe_hash=True) +class NoResponseError(Exception): + """Error raised when no HTTP response is received from the server.""" + + message: str + + def __init__(self, message: str = "No response received"): + object.__setattr__(self, "message", message) + super().__init__(message) + + def __str__(self): + return self.message diff --git a/gusto_embedded/src/gusto_embedded/models/not_found_error_object.py b/gusto_embedded/src/gusto_embedded/models/not_found_error_object.py new file mode 100644 index 00000000..c12a7dc0 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/not_found_error_object.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .entity_error_object import EntityErrorObject +from dataclasses import dataclass, field +from gusto_embedded.models import GustoError +from gusto_embedded.types import BaseModel +import httpx +from typing import List, Optional + + +class NotFoundErrorObjectData(BaseModel): + errors: List[EntityErrorObject] + + +@dataclass(unsafe_hash=True) +class NotFoundErrorObject(GustoError): + r"""Not Found + + The requested resource does not exist. Make sure the provided ID/UUID is valid. + """ + + data: NotFoundErrorObjectData = field(hash=False) + + def __init__( + self, + data: NotFoundErrorObjectData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/gusto_embedded/src/gusto_embedded/models/notification.py b/gusto_embedded/src/gusto_embedded/models/notification.py index 90ea76f2..2245fa33 100644 --- a/gusto_embedded/src/gusto_embedded/models/notification.py +++ b/gusto_embedded/src/gusto_embedded/models/notification.py @@ -2,7 +2,8 @@ from __future__ import annotations from enum import Enum -from gusto_embedded.types import BaseModel +from gusto_embedded.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer from typing import Dict, List, Optional from typing_extensions import NotRequired, TypedDict @@ -15,9 +16,23 @@ class NotificationStatus(str, Enum): EXPIRED = "expired" +class NotificationEntityType(str, Enum): + r"""The type of entity being described.""" + + BANK_ACCOUNT = "BankAccount" + CONTRACTOR = "Contractor" + CONTRACTOR_PAYMENT = "ContractorPayment" + EMPLOYEE = "Employee" + PAYROLL = "Payroll" + PAY_SCHEDULE = "PaySchedule" + RECOVERY_CASE = "RecoveryCase" + SIGNATORY = "Signatory" + WIRE_IN_REQUEST = "Wire In Request" + + class ResourcesTypedDict(TypedDict): - entity_type: str - r"""The type of entity being described, could be “Contractor”, “Employee”, “BankAccount”, “Payroll”, “ContractorPayment”, “RecoveryCase”, or “Signatory”""" + entity_type: NotificationEntityType + r"""The type of entity being described.""" entity_uuid: str r"""Unique identifier of the entity""" reference_type: NotRequired[str] @@ -27,8 +42,8 @@ class ResourcesTypedDict(TypedDict): class Resources(BaseModel): - entity_type: str - r"""The type of entity being described, could be “Contractor”, “Employee”, “BankAccount”, “Payroll”, “ContractorPayment”, “RecoveryCase”, or “Signatory”""" + entity_type: NotificationEntityType + r"""The type of entity being described.""" entity_uuid: str r"""Unique identifier of the entity""" @@ -41,69 +56,99 @@ class Resources(BaseModel): class NotificationTypedDict(TypedDict): - r"""Representation of a notification""" + r"""Example response""" uuid: str r"""Unique identifier of a notification.""" - company_uuid: NotRequired[str] + company_uuid: str r"""Unique identifier of the company to which the notification belongs.""" - title: NotRequired[str] + title: str r"""The title of the notification. This highlights the actionable component of the notification.""" - message: NotRequired[str] + message: str r"""The message of the notification. This provides additional context for the user and recommends a specific action to resolve the notification.""" - status: NotRequired[NotificationStatus] + status: NotificationStatus r"""Represents the notification's status as managed by our system. It is updated based on observable system events and internal business logic, and does not reflect resolution steps taken outside our system. This field is read-only and cannot be modified via the API.""" - category: NotRequired[str] + category: str r"""The notification's category.""" - actionable: NotRequired[bool] + actionable: bool r"""Indicates whether a notification requires action or not. If false, the notification provides critical information only.""" - can_block_payroll: NotRequired[bool] + can_block_payroll: bool r"""Indicates whether a notification may block ability to run payroll. If true, we suggest that these notifications are prioritized to your end users.""" - published_at: NotRequired[str] + published_at: str r"""Timestamp of when the notification was published.""" - due_at: NotRequired[str] + due_at: Nullable[str] r"""Timestamp of when the notification is due. If the notification has no due date, this field will be null.""" + resources: List[ResourcesTypedDict] + r"""An array of entities relevant to the notification""" template_variables: NotRequired[Dict[str, str]] r"""An object containing template variables used to render the notification. The structure of this object depends on the notification category. Each category defines a fixed set of variable names (keys), which are always present. The values of these variables can vary depending on the specific notification instance.""" - resources: NotRequired[List[ResourcesTypedDict]] - r"""An array of entities relevant to the notification""" class Notification(BaseModel): - r"""Representation of a notification""" + r"""Example response""" uuid: str r"""Unique identifier of a notification.""" - company_uuid: Optional[str] = None + company_uuid: str r"""Unique identifier of the company to which the notification belongs.""" - title: Optional[str] = None + title: str r"""The title of the notification. This highlights the actionable component of the notification.""" - message: Optional[str] = None + message: str r"""The message of the notification. This provides additional context for the user and recommends a specific action to resolve the notification.""" - status: Optional[NotificationStatus] = None + status: NotificationStatus r"""Represents the notification's status as managed by our system. It is updated based on observable system events and internal business logic, and does not reflect resolution steps taken outside our system. This field is read-only and cannot be modified via the API.""" - category: Optional[str] = None + category: str r"""The notification's category.""" - actionable: Optional[bool] = None + actionable: bool r"""Indicates whether a notification requires action or not. If false, the notification provides critical information only.""" - can_block_payroll: Optional[bool] = None + can_block_payroll: bool r"""Indicates whether a notification may block ability to run payroll. If true, we suggest that these notifications are prioritized to your end users.""" - published_at: Optional[str] = None + published_at: str r"""Timestamp of when the notification was published.""" - due_at: Optional[str] = None + due_at: Nullable[str] r"""Timestamp of when the notification is due. If the notification has no due date, this field will be null.""" + resources: List[Resources] + r"""An array of entities relevant to the notification""" + template_variables: Optional[Dict[str, str]] = None r"""An object containing template variables used to render the notification. The structure of this object depends on the notification category. Each category defines a fixed set of variable names (keys), which are always present. The values of these variables can vary depending on the specific notification instance.""" - resources: Optional[List[Resources]] = None - r"""An array of entities relevant to the notification""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["template_variables"] + nullable_fields = ["due_at"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/paid_holidays.py b/gusto_embedded/src/gusto_embedded/models/paid_holidays.py index d68397f1..9834fc0c 100644 --- a/gusto_embedded/src/gusto_embedded/models/paid_holidays.py +++ b/gusto_embedded/src/gusto_embedded/models/paid_holidays.py @@ -33,12 +33,12 @@ class Schema(BaseModel): class PaidHolidaysTypedDict(TypedDict): - r"""Representation of a company's paid holidays as descibed by their Holiday Pay Policy""" + r"""Representation of a company's paid holidays as described by their Holiday Pay Policy""" schema_: NotRequired[SchemaTypedDict] class PaidHolidays(BaseModel): - r"""Representation of a company's paid holidays as descibed by their Holiday Pay Policy""" + r"""Representation of a company's paid holidays as described by their Holiday Pay Policy""" schema_: Annotated[Optional[Schema], pydantic.Field(alias="schema")] = None diff --git a/gusto_embedded/src/gusto_embedded/models/paid_time_off.py b/gusto_embedded/src/gusto_embedded/models/paid_time_off.py index 733dadf9..d0f179fc 100644 --- a/gusto_embedded/src/gusto_embedded/models/paid_time_off.py +++ b/gusto_embedded/src/gusto_embedded/models/paid_time_off.py @@ -25,21 +25,21 @@ class Name(str, Enum): class PaidTimeOffTypedDict(TypedDict): r"""The representation of paid time off in Gusto.""" - name: NotRequired[Name] + name: NotRequired[Nullable[Name]] r"""The name of the paid time off type.""" - policy_name: NotRequired[str] + policy_name: NotRequired[Nullable[str]] r"""The name of the time off policy.""" - policy_uuid: NotRequired[str] + policy_uuid: NotRequired[Nullable[str]] r"""The UUID of the time off policy.""" - accrual_unit: NotRequired[str] + accrual_unit: NotRequired[Nullable[str]] r"""The unit the PTO type is accrued in.""" - accrual_rate: NotRequired[str] + accrual_rate: NotRequired[Nullable[str]] r"""The number of accrual units accrued per accrual period.""" - accrual_method: NotRequired[str] + accrual_method: NotRequired[Nullable[str]] r"""The accrual method of the time off policy""" - accrual_period: NotRequired[str] + accrual_period: NotRequired[Nullable[str]] r"""The frequency at which the PTO type is accrued.""" - accrual_balance: NotRequired[str] + accrual_balance: NotRequired[Nullable[str]] r"""The number of accrual units accrued.""" maximum_accrual_balance: NotRequired[Nullable[str]] r"""The maximum number of accrual units allowed. A null value signifies no maximum.""" @@ -50,28 +50,28 @@ class PaidTimeOffTypedDict(TypedDict): class PaidTimeOff(BaseModel): r"""The representation of paid time off in Gusto.""" - name: Optional[Name] = None + name: OptionalNullable[Name] = UNSET r"""The name of the paid time off type.""" - policy_name: Optional[str] = None + policy_name: OptionalNullable[str] = UNSET r"""The name of the time off policy.""" - policy_uuid: Optional[str] = None + policy_uuid: OptionalNullable[str] = UNSET r"""The UUID of the time off policy.""" - accrual_unit: Optional[str] = None + accrual_unit: OptionalNullable[str] = UNSET r"""The unit the PTO type is accrued in.""" - accrual_rate: Optional[str] = None + accrual_rate: OptionalNullable[str] = UNSET r"""The number of accrual units accrued per accrual period.""" - accrual_method: Optional[str] = None + accrual_method: OptionalNullable[str] = UNSET r"""The accrual method of the time off policy""" - accrual_period: Optional[str] = None + accrual_period: OptionalNullable[str] = UNSET r"""The frequency at which the PTO type is accrued.""" - accrual_balance: Optional[str] = None + accrual_balance: OptionalNullable[str] = UNSET r"""The number of accrual units accrued.""" maximum_accrual_balance: OptionalNullable[str] = UNSET @@ -94,7 +94,17 @@ def serialize_model(self, handler): "maximum_accrual_balance", "paid_at_termination", ] - nullable_fields = ["maximum_accrual_balance"] + nullable_fields = [ + "name", + "policy_name", + "policy_uuid", + "accrual_unit", + "accrual_rate", + "accrual_method", + "accrual_period", + "accrual_balance", + "maximum_accrual_balance", + ] null_default_fields = [] serialized = handler(self) diff --git a/gusto_embedded/src/gusto_embedded/models/patch_v1_companies_company_id_payrolls_id_partner_disbursementsop.py b/gusto_embedded/src/gusto_embedded/models/patch_v1_companies_company_id_payrolls_id_partner_disbursementsop.py new file mode 100644 index 00000000..028bcf55 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/patch_v1_companies_company_id_payrolls_id_partner_disbursementsop.py @@ -0,0 +1,124 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion( + str, Enum +): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentMethod(str, Enum): + r"""Payment method for the employee""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentStatus(str, Enum): + r"""Status of the payment disbursement""" + + PENDING = "Pending" + PAID = "Paid" + NOT_PARTNER_MANAGED = "Not partner managed" + CONVERTED_TO_CHECK = "Converted to check" + + +class PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursementsTypedDict( + TypedDict +): + employee_uuid: str + r"""UUID of the employee""" + payment_method: NotRequired[ + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentMethod + ] + r"""Payment method for the employee""" + payment_status: NotRequired[ + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentStatus + ] + r"""Status of the payment disbursement""" + + +class PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements(BaseModel): + employee_uuid: str + r"""UUID of the employee""" + + payment_method: Optional[ + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentMethod + ] = None + r"""Payment method for the employee""" + + payment_status: Optional[ + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsPaymentStatus + ] = None + r"""Status of the payment disbursement""" + + +class PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBodyTypedDict( + TypedDict +): + disbursements: List[ + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursementsTypedDict + ] + + +class PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBody(BaseModel): + disbursements: List[ + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements + ] + + +class PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestTypedDict( + TypedDict +): + company_id: str + r"""The UUID of the company""" + id: str + r"""The UUID of the payroll""" + x_gusto_api_version: NotRequired[ + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + request_body: NotRequired[ + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBodyTypedDict + ] + + +class PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest(BaseModel): + company_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the company""" + + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the payroll""" + + x_gusto_api_version: Annotated[ + Optional[ + PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion + ], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + request_body: Annotated[ + Optional[PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBody], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = None diff --git a/gusto_embedded/src/gusto_embedded/models/patch_v1_contractor_payment_groups_id_partner_disbursementsop.py b/gusto_embedded/src/gusto_embedded/models/patch_v1_contractor_payment_groups_id_partner_disbursementsop.py new file mode 100644 index 00000000..d097c6e9 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/patch_v1_contractor_payment_groups_id_partner_disbursementsop.py @@ -0,0 +1,115 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion( + str, Enum +): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentMethod(str, Enum): + r"""Payment method for the contractor""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentStatus(str, Enum): + r"""Status of the payment disbursement""" + + PENDING = "Pending" + PAID = "Paid" + NOT_PARTNER_MANAGED = "Not partner managed" + CONVERTED_TO_CHECK = "Converted to check" + + +class PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursementsTypedDict( + TypedDict +): + contractor_payment_uuid: str + r"""UUID of the contractor payment""" + payment_method: NotRequired[ + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentMethod + ] + r"""Payment method for the contractor""" + payment_status: NotRequired[ + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentStatus + ] + r"""Status of the payment disbursement""" + + +class PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements(BaseModel): + contractor_payment_uuid: str + r"""UUID of the contractor payment""" + + payment_method: Optional[ + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentMethod + ] = None + r"""Payment method for the contractor""" + + payment_status: Optional[ + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsPaymentStatus + ] = None + r"""Status of the payment disbursement""" + + +class PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBodyTypedDict( + TypedDict +): + disbursements: List[ + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursementsTypedDict + ] + + +class PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBody(BaseModel): + disbursements: List[ + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsDisbursements + ] + + +class PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestTypedDict(TypedDict): + id: str + r"""The UUID of the contractor payment group""" + x_gusto_api_version: NotRequired[ + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + request_body: NotRequired[ + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBodyTypedDict + ] + + +class PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the contractor payment group""" + + x_gusto_api_version: Annotated[ + Optional[ + PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion + ], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = PatchV1ContractorPaymentGroupsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + request_body: Annotated[ + Optional[PatchV1ContractorPaymentGroupsIDPartnerDisbursementsRequestBody], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = None diff --git a/gusto_embedded/src/gusto_embedded/models/pay_schedule_assignment_employee.py b/gusto_embedded/src/gusto_embedded/models/pay_schedule_assignment_employee.py index 543eb565..05d16560 100644 --- a/gusto_embedded/src/gusto_embedded/models/pay_schedule_assignment_employee.py +++ b/gusto_embedded/src/gusto_embedded/models/pay_schedule_assignment_employee.py @@ -1,7 +1,14 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from gusto_embedded.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -9,7 +16,7 @@ class PayScheduleAssignmentEmployeeTypedDict(TypedDict): employee_uuid: NotRequired[str] r"""The UUID of the employee.""" - pay_schedule_uuid: NotRequired[str] + pay_schedule_uuid: NotRequired[Nullable[str]] r"""The employee's pay schedule UUID.""" @@ -17,5 +24,35 @@ class PayScheduleAssignmentEmployee(BaseModel): employee_uuid: Optional[str] = None r"""The UUID of the employee.""" - pay_schedule_uuid: Optional[str] = None + pay_schedule_uuid: OptionalNullable[str] = UNSET r"""The employee's pay schedule UUID.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["employee_uuid", "pay_schedule_uuid"] + nullable_fields = ["pay_schedule_uuid"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/payment_configs.py b/gusto_embedded/src/gusto_embedded/models/payment_configs.py index 39bc14e6..ef913ede 100644 --- a/gusto_embedded/src/gusto_embedded/models/payment_configs.py +++ b/gusto_embedded/src/gusto_embedded/models/payment_configs.py @@ -1,11 +1,41 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from gusto_embedded.types import BaseModel -from typing import Optional +from enum import Enum +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional from typing_extensions import NotRequired, TypedDict +class BlockerType(str, Enum): + r"""The type of blocker""" + + MINIMUM_DAYS = "minimum_days" + MINIMUM_FUNDED_PAYMENTS = "minimum_funded_payments" + + +class EarnedFastAchBlockersTypedDict(TypedDict): + blocker_type: NotRequired[BlockerType] + r"""The type of blocker""" + threshold: NotRequired[float] + r"""The threshold needed to unblock""" + + +class EarnedFastAchBlockers(BaseModel): + blocker_type: Optional[BlockerType] = None + r"""The type of blocker""" + + threshold: Optional[float] = None + r"""The threshold needed to unblock""" + + class PaymentConfigsTypedDict(TypedDict): r"""Example response""" @@ -13,10 +43,14 @@ class PaymentConfigsTypedDict(TypedDict): r"""Company uuid""" partner_uuid: NotRequired[str] r"""Partner uuid""" - fast_payment_limit: NotRequired[str] + fast_payment_limit: NotRequired[Nullable[str]] r"""Payment limit for 1-day or 2-day payroll""" payment_speed: NotRequired[str] r"""Payment speed for 1-day, 2-day, 4-day""" + partner_owned_disbursement: NotRequired[bool] + r"""Whether the company is configured to use the partner-owned disbursement payment rail""" + earned_fast_ach_blockers: NotRequired[List[EarnedFastAchBlockersTypedDict]] + r"""Blockers preventing the company from earning fast ACH payments""" class PaymentConfigs(BaseModel): @@ -28,8 +62,51 @@ class PaymentConfigs(BaseModel): partner_uuid: Optional[str] = None r"""Partner uuid""" - fast_payment_limit: Optional[str] = None + fast_payment_limit: OptionalNullable[str] = UNSET r"""Payment limit for 1-day or 2-day payroll""" payment_speed: Optional[str] = None r"""Payment speed for 1-day, 2-day, 4-day""" + + partner_owned_disbursement: Optional[bool] = None + r"""Whether the company is configured to use the partner-owned disbursement payment rail""" + + earned_fast_ach_blockers: Optional[List[EarnedFastAchBlockers]] = None + r"""Blockers preventing the company from earning fast ACH payments""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "company_uuid", + "partner_uuid", + "fast_payment_limit", + "payment_speed", + "partner_owned_disbursement", + "earned_fast_ach_blockers", + ] + nullable_fields = ["fast_payment_limit"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/payroll.py b/gusto_embedded/src/gusto_embedded/models/payroll.py index 9d96ad29..794cdc9b 100644 --- a/gusto_embedded/src/gusto_embedded/models/payroll.py +++ b/gusto_embedded/src/gusto_embedded/models/payroll.py @@ -10,10 +10,6 @@ PayrollCreditBlockersType, PayrollCreditBlockersTypeTypedDict, ) -from .payroll_employee_compensations_type import ( - PayrollEmployeeCompensationsType, - PayrollEmployeeCompensationsTypeTypedDict, -) from .payroll_pay_period_type import PayrollPayPeriodType, PayrollPayPeriodTypeTypedDict from .payroll_payment_speed_changed_type import ( PayrollPaymentSpeedChangedType, @@ -31,6 +27,7 @@ PayrollSubmissionBlockersType, PayrollSubmissionBlockersTypeTypedDict, ) +from .payroll_taxes_type import PayrollTaxesType, PayrollTaxesTypeTypedDict from .payroll_totals_type import PayrollTotalsType, PayrollTotalsTypeTypedDict from .payroll_withholding_pay_period_type import PayrollWithholdingPayPeriodType from datetime import datetime @@ -47,17 +44,15 @@ class PayrollTypedDict(TypedDict): - r"""Example response""" - payroll_deadline: NotRequired[datetime] r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" check_date: NotRequired[str] r"""The date on which employees will be paid for the payroll.""" processed: NotRequired[bool] r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - processed_date: NotRequired[str] + processed_date: NotRequired[Nullable[str]] r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - calculated_at: NotRequired[str] + calculated_at: NotRequired[Nullable[datetime]] r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" uuid: NotRequired[str] r"""The UUID of the payroll.""" @@ -86,9 +81,10 @@ class PayrollTypedDict(TypedDict): r"""Information about the payroll's status and expected dates""" totals: NotRequired[PayrollTotalsTypeTypedDict] r"""The subtotals for the payroll.""" - employee_compensations: NotRequired[List[PayrollEmployeeCompensationsTypeTypedDict]] company_taxes: NotRequired[List[PayrollCompanyTaxesTypeTypedDict]] r"""An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + payroll_taxes: NotRequired[List[PayrollTaxesTypeTypedDict]] + r"""An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter.""" payment_speed_changed: NotRequired[PayrollPaymentSpeedChangedTypeTypedDict] r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" created_at: NotRequired[datetime] @@ -98,11 +94,11 @@ class PayrollTypedDict(TypedDict): credit_blockers: NotRequired[List[PayrollCreditBlockersTypeTypedDict]] r"""Only included for processed payrolls""" processing_request: NotRequired[Nullable[PayrollProcessingRequestTypedDict]] + partner_owned_disbursement: NotRequired[Nullable[bool]] + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" class Payroll(BaseModel): - r"""Example response""" - payroll_deadline: Optional[datetime] = None r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" @@ -112,10 +108,10 @@ class Payroll(BaseModel): processed: Optional[bool] = None r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - processed_date: Optional[str] = None + processed_date: OptionalNullable[str] = UNSET r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - calculated_at: Optional[str] = None + calculated_at: OptionalNullable[datetime] = UNSET r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" uuid: Optional[str] = None @@ -159,11 +155,12 @@ class Payroll(BaseModel): totals: Optional[PayrollTotalsType] = None r"""The subtotals for the payroll.""" - employee_compensations: Optional[List[PayrollEmployeeCompensationsType]] = None - company_taxes: Optional[List[PayrollCompanyTaxesType]] = None r"""An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + payroll_taxes: Optional[List[PayrollTaxesType]] = None + r"""An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter.""" + payment_speed_changed: Optional[PayrollPaymentSpeedChangedType] = None r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" @@ -178,6 +175,9 @@ class Payroll(BaseModel): processing_request: OptionalNullable[PayrollProcessingRequest] = UNSET + partner_owned_disbursement: OptionalNullable[bool] = UNSET + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -200,15 +200,22 @@ def serialize_model(self, handler): "pay_period", "payroll_status_meta", "totals", - "employee_compensations", "company_taxes", + "payroll_taxes", "payment_speed_changed", "created_at", "submission_blockers", "credit_blockers", "processing_request", + "partner_owned_disbursement", + ] + nullable_fields = [ + "processed_date", + "calculated_at", + "off_cycle_reason", + "processing_request", + "partner_owned_disbursement", ] - nullable_fields = ["off_cycle_reason", "processing_request"] null_default_fields = [] serialized = handler(self) diff --git a/gusto_embedded/src/gusto_embedded/models/payroll_blockers_error.py b/gusto_embedded/src/gusto_embedded/models/payroll_blockers_error.py index dfd97e22..7be0f53e 100644 --- a/gusto_embedded/src/gusto_embedded/models/payroll_blockers_error.py +++ b/gusto_embedded/src/gusto_embedded/models/payroll_blockers_error.py @@ -1,8 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from gusto_embedded import utils +from dataclasses import dataclass, field +from gusto_embedded.models import GustoError from gusto_embedded.types import BaseModel +import httpx from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -44,16 +46,21 @@ class PayrollBlockersErrorData(BaseModel): errors: Optional[List[Errors]] = None -class PayrollBlockersError(Exception): +@dataclass(unsafe_hash=True) +class PayrollBlockersError(GustoError): r"""Payroll Blockers Error For detailed information, see the [Payroll Blockers guide](https://docs.gusto.com/embedded-payroll/docs/payroll-blockers) """ - data: PayrollBlockersErrorData - - def __init__(self, data: PayrollBlockersErrorData): - self.data = data - - def __str__(self) -> str: - return utils.marshal_json(self.data, PayrollBlockersErrorData) + data: PayrollBlockersErrorData = field(hash=False) + + def __init__( + self, + data: PayrollBlockersErrorData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/gusto_embedded/src/gusto_embedded/models/payroll_check.py b/gusto_embedded/src/gusto_embedded/models/payroll_check.py index 94553b6a..f58e857d 100644 --- a/gusto_embedded/src/gusto_embedded/models/payroll_check.py +++ b/gusto_embedded/src/gusto_embedded/models/payroll_check.py @@ -1,7 +1,14 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from gusto_embedded.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -28,7 +35,7 @@ class PayrollCheckTypedDict(TypedDict): r"""A unique identifier of the payroll.""" printing_format: NotRequired[str] r"""The format the checks will be printed.""" - starting_check_number: NotRequired[str] + starting_check_number: NotRequired[Nullable[str]] r"""The starting check number for the checks being printed.""" request_uuid: NotRequired[str] r"""A unique identifier of the Generated Document request""" @@ -49,7 +56,7 @@ class PayrollCheck(BaseModel): printing_format: Optional[str] = None r"""The format the checks will be printed.""" - starting_check_number: Optional[str] = None + starting_check_number: OptionalNullable[str] = UNSET r"""The starting check number for the checks being printed.""" request_uuid: Optional[str] = None @@ -60,3 +67,40 @@ class PayrollCheck(BaseModel): employee_check_number_mapping: Optional[List[EmployeeCheckNumberMapping]] = None r"""An array of mapping employee uuids to their check numbers""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "payroll_uuid", + "printing_format", + "starting_check_number", + "request_uuid", + "status", + "employee_check_number_mapping", + ] + nullable_fields = ["starting_check_number"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/payroll_employee_compensations_type.py b/gusto_embedded/src/gusto_embedded/models/payroll_employee_compensations_type.py index ad883383..bfc934c9 100644 --- a/gusto_embedded/src/gusto_embedded/models/payroll_employee_compensations_type.py +++ b/gusto_embedded/src/gusto_embedded/models/payroll_employee_compensations_type.py @@ -15,10 +15,11 @@ class PayrollEmployeeCompensationsTypePaymentMethod(str, Enum): - r"""The employee's compensation payment method.""" + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" - CHECK = "Check" DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + HISTORICAL = "Historical" class FixedCompensationsTypedDict(TypedDict): @@ -96,46 +97,95 @@ class PayrollEmployeeCompensationsTypePaidTimeOff(BaseModel): r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" -class BenefitsTypedDict(TypedDict): - name: NotRequired[str] - employee_deduction: NotRequired[float] - company_contribution: NotRequired[float] - imputed: NotRequired[bool] - - -class Benefits(BaseModel): - name: Optional[str] = None - - employee_deduction: Optional[float] = None - - company_contribution: Optional[float] = None +class AmountType(str, Enum): + r"""The amount type of the deduction for the pay period.""" - imputed: Optional[bool] = None + FIXED = "fixed" + PERCENT = "percent" class DeductionsTypedDict(TypedDict): + r"""An array of deductions for the employee.""" + name: NotRequired[str] + r"""The name of the deduction.""" amount: NotRequired[float] + r"""The amount of the deduction for the pay period.""" + amount_type: NotRequired[AmountType] + r"""The amount type of the deduction for the pay period.""" + uuid: NotRequired[str] + r"""The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction.""" class Deductions(BaseModel): + r"""An array of deductions for the employee.""" + name: Optional[str] = None + r"""The name of the deduction.""" amount: Optional[float] = None + r"""The amount of the deduction for the pay period.""" + + amount_type: Optional[AmountType] = None + r"""The amount type of the deduction for the pay period.""" + + uuid: Optional[str] = None + r"""The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction.""" -class TaxesTypedDict(TypedDict): - name: str - employer: bool - amount: float +class ReimbursementsModelTypedDict(TypedDict): + amount: str + r"""The dollar amount of the reimbursement for the pay period.""" + description: Nullable[str] + r"""The description of the reimbursement. Null for unnamed reimbursements.""" + uuid: NotRequired[Nullable[str]] + r"""The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls.""" + recurring: NotRequired[bool] + r"""Whether the reimbursement is recurring. This field is only available for unprocessed payrolls.""" -class Taxes(BaseModel): - name: str +class ReimbursementsModel(BaseModel): + amount: str + r"""The dollar amount of the reimbursement for the pay period.""" - employer: bool + description: Nullable[str] + r"""The description of the reimbursement. Null for unnamed reimbursements.""" - amount: float + uuid: OptionalNullable[str] = UNSET + r"""The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls.""" + + recurring: Optional[bool] = None + r"""Whether the reimbursement is recurring. This field is only available for unprocessed payrolls.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["uuid", "recurring"] + nullable_fields = ["description", "uuid"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m class PayrollEmployeeCompensationsTypeTypedDict(TypedDict): @@ -145,6 +195,12 @@ class PayrollEmployeeCompensationsTypeTypedDict(TypedDict): r"""This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false.""" version: NotRequired[str] r"""The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + first_name: NotRequired[Nullable[str]] + r"""The first name of the employee. Requires `employees:read` scope.""" + preferred_first_name: NotRequired[Nullable[str]] + r"""The preferred first name of the employee. Requires `employees:read` scope.""" + last_name: NotRequired[Nullable[str]] + r"""The last name of the employee. Requires `employees:read` scope.""" gross_pay: NotRequired[Nullable[float]] r"""The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls.""" net_pay: NotRequired[Nullable[float]] @@ -152,7 +208,7 @@ class PayrollEmployeeCompensationsTypeTypedDict(TypedDict): check_amount: NotRequired[Nullable[float]] r"""The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls.""" payment_method: NotRequired[Nullable[PayrollEmployeeCompensationsTypePaymentMethod]] - r"""The employee's compensation payment method.""" + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" memo: NotRequired[Nullable[str]] r"""Custom text that will be printed as a personal note to the employee on a paystub.""" fixed_compensations: NotRequired[List[FixedCompensationsTypedDict]] @@ -163,12 +219,9 @@ class PayrollEmployeeCompensationsTypeTypedDict(TypedDict): List[PayrollEmployeeCompensationsTypePaidTimeOffTypedDict] ] r"""An array of all paid time off the employee is eligible for this pay period.""" - benefits: NotRequired[List[BenefitsTypedDict]] - r"""An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present.""" deductions: NotRequired[List[DeductionsTypedDict]] - r"""An array of employee deductions for the pay period. Deductions are only included for processed payroll when the include parameter is present.""" - taxes: NotRequired[List[TaxesTypedDict]] - r"""An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + reimbursements: NotRequired[List[ReimbursementsModelTypedDict]] + r"""An array of reimbursements for the employee.""" class PayrollEmployeeCompensationsType(BaseModel): @@ -181,6 +234,15 @@ class PayrollEmployeeCompensationsType(BaseModel): version: Optional[str] = None r"""The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + first_name: OptionalNullable[str] = UNSET + r"""The first name of the employee. Requires `employees:read` scope.""" + + preferred_first_name: OptionalNullable[str] = UNSET + r"""The preferred first name of the employee. Requires `employees:read` scope.""" + + last_name: OptionalNullable[str] = UNSET + r"""The last name of the employee. Requires `employees:read` scope.""" + gross_pay: OptionalNullable[float] = UNSET r"""The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls.""" @@ -193,7 +255,7 @@ class PayrollEmployeeCompensationsType(BaseModel): payment_method: OptionalNullable[PayrollEmployeeCompensationsTypePaymentMethod] = ( UNSET ) - r"""The employee's compensation payment method.""" + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" memo: OptionalNullable[str] = UNSET r"""Custom text that will be printed as a personal note to the employee on a paystub.""" @@ -207,14 +269,10 @@ class PayrollEmployeeCompensationsType(BaseModel): paid_time_off: Optional[List[PayrollEmployeeCompensationsTypePaidTimeOff]] = None r"""An array of all paid time off the employee is eligible for this pay period.""" - benefits: Optional[List[Benefits]] = None - r"""An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present.""" - deductions: Optional[List[Deductions]] = None - r"""An array of employee deductions for the pay period. Deductions are only included for processed payroll when the include parameter is present.""" - taxes: Optional[List[Taxes]] = None - r"""An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + reimbursements: Optional[List[ReimbursementsModel]] = None + r"""An array of reimbursements for the employee.""" @model_serializer(mode="wrap") def serialize_model(self, handler): @@ -222,6 +280,9 @@ def serialize_model(self, handler): "employee_uuid", "excluded", "version", + "first_name", + "preferred_first_name", + "last_name", "gross_pay", "net_pay", "check_amount", @@ -230,11 +291,13 @@ def serialize_model(self, handler): "fixed_compensations", "hourly_compensations", "paid_time_off", - "benefits", "deductions", - "taxes", + "reimbursements", ] nullable_fields = [ + "first_name", + "preferred_first_name", + "last_name", "gross_pay", "net_pay", "check_amount", diff --git a/gusto_embedded/src/gusto_embedded/models/payroll_minimal.py b/gusto_embedded/src/gusto_embedded/models/payroll_minimal.py deleted file mode 100644 index bf75db51..00000000 --- a/gusto_embedded/src/gusto_embedded/models/payroll_minimal.py +++ /dev/null @@ -1,212 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .off_cycle_reason_type import OffCycleReasonType -from .payroll_credit_blockers_type import ( - PayrollCreditBlockersType, - PayrollCreditBlockersTypeTypedDict, -) -from .payroll_pay_period_type import PayrollPayPeriodType, PayrollPayPeriodTypeTypedDict -from .payroll_payment_speed_changed_type import ( - PayrollPaymentSpeedChangedType, - PayrollPaymentSpeedChangedTypeTypedDict, -) -from .payroll_payroll_status_meta_type import ( - PayrollPayrollStatusMetaType, - PayrollPayrollStatusMetaTypeTypedDict, -) -from .payroll_submission_blockers_type import ( - PayrollSubmissionBlockersType, - PayrollSubmissionBlockersTypeTypedDict, -) -from .payroll_totals_type import PayrollTotalsType, PayrollTotalsTypeTypedDict -from .payroll_withholding_pay_period_type import PayrollWithholdingPayPeriodType -from datetime import datetime -from gusto_embedded.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import List, Optional -from typing_extensions import NotRequired, TypedDict - - -class PayrollMinimalTypedDict(TypedDict): - r"""Example response""" - - processed: bool - r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - uuid: str - r"""The UUID of the payroll.""" - payroll_uuid: str - r"""The UUID of the payroll.""" - company_uuid: str - r"""The UUID of the company for the payroll.""" - payroll_deadline: NotRequired[datetime] - r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" - check_date: NotRequired[str] - r"""The date on which employees will be paid for the payroll.""" - processed_date: NotRequired[str] - r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - calculated_at: NotRequired[str] - r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" - off_cycle: NotRequired[bool] - r"""Indicates whether the payroll is an off-cycle payroll""" - off_cycle_reason: NotRequired[Nullable[OffCycleReasonType]] - r"""The off-cycle reason. Only included for off-cycle payrolls.""" - auto_pilot: NotRequired[bool] - r"""Indicates whether the payroll is an auto pilot payroll""" - external: NotRequired[bool] - r"""Indicates whether the payroll is an external payroll""" - final_termination_payroll: NotRequired[bool] - r"""Indicates whether the payroll is the final payroll for a terminated employee. Only included for off-cycle payrolls.""" - withholding_pay_period: NotRequired[PayrollWithholdingPayPeriodType] - r"""The payment schedule tax rate the payroll is based on. Only included for off-cycle payrolls.""" - skip_regular_deductions: NotRequired[bool] - r"""Block regular deductions and contributions for this payroll. Only included for off-cycle payrolls.""" - fixed_withholding_rate: NotRequired[bool] - r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only included for off-cycle payrolls.""" - pay_period: NotRequired[PayrollPayPeriodTypeTypedDict] - payroll_status_meta: NotRequired[PayrollPayrollStatusMetaTypeTypedDict] - r"""Information about the payroll's status and expected dates""" - totals: NotRequired[PayrollTotalsTypeTypedDict] - r"""The subtotals for the payroll.""" - payment_speed_changed: NotRequired[PayrollPaymentSpeedChangedTypeTypedDict] - r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" - created_at: NotRequired[datetime] - r"""Datetime for when the resource was created.""" - submission_blockers: NotRequired[List[PayrollSubmissionBlockersTypeTypedDict]] - r"""Only included for processed or calculated payrolls""" - credit_blockers: NotRequired[List[PayrollCreditBlockersTypeTypedDict]] - r"""Only included for processed payrolls""" - reversal_payroll_uuids: NotRequired[List[str]] - r"""Array of reversal payroll UUIDs, if applicable.""" - - -class PayrollMinimal(BaseModel): - r"""Example response""" - - processed: bool - r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - - uuid: str - r"""The UUID of the payroll.""" - - payroll_uuid: str - r"""The UUID of the payroll.""" - - company_uuid: str - r"""The UUID of the company for the payroll.""" - - payroll_deadline: Optional[datetime] = None - r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" - - check_date: Optional[str] = None - r"""The date on which employees will be paid for the payroll.""" - - processed_date: Optional[str] = None - r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - - calculated_at: Optional[str] = None - r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" - - off_cycle: Optional[bool] = None - r"""Indicates whether the payroll is an off-cycle payroll""" - - off_cycle_reason: OptionalNullable[OffCycleReasonType] = UNSET - r"""The off-cycle reason. Only included for off-cycle payrolls.""" - - auto_pilot: Optional[bool] = None - r"""Indicates whether the payroll is an auto pilot payroll""" - - external: Optional[bool] = None - r"""Indicates whether the payroll is an external payroll""" - - final_termination_payroll: Optional[bool] = None - r"""Indicates whether the payroll is the final payroll for a terminated employee. Only included for off-cycle payrolls.""" - - withholding_pay_period: Optional[PayrollWithholdingPayPeriodType] = None - r"""The payment schedule tax rate the payroll is based on. Only included for off-cycle payrolls.""" - - skip_regular_deductions: Optional[bool] = None - r"""Block regular deductions and contributions for this payroll. Only included for off-cycle payrolls.""" - - fixed_withholding_rate: Optional[bool] = None - r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only included for off-cycle payrolls.""" - - pay_period: Optional[PayrollPayPeriodType] = None - - payroll_status_meta: Optional[PayrollPayrollStatusMetaType] = None - r"""Information about the payroll's status and expected dates""" - - totals: Optional[PayrollTotalsType] = None - r"""The subtotals for the payroll.""" - - payment_speed_changed: Optional[PayrollPaymentSpeedChangedType] = None - r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" - - created_at: Optional[datetime] = None - r"""Datetime for when the resource was created.""" - - submission_blockers: Optional[List[PayrollSubmissionBlockersType]] = None - r"""Only included for processed or calculated payrolls""" - - credit_blockers: Optional[List[PayrollCreditBlockersType]] = None - r"""Only included for processed payrolls""" - - reversal_payroll_uuids: Optional[List[str]] = None - r"""Array of reversal payroll UUIDs, if applicable.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = [ - "payroll_deadline", - "check_date", - "processed_date", - "calculated_at", - "off_cycle", - "off_cycle_reason", - "auto_pilot", - "external", - "final_termination_payroll", - "withholding_pay_period", - "skip_regular_deductions", - "fixed_withholding_rate", - "pay_period", - "payroll_status_meta", - "totals", - "payment_speed_changed", - "created_at", - "submission_blockers", - "credit_blockers", - "reversal_payroll_uuids", - ] - nullable_fields = ["off_cycle_reason"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/gusto_embedded/src/gusto_embedded/models/payroll_partner_disbursements.py b/gusto_embedded/src/gusto_embedded/models/payroll_partner_disbursements.py new file mode 100644 index 00000000..32f78256 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/payroll_partner_disbursements.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PayrollPartnerDisbursementsPaymentMethod(str, Enum): + r"""The payment method for the disbursement""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class PayrollPartnerDisbursementsPaymentStatus(str, Enum): + r"""The status of the payment""" + + PENDING = "Pending" + PAID = "Paid" + NOT_PARTNER_MANAGED = "Not partner managed" + CONVERTED_TO_CHECK = "Converted to check" + + +class PayrollPartnerDisbursementsDisbursementsTypedDict(TypedDict): + employee_uuid: NotRequired[str] + r"""The UUID of the employee""" + payment_method: NotRequired[PayrollPartnerDisbursementsPaymentMethod] + r"""The payment method for the disbursement""" + payment_status: NotRequired[PayrollPartnerDisbursementsPaymentStatus] + r"""The status of the payment""" + + +class PayrollPartnerDisbursementsDisbursements(BaseModel): + employee_uuid: Optional[str] = None + r"""The UUID of the employee""" + + payment_method: Optional[PayrollPartnerDisbursementsPaymentMethod] = None + r"""The payment method for the disbursement""" + + payment_status: Optional[PayrollPartnerDisbursementsPaymentStatus] = None + r"""The status of the payment""" + + +class PayrollPartnerDisbursementsTypedDict(TypedDict): + r"""Partner disbursements for a payroll""" + + payroll_uuid: NotRequired[str] + r"""The UUID of the payroll""" + disbursements: NotRequired[List[PayrollPartnerDisbursementsDisbursementsTypedDict]] + r"""List of disbursements for the payroll""" + + +class PayrollPartnerDisbursements(BaseModel): + r"""Partner disbursements for a payroll""" + + payroll_uuid: Optional[str] = None + r"""The UUID of the payroll""" + + disbursements: Optional[List[PayrollPartnerDisbursementsDisbursements]] = None + r"""List of disbursements for the payroll""" diff --git a/gusto_embedded/src/gusto_embedded/models/payroll_prepare_sort_by.py b/gusto_embedded/src/gusto_embedded/models/payroll_prepare_sort_by.py new file mode 100644 index 00000000..70e57762 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/payroll_prepare_sort_by.py @@ -0,0 +1,9 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class PayrollPrepareSortBy(str, Enum): + FIRST_NAME = "first_name" + LAST_NAME = "last_name" diff --git a/gusto_embedded/src/gusto_embedded/models/payroll_prepared.py b/gusto_embedded/src/gusto_embedded/models/payroll_prepared.py index 45217166..28c59e2a 100644 --- a/gusto_embedded/src/gusto_embedded/models/payroll_prepared.py +++ b/gusto_embedded/src/gusto_embedded/models/payroll_prepared.py @@ -38,17 +38,15 @@ class PayrollPreparedTypedDict(TypedDict): - r"""An off-cycle payroll""" - payroll_deadline: NotRequired[datetime] r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" check_date: NotRequired[str] r"""The date on which employees will be paid for the payroll.""" processed: NotRequired[bool] r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - processed_date: NotRequired[str] + processed_date: NotRequired[Nullable[str]] r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - calculated_at: NotRequired[str] + calculated_at: NotRequired[Nullable[datetime]] r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" uuid: NotRequired[str] r"""The UUID of the payroll.""" @@ -84,11 +82,11 @@ class PayrollPreparedTypedDict(TypedDict): List[PayrollFixedCompensationTypesTypeTypedDict] ] processing_request: NotRequired[Nullable[PayrollProcessingRequestTypedDict]] + partner_owned_disbursement: NotRequired[Nullable[bool]] + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" class PayrollPrepared(BaseModel): - r"""An off-cycle payroll""" - payroll_deadline: Optional[datetime] = None r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" @@ -98,10 +96,10 @@ class PayrollPrepared(BaseModel): processed: Optional[bool] = None r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" - processed_date: Optional[str] = None + processed_date: OptionalNullable[str] = UNSET r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" - calculated_at: Optional[str] = None + calculated_at: OptionalNullable[datetime] = UNSET r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" uuid: Optional[str] = None @@ -154,6 +152,9 @@ class PayrollPrepared(BaseModel): processing_request: OptionalNullable[PayrollProcessingRequest] = UNSET + partner_owned_disbursement: OptionalNullable[bool] = UNSET + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -180,8 +181,15 @@ def serialize_model(self, handler): "created_at", "fixed_compensation_types", "processing_request", + "partner_owned_disbursement", + ] + nullable_fields = [ + "processed_date", + "calculated_at", + "off_cycle_reason", + "processing_request", + "partner_owned_disbursement", ] - nullable_fields = ["off_cycle_reason", "processing_request"] null_default_fields = [] serialized = handler(self) diff --git a/gusto_embedded/src/gusto_embedded/models/payroll_receipt.py b/gusto_embedded/src/gusto_embedded/models/payroll_receipt.py index 8f478da3..3583d552 100644 --- a/gusto_embedded/src/gusto_embedded/models/payroll_receipt.py +++ b/gusto_embedded/src/gusto_embedded/models/payroll_receipt.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from enum import Enum from gusto_embedded.types import BaseModel from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -40,14 +41,14 @@ class Totals(BaseModel): r"""The total tax debit for the payroll.""" -class PayrollReceiptTaxesTypedDict(TypedDict): +class TaxesTypedDict(TypedDict): name: NotRequired[str] r"""The amount paid for this tax.""" amount: NotRequired[str] r"""The total amount paid by both employer and employee for this tax.""" -class PayrollReceiptTaxes(BaseModel): +class Taxes(BaseModel): name: Optional[str] = None r"""The amount paid for this tax.""" @@ -55,15 +56,22 @@ class PayrollReceiptTaxes(BaseModel): r"""The total amount paid by both employer and employee for this tax.""" -class EmployeeCompensationsTypedDict(TypedDict): +class PayrollReceiptPaymentMethod(str, Enum): + r"""The employee's compensation payment method.""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class PayrollReceiptEmployeeCompensationsTypedDict(TypedDict): employee_uuid: NotRequired[str] r"""The UUID of the employee.""" employee_first_name: NotRequired[str] r"""The first name of the employee.""" employee_last_name: NotRequired[str] r"""The last name of the employee.""" - payment_method: NotRequired[str] - r"""The employee's compensation payment method.\n\n`Check` `Direct Deposit`""" + payment_method: NotRequired[PayrollReceiptPaymentMethod] + r"""The employee's compensation payment method.""" net_pay: NotRequired[str] r"""The employee's net pay. Net pay paid by check is available for reference but is not included in the `[\"totals\"][\"net_pay_debit\"]` amount.""" total_tax: NotRequired[str] @@ -76,7 +84,7 @@ class EmployeeCompensationsTypedDict(TypedDict): r"""The total reimbursement for the pay period.""" -class EmployeeCompensations(BaseModel): +class PayrollReceiptEmployeeCompensations(BaseModel): employee_uuid: Optional[str] = None r"""The UUID of the employee.""" @@ -86,8 +94,8 @@ class EmployeeCompensations(BaseModel): employee_last_name: Optional[str] = None r"""The last name of the employee.""" - payment_method: Optional[str] = None - r"""The employee's compensation payment method.\n\n`Check` `Direct Deposit`""" + payment_method: Optional[PayrollReceiptPaymentMethod] = None + r"""The employee's compensation payment method.""" net_pay: Optional[str] = None r"""The employee's net pay. Net pay paid by check is available for reference but is not included in the `[\"totals\"][\"net_pay_debit\"]` amount.""" @@ -145,8 +153,6 @@ class Licensee(BaseModel): class PayrollReceiptTypedDict(TypedDict): - r"""Example response""" - payroll_uuid: NotRequired[str] r"""A unique identifier of the payroll receipt.""" company_uuid: NotRequired[str] @@ -167,17 +173,17 @@ class PayrollReceiptTypedDict(TypedDict): liability_of_licensee: NotRequired[str] totals: NotRequired[TotalsTypedDict] r"""The subtotals for the payroll.""" - taxes: NotRequired[List[PayrollReceiptTaxesTypedDict]] + taxes: NotRequired[List[TaxesTypedDict]] r"""An array of totaled employer and employee taxes for the pay period.""" - employee_compensations: NotRequired[List[EmployeeCompensationsTypedDict]] + employee_compensations: NotRequired[ + List[PayrollReceiptEmployeeCompensationsTypedDict] + ] r"""An array of employee compensations and withholdings for this payroll""" licensee: NotRequired[LicenseeTypedDict] r"""The licensed payroll processor""" class PayrollReceipt(BaseModel): - r"""Example response""" - payroll_uuid: Optional[str] = None r"""A unique identifier of the payroll receipt.""" @@ -209,10 +215,10 @@ class PayrollReceipt(BaseModel): totals: Optional[Totals] = None r"""The subtotals for the payroll.""" - taxes: Optional[List[PayrollReceiptTaxes]] = None + taxes: Optional[List[Taxes]] = None r"""An array of totaled employer and employee taxes for the pay period.""" - employee_compensations: Optional[List[EmployeeCompensations]] = None + employee_compensations: Optional[List[PayrollReceiptEmployeeCompensations]] = None r"""An array of employee compensations and withholdings for this payroll""" licensee: Optional[Licensee] = None diff --git a/gusto_embedded/src/gusto_embedded/models/payroll_show.py b/gusto_embedded/src/gusto_embedded/models/payroll_show.py new file mode 100644 index 00000000..8449422d --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/payroll_show.py @@ -0,0 +1,592 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .off_cycle_reason_type import OffCycleReasonType +from .payroll_company_taxes_type import ( + PayrollCompanyTaxesType, + PayrollCompanyTaxesTypeTypedDict, +) +from .payroll_credit_blockers_type import ( + PayrollCreditBlockersType, + PayrollCreditBlockersTypeTypedDict, +) +from .payroll_pay_period_type import PayrollPayPeriodType, PayrollPayPeriodTypeTypedDict +from .payroll_payment_speed_changed_type import ( + PayrollPaymentSpeedChangedType, + PayrollPaymentSpeedChangedTypeTypedDict, +) +from .payroll_payroll_status_meta_type import ( + PayrollPayrollStatusMetaType, + PayrollPayrollStatusMetaTypeTypedDict, +) +from .payroll_processing_request import ( + PayrollProcessingRequest, + PayrollProcessingRequestTypedDict, +) +from .payroll_submission_blockers_type import ( + PayrollSubmissionBlockersType, + PayrollSubmissionBlockersTypeTypedDict, +) +from .payroll_taxes_type import PayrollTaxesType, PayrollTaxesTypeTypedDict +from .payroll_totals_type import PayrollTotalsType, PayrollTotalsTypeTypedDict +from .payroll_withholding_pay_period_type import PayrollWithholdingPayPeriodType +from datetime import datetime +from enum import Enum +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PayrollShowPaymentMethod(str, Enum): + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + HISTORICAL = "Historical" + + +class PayrollShowFixedCompensationsTypedDict(TypedDict): + name: NotRequired[str] + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + amount: NotRequired[str] + r"""The amount of the compensation for the pay period.""" + job_uuid: NotRequired[str] + r"""The UUID of the job for the compensation.""" + + +class PayrollShowFixedCompensations(BaseModel): + name: Optional[str] = None + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + + amount: Optional[str] = None + r"""The amount of the compensation for the pay period.""" + + job_uuid: Optional[str] = None + r"""The UUID of the job for the compensation.""" + + +class PayrollShowHourlyCompensationsTypedDict(TypedDict): + name: NotRequired[str] + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + hours: NotRequired[str] + r"""The number of hours to be compensated for this pay period.""" + amount: NotRequired[str] + r"""The amount of the compensation. This field is only available after the payroll is calculated and cannot be used for updating hourly compensations.""" + job_uuid: NotRequired[str] + r"""The UUID of the job for the compensation.""" + compensation_multiplier: NotRequired[float] + r"""The amount multiplied by the base rate to calculate total compensation per hour worked.""" + flsa_status: NotRequired[str] + r"""The FLSA Status of the employee's primary job compensation""" + + +class PayrollShowHourlyCompensations(BaseModel): + name: Optional[str] = None + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + + hours: Optional[str] = None + r"""The number of hours to be compensated for this pay period.""" + + amount: Optional[str] = None + r"""The amount of the compensation. This field is only available after the payroll is calculated and cannot be used for updating hourly compensations.""" + + job_uuid: Optional[str] = None + r"""The UUID of the job for the compensation.""" + + compensation_multiplier: Optional[float] = None + r"""The amount multiplied by the base rate to calculate total compensation per hour worked.""" + + flsa_status: Optional[str] = None + r"""The FLSA Status of the employee's primary job compensation""" + + +class PayrollShowPaidTimeOffTypedDict(TypedDict): + name: NotRequired[str] + r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO.""" + hours: NotRequired[str] + r"""The hours of this PTO taken during the pay period.""" + final_payout_unused_hours_input: NotRequired[str] + r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" + + +class PayrollShowPaidTimeOff(BaseModel): + name: Optional[str] = None + r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO.""" + + hours: Optional[str] = None + r"""The hours of this PTO taken during the pay period.""" + + final_payout_unused_hours_input: Optional[str] = None + r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" + + +class PayrollShowAmountType(str, Enum): + FIXED = "fixed" + PERCENT = "percent" + + +class PayrollShowDeductionsTypedDict(TypedDict): + name: NotRequired[str] + amount: NotRequired[float] + amount_type: NotRequired[PayrollShowAmountType] + uuid: NotRequired[str] + + +class PayrollShowDeductions(BaseModel): + name: Optional[str] = None + + amount: Optional[float] = None + + amount_type: Optional[PayrollShowAmountType] = None + + uuid: Optional[str] = None + + +class PayrollShowReimbursementsTypedDict(TypedDict): + amount: str + r"""The dollar amount of the reimbursement for the pay period.""" + description: Nullable[str] + r"""The description of the reimbursement. Null for unnamed reimbursements.""" + uuid: NotRequired[Nullable[str]] + r"""The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls.""" + recurring: NotRequired[bool] + r"""Whether the reimbursement is recurring. This field is only available for unprocessed payrolls.""" + + +class PayrollShowReimbursements(BaseModel): + amount: str + r"""The dollar amount of the reimbursement for the pay period.""" + + description: Nullable[str] + r"""The description of the reimbursement. Null for unnamed reimbursements.""" + + uuid: OptionalNullable[str] = UNSET + r"""The UUID of the reimbursement. Null for unnamed reimbursements. This field is only available for unprocessed payrolls.""" + + recurring: Optional[bool] = None + r"""Whether the reimbursement is recurring. This field is only available for unprocessed payrolls.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["uuid", "recurring"] + nullable_fields = ["description", "uuid"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PayrollShowTaxesTypedDict(TypedDict): + name: str + employer: bool + amount: float + + +class PayrollShowTaxes(BaseModel): + name: str + + employer: bool + + amount: float + + +class PayrollShowBenefitsTypedDict(TypedDict): + name: NotRequired[str] + employee_deduction: NotRequired[float] + company_contribution: NotRequired[float] + imputed: NotRequired[bool] + + +class PayrollShowBenefits(BaseModel): + name: Optional[str] = None + + employee_deduction: Optional[float] = None + + company_contribution: Optional[float] = None + + imputed: Optional[bool] = None + + +class EmployeeCompensationsTypedDict(TypedDict): + employee_uuid: NotRequired[str] + r"""The UUID of the employee.""" + excluded: NotRequired[bool] + r"""This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false.""" + version: NotRequired[str] + r"""The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + first_name: NotRequired[Nullable[str]] + r"""The first name of the employee. Requires `employees:read` scope.""" + preferred_first_name: NotRequired[Nullable[str]] + r"""The preferred first name of the employee. Requires `employees:read` scope.""" + last_name: NotRequired[Nullable[str]] + r"""The last name of the employee. Requires `employees:read` scope.""" + gross_pay: NotRequired[Nullable[float]] + r"""The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls.""" + net_pay: NotRequired[Nullable[float]] + r"""The employee's net pay, equal to gross_pay - employee taxes - employee deductions or garnishments - cash tips. This value is only available for processed payrolls.""" + check_amount: NotRequired[Nullable[float]] + r"""The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls.""" + payment_method: NotRequired[Nullable[PayrollShowPaymentMethod]] + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" + memo: NotRequired[Nullable[str]] + r"""Custom text that will be printed as a personal note to the employee on a paystub.""" + fixed_compensations: NotRequired[List[PayrollShowFixedCompensationsTypedDict]] + r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned.""" + hourly_compensations: NotRequired[List[PayrollShowHourlyCompensationsTypedDict]] + r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned.""" + paid_time_off: NotRequired[List[PayrollShowPaidTimeOffTypedDict]] + r"""An array of all paid time off the employee is eligible for this pay period.""" + deductions: NotRequired[List[PayrollShowDeductionsTypedDict]] + r"""An array of employee deductions for the pay period.""" + reimbursements: NotRequired[List[PayrollShowReimbursementsTypedDict]] + r"""An array of reimbursements for the employee.""" + taxes: NotRequired[List[PayrollShowTaxesTypedDict]] + r"""An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + benefits: NotRequired[List[PayrollShowBenefitsTypedDict]] + r"""An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present.""" + + +class EmployeeCompensations(BaseModel): + employee_uuid: Optional[str] = None + r"""The UUID of the employee.""" + + excluded: Optional[bool] = None + r"""This employee will be excluded (skipped) from payroll calculation and will not be paid for the payroll. Cancelling a payroll would reset all employees' excluded back to false.""" + + version: Optional[str] = None + r"""The current version of this employee compensation. This field is only available for prepared payrolls. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + + first_name: OptionalNullable[str] = UNSET + r"""The first name of the employee. Requires `employees:read` scope.""" + + preferred_first_name: OptionalNullable[str] = UNSET + r"""The preferred first name of the employee. Requires `employees:read` scope.""" + + last_name: OptionalNullable[str] = UNSET + r"""The last name of the employee. Requires `employees:read` scope.""" + + gross_pay: OptionalNullable[float] = UNSET + r"""The employee's gross pay, equal to regular wages + cash tips + payroll tips + any other additional earnings, excluding imputed income. This value is only available for processed payrolls.""" + + net_pay: OptionalNullable[float] = UNSET + r"""The employee's net pay, equal to gross_pay - employee taxes - employee deductions or garnishments - cash tips. This value is only available for processed payrolls.""" + + check_amount: OptionalNullable[float] = UNSET + r"""The employee's check amount, equal to net_pay + reimbursements. This value is only available for processed payrolls.""" + + payment_method: OptionalNullable[PayrollShowPaymentMethod] = UNSET + r"""The employee's compensation payment method. Is *only* `Historical` when retrieving external payrolls initially run outside of Gusto, then put into Gusto.""" + + memo: OptionalNullable[str] = UNSET + r"""Custom text that will be printed as a personal note to the employee on a paystub.""" + + fixed_compensations: Optional[List[PayrollShowFixedCompensations]] = None + r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been processed, only fixed compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active fixed compensations are returned.""" + + hourly_compensations: Optional[List[PayrollShowHourlyCompensations]] = None + r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been processed, only hourly compensations with a value greater than 0.00 are returned. For an unprocessed payroll, all active hourly compensations are returned.""" + + paid_time_off: Optional[List[PayrollShowPaidTimeOff]] = None + r"""An array of all paid time off the employee is eligible for this pay period.""" + + deductions: Optional[List[PayrollShowDeductions]] = None + r"""An array of employee deductions for the pay period.""" + + reimbursements: Optional[List[PayrollShowReimbursements]] = None + r"""An array of reimbursements for the employee.""" + + taxes: Optional[List[PayrollShowTaxes]] = None + r"""An array of employer and employee taxes for the pay period. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + + benefits: Optional[List[PayrollShowBenefits]] = None + r"""An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "employee_uuid", + "excluded", + "version", + "first_name", + "preferred_first_name", + "last_name", + "gross_pay", + "net_pay", + "check_amount", + "payment_method", + "memo", + "fixed_compensations", + "hourly_compensations", + "paid_time_off", + "deductions", + "reimbursements", + "taxes", + "benefits", + ] + nullable_fields = [ + "first_name", + "preferred_first_name", + "last_name", + "gross_pay", + "net_pay", + "check_amount", + "payment_method", + "memo", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PayrollShowTypedDict(TypedDict): + payroll_deadline: NotRequired[datetime] + r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" + check_date: NotRequired[str] + r"""The date on which employees will be paid for the payroll.""" + processed: NotRequired[bool] + r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" + processed_date: NotRequired[Nullable[str]] + r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" + calculated_at: NotRequired[Nullable[datetime]] + r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" + uuid: NotRequired[str] + r"""The UUID of the payroll.""" + payroll_uuid: NotRequired[str] + r"""The UUID of the payroll.""" + company_uuid: NotRequired[str] + r"""The UUID of the company for the payroll.""" + off_cycle: NotRequired[bool] + r"""Indicates whether the payroll is an off-cycle payroll""" + off_cycle_reason: NotRequired[Nullable[OffCycleReasonType]] + r"""The off-cycle reason. Only included for off-cycle payrolls.""" + auto_pilot: NotRequired[bool] + r"""Indicates whether the payroll is an auto pilot payroll""" + external: NotRequired[bool] + r"""Indicates whether the payroll is an external payroll""" + final_termination_payroll: NotRequired[bool] + r"""Indicates whether the payroll is the final payroll for a terminated employee. Only included for off-cycle payrolls.""" + withholding_pay_period: NotRequired[PayrollWithholdingPayPeriodType] + r"""The payment schedule tax rate the payroll is based on. Only included for off-cycle payrolls.""" + skip_regular_deductions: NotRequired[bool] + r"""Block regular deductions and contributions for this payroll. Only included for off-cycle payrolls.""" + fixed_withholding_rate: NotRequired[bool] + r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only included for off-cycle payrolls.""" + pay_period: NotRequired[PayrollPayPeriodTypeTypedDict] + payroll_status_meta: NotRequired[PayrollPayrollStatusMetaTypeTypedDict] + r"""Information about the payroll's status and expected dates""" + totals: NotRequired[PayrollTotalsTypeTypedDict] + r"""The subtotals for the payroll.""" + company_taxes: NotRequired[List[PayrollCompanyTaxesTypeTypedDict]] + r"""An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + payroll_taxes: NotRequired[List[PayrollTaxesTypeTypedDict]] + r"""An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter.""" + payment_speed_changed: NotRequired[PayrollPaymentSpeedChangedTypeTypedDict] + r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" + created_at: NotRequired[datetime] + r"""Datetime for when the resource was created.""" + submission_blockers: NotRequired[List[PayrollSubmissionBlockersTypeTypedDict]] + r"""Only included for processed or calculated payrolls""" + credit_blockers: NotRequired[List[PayrollCreditBlockersTypeTypedDict]] + r"""Only included for processed payrolls""" + processing_request: NotRequired[Nullable[PayrollProcessingRequestTypedDict]] + partner_owned_disbursement: NotRequired[Nullable[bool]] + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" + employee_compensations: NotRequired[List[EmployeeCompensationsTypedDict]] + + +class PayrollShow(BaseModel): + payroll_deadline: Optional[datetime] = None + r"""A timestamp that is the deadline for the payroll to be run in order for employees to be paid on time. If payroll has not been run by the deadline, a prepare request will update both the check date and deadline to reflect the soonest employees can be paid and the deadline by which the payroll must be run in order for said check date to be met.""" + + check_date: Optional[str] = None + r"""The date on which employees will be paid for the payroll.""" + + processed: Optional[bool] = None + r"""Whether or not the payroll has been successfully processed. Note that processed payrolls cannot be updated. Additionally, a payroll is not guaranteed to be processed just because the payroll deadline has passed. Late payrolls are not uncommon. Conversely, users may choose to run payroll before the payroll deadline.""" + + processed_date: OptionalNullable[str] = UNSET + r"""The date at which the payroll was processed. Null if the payroll isn't processed yet.""" + + calculated_at: OptionalNullable[datetime] = UNSET + r"""A timestamp of the last valid payroll calculation. Null if there isn't a valid calculation.""" + + uuid: Optional[str] = None + r"""The UUID of the payroll.""" + + payroll_uuid: Optional[str] = None + r"""The UUID of the payroll.""" + + company_uuid: Optional[str] = None + r"""The UUID of the company for the payroll.""" + + off_cycle: Optional[bool] = None + r"""Indicates whether the payroll is an off-cycle payroll""" + + off_cycle_reason: OptionalNullable[OffCycleReasonType] = UNSET + r"""The off-cycle reason. Only included for off-cycle payrolls.""" + + auto_pilot: Optional[bool] = None + r"""Indicates whether the payroll is an auto pilot payroll""" + + external: Optional[bool] = None + r"""Indicates whether the payroll is an external payroll""" + + final_termination_payroll: Optional[bool] = None + r"""Indicates whether the payroll is the final payroll for a terminated employee. Only included for off-cycle payrolls.""" + + withholding_pay_period: Optional[PayrollWithholdingPayPeriodType] = None + r"""The payment schedule tax rate the payroll is based on. Only included for off-cycle payrolls.""" + + skip_regular_deductions: Optional[bool] = None + r"""Block regular deductions and contributions for this payroll. Only included for off-cycle payrolls.""" + + fixed_withholding_rate: Optional[bool] = None + r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only included for off-cycle payrolls.""" + + pay_period: Optional[PayrollPayPeriodType] = None + + payroll_status_meta: Optional[PayrollPayrollStatusMetaType] = None + r"""Information about the payroll's status and expected dates""" + + totals: Optional[PayrollTotalsType] = None + r"""The subtotals for the payroll.""" + + company_taxes: Optional[List[PayrollCompanyTaxesType]] = None + r"""An array of taxes applicable to this payroll in addition to taxes included in `employee_compensations`. Only included for processed or calculated payrolls when `taxes` is present in the `include` parameter.""" + + payroll_taxes: Optional[List[PayrollTaxesType]] = None + r"""An array of tax totals applicable to this payroll. Only included for processed or calculated payrolls when `payroll_taxes` is present in the `include` parameter.""" + + payment_speed_changed: Optional[PayrollPaymentSpeedChangedType] = None + r"""Only applicable when a payroll is moved to four day processing instead of fast ach.""" + + created_at: Optional[datetime] = None + r"""Datetime for when the resource was created.""" + + submission_blockers: Optional[List[PayrollSubmissionBlockersType]] = None + r"""Only included for processed or calculated payrolls""" + + credit_blockers: Optional[List[PayrollCreditBlockersType]] = None + r"""Only included for processed payrolls""" + + processing_request: OptionalNullable[PayrollProcessingRequest] = UNSET + + partner_owned_disbursement: OptionalNullable[bool] = UNSET + r"""Will money movement for the payroll be performed by the partner rather than by Gusto?""" + + employee_compensations: Optional[List[EmployeeCompensations]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "payroll_deadline", + "check_date", + "processed", + "processed_date", + "calculated_at", + "uuid", + "payroll_uuid", + "company_uuid", + "off_cycle", + "off_cycle_reason", + "auto_pilot", + "external", + "final_termination_payroll", + "withholding_pay_period", + "skip_regular_deductions", + "fixed_withholding_rate", + "pay_period", + "payroll_status_meta", + "totals", + "company_taxes", + "payroll_taxes", + "payment_speed_changed", + "created_at", + "submission_blockers", + "credit_blockers", + "processing_request", + "partner_owned_disbursement", + "employee_compensations", + ] + nullable_fields = [ + "processed_date", + "calculated_at", + "off_cycle_reason", + "processing_request", + "partner_owned_disbursement", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/payroll_taxes_type.py b/gusto_embedded/src/gusto_embedded/models/payroll_taxes_type.py new file mode 100644 index 00000000..ab369faa --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/payroll_taxes_type.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from gusto_embedded.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class PayrollTaxesTypeTypedDict(TypedDict): + name: NotRequired[str] + r"""The tax name""" + employer: NotRequired[bool] + r"""Whether this tax is an employer or employee tax""" + amount: NotRequired[float] + r"""The total tax for the payroll""" + + +class PayrollTaxesType(BaseModel): + name: Optional[str] = None + r"""The tax name""" + + employer: Optional[bool] = None + r"""Whether this tax is an employer or employee tax""" + + amount: Optional[float] = None + r"""The total tax for the payroll""" diff --git a/gusto_embedded/src/gusto_embedded/models/payroll_update.py b/gusto_embedded/src/gusto_embedded/models/payroll_update.py new file mode 100644 index 00000000..55a3f724 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/payroll_update.py @@ -0,0 +1,202 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PayrollUpdatePaymentMethod(str, Enum): + r"""The employee's compensation payment method. Invalid values will be ignored.""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class PayrollUpdateFixedCompensationsTypedDict(TypedDict): + r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.""" + + name: NotRequired[str] + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + amount: NotRequired[str] + r"""The amount of the compensation for the pay period.""" + job_uuid: NotRequired[str] + r"""The UUID of the job for the compensation.""" + + +class PayrollUpdateFixedCompensations(BaseModel): + r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.""" + + name: Optional[str] = None + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + + amount: Optional[str] = None + r"""The amount of the compensation for the pay period.""" + + job_uuid: Optional[str] = None + r"""The UUID of the job for the compensation.""" + + +class PayrollUpdateHourlyCompensationsTypedDict(TypedDict): + r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.""" + + name: NotRequired[str] + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + hours: NotRequired[str] + r"""The number of hours to be compensated for this pay period.""" + job_uuid: NotRequired[str] + r"""The UUIDs of the job for the compensation.""" + + +class PayrollUpdateHourlyCompensations(BaseModel): + r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.""" + + name: Optional[str] = None + r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" + + hours: Optional[str] = None + r"""The number of hours to be compensated for this pay period.""" + + job_uuid: Optional[str] = None + r"""The UUIDs of the job for the compensation.""" + + +class PayrollUpdateAmountType(str, Enum): + r"""The amount type of the deduction for the pay period.""" + + FIXED = "fixed" + PERCENT = "percent" + + +class PayrollUpdateDeductionsTypedDict(TypedDict): + r"""An array of deductions for the employee.""" + + name: NotRequired[str] + r"""The name of the deduction.""" + amount: NotRequired[float] + r"""The amount of the deduction for the pay period.""" + amount_type: NotRequired[PayrollUpdateAmountType] + r"""The amount type of the deduction for the pay period.""" + uuid: NotRequired[str] + r"""The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction.""" + + +class PayrollUpdateDeductions(BaseModel): + r"""An array of deductions for the employee.""" + + name: Optional[str] = None + r"""The name of the deduction.""" + + amount: Optional[float] = None + r"""The amount of the deduction for the pay period.""" + + amount_type: Optional[PayrollUpdateAmountType] = None + r"""The amount type of the deduction for the pay period.""" + + uuid: Optional[str] = None + r"""The UUID of the deduction. This parameter is optional and can be provided in order to update an existing deduction.""" + + +class PayrollUpdatePaidTimeOffTypedDict(TypedDict): + name: NotRequired[str] + r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO. Must pass in name or policy_uuid but not both.""" + hours: NotRequired[str] + r"""The hours of this PTO taken during the pay period.""" + policy_uuid: NotRequired[str] + r"""The uuid of the PTO policy. Must pass in name or policy_uuid but not both.""" + final_payout_unused_hours_input: NotRequired[str] + r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" + + +class PayrollUpdatePaidTimeOff(BaseModel): + name: Optional[str] = None + r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO. Must pass in name or policy_uuid but not both.""" + + hours: Optional[str] = None + r"""The hours of this PTO taken during the pay period.""" + + policy_uuid: Optional[str] = None + r"""The uuid of the PTO policy. Must pass in name or policy_uuid but not both.""" + + final_payout_unused_hours_input: Optional[str] = None + r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" + + +class PayrollUpdateEmployeeCompensationsTypedDict(TypedDict): + employee_uuid: NotRequired[str] + r"""The UUID of the employee.""" + version: NotRequired[str] + r"""The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + excluded: NotRequired[bool] + r"""This employee will be excluded from payroll calculation and will not be paid for the payroll.""" + payment_method: NotRequired[PayrollUpdatePaymentMethod] + r"""The employee's compensation payment method. Invalid values will be ignored.""" + memo: NotRequired[str] + r"""Custom text that will be printed as a personal note to the employee on a paystub.""" + fixed_compensations: NotRequired[List[PayrollUpdateFixedCompensationsTypedDict]] + hourly_compensations: NotRequired[List[PayrollUpdateHourlyCompensationsTypedDict]] + deductions: NotRequired[List[PayrollUpdateDeductionsTypedDict]] + paid_time_off: NotRequired[List[PayrollUpdatePaidTimeOffTypedDict]] + r"""An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid.""" + + +class PayrollUpdateEmployeeCompensations(BaseModel): + employee_uuid: Optional[str] = None + r"""The UUID of the employee.""" + + version: Optional[str] = None + r"""The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + + excluded: Optional[bool] = None + r"""This employee will be excluded from payroll calculation and will not be paid for the payroll.""" + + payment_method: Optional[PayrollUpdatePaymentMethod] = None + r"""The employee's compensation payment method. Invalid values will be ignored.""" + + memo: Optional[str] = None + r"""Custom text that will be printed as a personal note to the employee on a paystub.""" + + fixed_compensations: Optional[List[PayrollUpdateFixedCompensations]] = None + + hourly_compensations: Optional[List[PayrollUpdateHourlyCompensations]] = None + + deductions: Optional[List[PayrollUpdateDeductions]] = None + + paid_time_off: Optional[List[PayrollUpdatePaidTimeOff]] = None + r"""An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid.""" + + +class WithholdingPayPeriod(str, Enum): + r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" + + EVERY_WEEK = "Every week" + EVERY_OTHER_WEEK = "Every other week" + TWICE_PER_MONTH = "Twice per month" + MONTHLY = "Monthly" + QUARTERLY = "Quarterly" + SEMIANNUALLY = "Semiannually" + ANNUALLY = "Annually" + + +class PayrollUpdateTypedDict(TypedDict): + employee_compensations: List[PayrollUpdateEmployeeCompensationsTypedDict] + withholding_pay_period: NotRequired[WithholdingPayPeriod] + r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" + skip_regular_deductions: NotRequired[bool] + r"""Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls.""" + fixed_withholding_rate: NotRequired[bool] + r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls.""" + + +class PayrollUpdate(BaseModel): + employee_compensations: List[PayrollUpdateEmployeeCompensations] + + withholding_pay_period: Optional[WithholdingPayPeriod] = None + r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" + + skip_regular_deductions: Optional[bool] = None + r"""Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls.""" + + fixed_withholding_rate: Optional[bool] = None + r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls.""" diff --git a/gusto_embedded/src/gusto_embedded/models/post_companies_company_uuid_reportsop.py b/gusto_embedded/src/gusto_embedded/models/post_companies_company_uuid_reportsop.py index f08730d8..a32bb557 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_companies_company_uuid_reportsop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_companies_company_uuid_reportsop.py @@ -113,6 +113,7 @@ class FileType(str, Enum): CSV = "csv" JSON = "json" + PDF = "pdf" class PostCompaniesCompanyUUIDReportsPaymentMethod(str, Enum): diff --git a/gusto_embedded/src/gusto_embedded/models/post_companies_company_uuid_suspensionsop.py b/gusto_embedded/src/gusto_embedded/models/post_companies_company_uuid_suspensionsop.py index 2eb4808f..f237c003 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_companies_company_uuid_suspensionsop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_companies_company_uuid_suspensionsop.py @@ -1,7 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( @@ -15,6 +14,12 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod(str, Enum): r"""How Gusto will handle taxes already collected.""" @@ -26,8 +31,8 @@ class Reason(str, Enum): r"""Explanation for why the company is suspending their account. > 🚧 FEIN or entity type changes require Customer Support - > > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time. + """ SWITCHING_PROVIDER = "switching_provider" @@ -38,14 +43,21 @@ class Reason(str, Enum): class LeavingFor(str, Enum): - r"""Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`.""" + r"""The competitor the company is switching to. Required if `reason` is `'switching_provider'`. + + > 🚧 Switching to Gusto requires Customer Support + > If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. + + """ - APD = "apd" - ADP_TOTAL_SOURCE = "adp_total_source" ACCOUNTANT = "accountant" + ADP = "adp" + ADP_TOTAL_SOURCE = "adp_total_source" BAMBOO_HR = "bamboo_hr" BANK_OR_FINANCIAL_INSTITUTION = "bank_or_financial_institution" CHECK = "check" + GUSTO_COM = "gusto_com" + HOMEBASE = "homebase" INSPERITY = "insperity" INTUIT_OR_QUICKBOOKS = "intuit_or_quickbooks" JUSTWORKS = "justworks" @@ -54,6 +66,7 @@ class LeavingFor(str, Enum): ONPAY = "onpay" OTHER = "other" PATRIOT = "patriot" + PAYCHEX = "paychex" PAYCOM = "paycom" PAYLOCITY = "paylocity" RIPPLING = "rippling" @@ -74,13 +87,18 @@ class PostCompaniesCompanyUUIDSuspensionsRequestBodyTypedDict(TypedDict): r"""Explanation for why the company is suspending their account. > 🚧 FEIN or entity type changes require Customer Support - > > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time. + """ comments: NotRequired[str] - r"""User-supplied comments describing why they are suspending their account.""" + r"""User-supplied comments describing why they are suspending their account. Required if the user is leaving for another provider and selects \"other\" instead of a defined provider.""" leaving_for: NotRequired[LeavingFor] - r"""Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`.""" + r"""The competitor the company is switching to. Required if `reason` is `'switching_provider'`. + + > 🚧 Switching to Gusto requires Customer Support + > If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. + + """ class PostCompaniesCompanyUUIDSuspensionsRequestBody(BaseModel): @@ -97,22 +115,29 @@ class PostCompaniesCompanyUUIDSuspensionsRequestBody(BaseModel): r"""Explanation for why the company is suspending their account. > 🚧 FEIN or entity type changes require Customer Support - > > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time. + """ comments: Optional[str] = None - r"""User-supplied comments describing why they are suspending their account.""" + r"""User-supplied comments describing why they are suspending their account. Required if the user is leaving for another provider and selects \"other\" instead of a defined provider.""" leaving_for: Optional[LeavingFor] = None - r"""Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`.""" + r"""The competitor the company is switching to. Required if `reason` is `'switching_provider'`. + + > 🚧 Switching to Gusto requires Customer Support + > If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. + + """ class PostCompaniesCompanyUUIDSuspensionsRequestTypedDict(TypedDict): company_uuid: str r"""The UUID of the company""" request_body: PostCompaniesCompanyUUIDSuspensionsRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -128,8 +153,8 @@ class PostCompaniesCompanyUUIDSuspensionsRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/post_companies_payroll_skip_company_uuidop.py b/gusto_embedded/src/gusto_embedded/models/post_companies_payroll_skip_company_uuidop.py index 78e9fd69..934e0dca 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_companies_payroll_skip_company_uuidop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_companies_payroll_skip_company_uuidop.py @@ -2,12 +2,11 @@ from __future__ import annotations from .payroll_blockers_error import PayrollBlockersErrorData -from .unprocessable_entity_error_object_error import ( - UnprocessableEntityErrorObjectErrorData, -) +from .unprocessable_entity_error_object import UnprocessableEntityErrorObjectData from .versionheader import VersionHeader +from dataclasses import dataclass, field from enum import Enum -from gusto_embedded import utils +from gusto_embedded.models import GustoError from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( FieldMetadata, @@ -15,6 +14,7 @@ PathParamMetadata, RequestMetadata, ) +import httpx import pydantic from typing import List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -88,20 +88,23 @@ class PostCompaniesPayrollSkipCompanyUUIDRequest(BaseModel): PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion = TypeAliasType( "PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion", - Union[UnprocessableEntityErrorObjectErrorData, PayrollBlockersErrorData], + Union[UnprocessableEntityErrorObjectData, PayrollBlockersErrorData], ) r"""Unprocessable Entity""" -class PostCompaniesPayrollSkipCompanyUUIDResponseBody(Exception): +@dataclass(unsafe_hash=True) +class PostCompaniesPayrollSkipCompanyUUIDResponseBody(GustoError): r"""Unprocessable Entity""" - data: PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion - - def __init__(self, data: PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion): - self.data = data - - def __str__(self) -> str: - return utils.marshal_json( - self.data, PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion - ) + data: PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion = field(hash=False) + + def __init__( + self, + data: PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/gusto_embedded/src/gusto_embedded/models/post_payrolls_gross_up_payroll_uuidop.py b/gusto_embedded/src/gusto_embedded/models/post_payrolls_gross_up_payroll_uuidop.py index bc860e54..87dcd4bf 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_payrolls_gross_up_payroll_uuidop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_payrolls_gross_up_payroll_uuidop.py @@ -2,11 +2,10 @@ from __future__ import annotations from .payroll_blockers_error import PayrollBlockersErrorData -from .unprocessable_entity_error_object_error import ( - UnprocessableEntityErrorObjectErrorData, -) +from .unprocessable_entity_error_object import UnprocessableEntityErrorObjectData from .versionheader import VersionHeader -from gusto_embedded import utils +from dataclasses import dataclass, field +from gusto_embedded.models import GustoError from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( FieldMetadata, @@ -14,6 +13,7 @@ PathParamMetadata, RequestMetadata, ) +import httpx import pydantic from typing import Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -63,20 +63,23 @@ class PostPayrollsGrossUpPayrollUUIDRequest(BaseModel): PostPayrollsGrossUpPayrollUUIDResponseBodyUnion = TypeAliasType( "PostPayrollsGrossUpPayrollUUIDResponseBodyUnion", - Union[UnprocessableEntityErrorObjectErrorData, PayrollBlockersErrorData], + Union[UnprocessableEntityErrorObjectData, PayrollBlockersErrorData], ) r"""Unprocessable Entity""" -class PostPayrollsGrossUpPayrollUUIDResponseBody(Exception): +@dataclass(unsafe_hash=True) +class PostPayrollsGrossUpPayrollUUIDResponseBody(GustoError): r"""Unprocessable Entity""" - data: PostPayrollsGrossUpPayrollUUIDResponseBodyUnion - - def __init__(self, data: PostPayrollsGrossUpPayrollUUIDResponseBodyUnion): - self.data = data - - def __str__(self) -> str: - return utils.marshal_json( - self.data, PostPayrollsGrossUpPayrollUUIDResponseBodyUnion - ) + data: PostPayrollsGrossUpPayrollUUIDResponseBodyUnion = field(hash=False) + + def __init__( + self, + data: PostPayrollsGrossUpPayrollUUIDResponseBodyUnion, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/gusto_embedded/src/gusto_embedded/models/post_payrolls_payroll_uuid_reports_general_ledgerop.py b/gusto_embedded/src/gusto_embedded/models/post_payrolls_payroll_uuid_reports_general_ledgerop.py new file mode 100644 index 00000000..1505bc49 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/post_payrolls_payroll_uuid_reports_general_ledgerop.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .versionheader import VersionHeader +from enum import Enum +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation(str, Enum): + r"""The breakdown of the report. Use 'default' for no split.""" + + DEFAULT = "default" + JOB = "job" + DEPARTMENT = "department" + INTEGRATION = "integration" + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType(str, Enum): + r"""The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'.""" + + XERO = "xero" + QBO = "qbo" + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBodyTypedDict(TypedDict): + aggregation: PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation + r"""The breakdown of the report. Use 'default' for no split.""" + integration_type: NotRequired[ + Nullable[PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType] + ] + r"""The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'.""" + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody(BaseModel): + aggregation: PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation + r"""The breakdown of the report. Use 'default' for no split.""" + + integration_type: OptionalNullable[ + PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType + ] = UNSET + r"""The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["integration_type"] + nullable_fields = ["integration_type"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerRequestTypedDict(TypedDict): + payroll_uuid: str + r"""The UUID of the payroll""" + request_body: PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBodyTypedDict + x_gusto_api_version: NotRequired[VersionHeader] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class PostPayrollsPayrollUUIDReportsGeneralLedgerRequest(BaseModel): + payroll_uuid: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the payroll""" + + request_body: Annotated[ + PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + x_gusto_api_version: Annotated[ + Optional[VersionHeader], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_bank_accountsop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_bank_accountsop.py index 11867bdc..89076e29 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_bank_accountsop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_bank_accountsop.py @@ -1,7 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from .company_bank_account_request import ( + CompanyBankAccountRequest, + CompanyBankAccountRequestTypedDict, +) from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( @@ -15,38 +18,19 @@ from typing_extensions import Annotated, NotRequired, TypedDict -class PostV1CompaniesCompanyIDBankAccountsAccountType(str, Enum): - r"""The bank account type""" - - CHECKING = "Checking" - SAVINGS = "Savings" - - -class PostV1CompaniesCompanyIDBankAccountsRequestBodyTypedDict(TypedDict): - routing_number: NotRequired[str] - r"""The bank routing number""" - account_number: NotRequired[str] - r"""The bank account number""" - account_type: NotRequired[PostV1CompaniesCompanyIDBankAccountsAccountType] - r"""The bank account type""" - - -class PostV1CompaniesCompanyIDBankAccountsRequestBody(BaseModel): - routing_number: Optional[str] = None - r"""The bank routing number""" - - account_number: Optional[str] = None - r"""The bank account number""" +class PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" - account_type: Optional[PostV1CompaniesCompanyIDBankAccountsAccountType] = None - r"""The bank account type""" + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" class PostV1CompaniesCompanyIDBankAccountsRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" - request_body: PostV1CompaniesCompanyIDBankAccountsRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + company_bank_account_request: CompanyBankAccountRequestTypedDict + x_gusto_api_version: NotRequired[ + PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -56,14 +40,14 @@ class PostV1CompaniesCompanyIDBankAccountsRequest(BaseModel): ] r"""The UUID of the company""" - request_body: Annotated[ - PostV1CompaniesCompanyIDBankAccountsRequestBody, + company_bank_account_request: Annotated[ + CompanyBankAccountRequest, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PostV1CompaniesCompanyIDBankAccountsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_contractor_payment_groups_previewop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_contractor_payment_groups_previewop.py index fc6f4e8c..aea4dc7e 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_contractor_payment_groups_previewop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_contractor_payment_groups_previewop.py @@ -1,7 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from datetime import date from enum import Enum from gusto_embedded.types import BaseModel @@ -16,75 +15,71 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion( + str, Enum +): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod(str, Enum): + r"""Payment method""" + DIRECT_DEPOSIT = "Direct Deposit" CHECK = "Check" - HISTORICAL_PAYMENT = "Historical Payment" class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict( TypedDict ): contractor_uuid: NotRequired[str] - r"""The contractor receiving the payment""" + r"""UUID of the contractor""" payment_method: NotRequired[ PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod ] + r"""Payment method""" wage: NotRequired[float] - r"""If the contractor is on a fixed wage, this is the fixed wage payment for the contractor, regardless of hours worked""" - hours: NotRequired[float] - r"""If the contractor is on an hourly wage, this is the number of hours that the contractor worked for the payment""" - bonus: NotRequired[float] - r"""If the contractor is on an hourly wage, this is the bonus the contractor earned""" + r"""Wage amount""" reimbursement: NotRequired[float] - r"""Reimbursed wages for the contractor""" + r"""Reimbursement amount""" class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments( BaseModel ): contractor_uuid: Optional[str] = None - r"""The contractor receiving the payment""" + r"""UUID of the contractor""" payment_method: Optional[ PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod - ] = PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewPaymentMethod.DIRECT_DEPOSIT + ] = None + r"""Payment method""" wage: Optional[float] = None - r"""If the contractor is on a fixed wage, this is the fixed wage payment for the contractor, regardless of hours worked""" - - hours: Optional[float] = None - r"""If the contractor is on an hourly wage, this is the number of hours that the contractor worked for the payment""" - - bonus: Optional[float] = None - r"""If the contractor is on an hourly wage, this is the bonus the contractor earned""" + r"""Wage amount""" reimbursement: Optional[float] = None - r"""Reimbursed wages for the contractor""" + r"""Reimbursement amount""" class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBodyTypedDict( TypedDict ): - check_date: date - r"""The payment check date""" contractor_payments: List[ PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPaymentsTypedDict ] - creation_token: NotRequired[str] - r"""Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create.""" + check_date: NotRequired[date] + r"""Date when payments should be processed""" class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBody(BaseModel): - check_date: date - r"""The payment check date""" - contractor_payments: List[ PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewContractorPayments ] - creation_token: Optional[str] = None - r"""Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create.""" + check_date: Optional[date] = None + r"""Date when payments should be processed""" class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestTypedDict(TypedDict): @@ -93,7 +88,9 @@ class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestTypedDict(Typ request_body: ( PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequestBodyTypedDict ) - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -109,8 +106,10 @@ class PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[ + PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion + ], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PostV1CompaniesCompanyIDContractorPaymentGroupsPreviewHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_contractor_payment_groupsop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_contractor_payment_groupsop.py index cfef386a..5e8a3c92 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_contractor_payment_groupsop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_contractor_payment_groupsop.py @@ -1,7 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from datetime import date from enum import Enum from gusto_embedded.types import BaseModel @@ -16,6 +15,12 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PostV1CompaniesCompanyIDContractorPaymentGroupsPaymentMethod(str, Enum): DIRECT_DEPOSIT = "Direct Deposit" CHECK = "Check" @@ -68,7 +73,7 @@ class PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBodyTypedDict(TypedD PostV1CompaniesCompanyIDContractorPaymentGroupsContractorPaymentsTypedDict ] creation_token: NotRequired[str] - r"""Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create.""" + r"""Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create.""" class PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody(BaseModel): @@ -80,14 +85,16 @@ class PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBody(BaseModel): ] creation_token: Optional[str] = None - r"""Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create.""" + r"""Optional token used to make contractor payment group creation idempotent. If provided, string must be unique for each group you intend to create.""" class PostV1CompaniesCompanyIDContractorPaymentGroupsRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" request_body: PostV1CompaniesCompanyIDContractorPaymentGroupsRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -103,8 +110,8 @@ class PostV1CompaniesCompanyIDContractorPaymentGroupsRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PostV1CompaniesCompanyIDContractorPaymentGroupsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_payrollsop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_payrollsop.py index d0c97f2d..ef9fd3f4 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_payrollsop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_companies_company_id_payrollsop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from datetime import date from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( @@ -15,16 +15,23 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class OffCycleReason(str, Enum): r"""An off cycle payroll reason. Select one from the following list.""" BONUS = "Bonus" CORRECTION = "Correction" + ADHOC = "Adhoc" DISMISSED_EMPLOYEE = "Dismissed employee" TRANSITION_FROM_OLD_PAY_SCHEDULE = "Transition from old pay schedule" -class WithholdingPayPeriod(str, Enum): +class PostV1CompaniesCompanyIDPayrollsWithholdingPayPeriod(str, Enum): r"""The payment schedule tax rate the payroll is based on.""" EVERY_WEEK = "Every week" @@ -41,17 +48,19 @@ class PostV1CompaniesCompanyIDPayrollsRequestBodyTypedDict(TypedDict): r"""Whether it is an off cycle payroll.""" off_cycle_reason: OffCycleReason r"""An off cycle payroll reason. Select one from the following list.""" - start_date: str + start_date: date r"""Pay period start date.""" - end_date: str + end_date: date r"""Pay period end date.""" pay_schedule_uuid: NotRequired[str] r"""A pay schedule is required for transition from old pay schedule payroll to identify the matching transition pay period.""" employee_uuids: NotRequired[List[str]] r"""A list of employee uuids to include on the payroll.""" - check_date: NotRequired[str] + check_date: NotRequired[date] r"""Payment date.""" - withholding_pay_period: NotRequired[WithholdingPayPeriod] + withholding_pay_period: NotRequired[ + PostV1CompaniesCompanyIDPayrollsWithholdingPayPeriod + ] r"""The payment schedule tax rate the payroll is based on.""" skip_regular_deductions: NotRequired[bool] r"""Block regular deductions and contributions for this payroll.""" @@ -66,10 +75,10 @@ class PostV1CompaniesCompanyIDPayrollsRequestBody(BaseModel): off_cycle_reason: OffCycleReason r"""An off cycle payroll reason. Select one from the following list.""" - start_date: str + start_date: date r"""Pay period start date.""" - end_date: str + end_date: date r"""Pay period end date.""" pay_schedule_uuid: Optional[str] = None @@ -78,10 +87,12 @@ class PostV1CompaniesCompanyIDPayrollsRequestBody(BaseModel): employee_uuids: Optional[List[str]] = None r"""A list of employee uuids to include on the payroll.""" - check_date: Optional[str] = None + check_date: Optional[date] = None r"""Payment date.""" - withholding_pay_period: Optional[WithholdingPayPeriod] = None + withholding_pay_period: Optional[ + PostV1CompaniesCompanyIDPayrollsWithholdingPayPeriod + ] = None r"""The payment schedule tax rate the payroll is based on.""" skip_regular_deductions: Optional[bool] = None @@ -94,9 +105,11 @@ class PostV1CompaniesCompanyIDPayrollsRequestBody(BaseModel): class PostV1CompaniesCompanyIDPayrollsRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" - request_body: PostV1CompaniesCompanyIDPayrollsRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + request_body: NotRequired[PostV1CompaniesCompanyIDPayrollsRequestBodyTypedDict] class PostV1CompaniesCompanyIDPayrollsRequest(BaseModel): @@ -105,14 +118,14 @@ class PostV1CompaniesCompanyIDPayrollsRequest(BaseModel): ] r"""The UUID of the company""" - request_body: Annotated[ - PostV1CompaniesCompanyIDPayrollsRequestBody, - FieldMetadata(request=RequestMetadata(media_type="application/json")), - ] - x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + request_body: Annotated[ + Optional[PostV1CompaniesCompanyIDPayrollsRequestBody], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = None diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_company_flowsop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_company_flowsop.py index 59e5d943..9b08ebbc 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_v1_company_flowsop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_company_flowsop.py @@ -11,7 +11,7 @@ RequestMetadata, ) import pydantic -from typing import Optional +from typing import Any, Dict, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -29,6 +29,8 @@ class PostV1CompanyFlowsRequestBodyTypedDict(TypedDict): r"""UUID of the target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details.""" entity_type: NotRequired[PostV1CompanyFlowsEntityType] r"""the type of target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details.""" + options: NotRequired[Dict[str, Any]] + r"""Optional configuration object that varies based on the flow_type. This can contain arbitrary key-value pairs specific to the flow being generated (e.g., { \"provider\": \"guideline\" }).""" class PostV1CompanyFlowsRequestBody(BaseModel): @@ -41,6 +43,9 @@ class PostV1CompanyFlowsRequestBody(BaseModel): entity_type: Optional[PostV1CompanyFlowsEntityType] = None r"""the type of target entity applicable to the flow. This field is optional for company flows, please refer to the flow_types table above for more details.""" + options: Optional[Dict[str, Any]] = None + r"""Optional configuration object that varies based on the flow_type. This can contain arbitrary key-value pairs specific to the flow being generated (e.g., { \"provider\": \"guideline\" }).""" + class PostV1CompanyFlowsRequestTypedDict(TypedDict): company_uuid: str diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_employee_benefitsop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_employee_benefitsop.py index c910e9f0..1b4f168d 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_employee_benefitsop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_employee_benefitsop.py @@ -43,11 +43,15 @@ class PostV1EmployeesEmployeeIDEmployeeBenefitsValue2TypedDict(TypedDict): rate: NotRequired[str] r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: NotRequired[str] - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + For example: + + If the first tier has a threshold of \"3\", and rate of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ @@ -58,11 +62,15 @@ class PostV1EmployeesEmployeeIDEmployeeBenefitsValue2(BaseModel): r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: Optional[str] = None - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. + + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. + + For example: - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + If the first tier has a threshold of \"3\", and rate of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_home_addressesop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_home_addressesop.py index 5e9ed952..6d7a1e06 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_home_addressesop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_home_addressesop.py @@ -1,8 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from datetime import date +from enum import Enum from gusto_embedded.types import ( BaseModel, Nullable, @@ -22,13 +22,19 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict(TypedDict): street_1: NotRequired[str] street_2: NotRequired[Nullable[str]] city: NotRequired[str] state: NotRequired[str] zip_code: NotRequired[str] - effective_date: NotRequired[date] + effective_date: NotRequired[Nullable[date]] courtesy_withholding: NotRequired[bool] @@ -43,7 +49,7 @@ class PostV1EmployeesEmployeeIDHomeAddressesRequestBody(BaseModel): zip_code: Annotated[Optional[str], pydantic.Field(alias="zip")] = None - effective_date: Optional[date] = None + effective_date: OptionalNullable[date] = UNSET courtesy_withholding: Optional[bool] = None @@ -58,7 +64,7 @@ def serialize_model(self, handler): "effective_date", "courtesy_withholding", ] - nullable_fields = ["street_2"] + nullable_fields = ["street_2", "effective_date"] null_default_fields = [] serialized = handler(self) @@ -90,7 +96,9 @@ class PostV1EmployeesEmployeeIDHomeAddressesRequestTypedDict(TypedDict): employee_id: str r"""The UUID of the employee""" request_body: PostV1EmployeesEmployeeIDHomeAddressesRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -106,8 +114,8 @@ class PostV1EmployeesEmployeeIDHomeAddressesRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PostV1EmployeesEmployeeIDHomeAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_recurring_reimbursementsop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_recurring_reimbursementsop.py new file mode 100644 index 00000000..f8ec78e1 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_recurring_reimbursementsop.py @@ -0,0 +1,96 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBodyTypedDict(TypedDict): + description: str + r"""The description of the reimbursement""" + amount: float + r"""The dollar amount of the reimbursement""" + + +class PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBody(BaseModel): + description: str + r"""The description of the reimbursement""" + + amount: float + r"""The dollar amount of the reimbursement""" + + +class PostV1EmployeesEmployeeIDRecurringReimbursementsRequestTypedDict(TypedDict): + employee_id: str + r"""The UUID of the employee""" + request_body: PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBodyTypedDict + x_gusto_api_version: NotRequired[ + PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class PostV1EmployeesEmployeeIDRecurringReimbursementsRequest(BaseModel): + employee_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the employee""" + + request_body: Annotated[ + PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + x_gusto_api_version: Annotated[ + Optional[ + PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion + ], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBodyTypedDict(TypedDict): + r"""successful""" + + uuid: str + employee_uuid: str + description: str + amount: str + version: str + created_at: NotRequired[str] + updated_at: NotRequired[str] + + +class PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBody(BaseModel): + r"""successful""" + + uuid: str + + employee_uuid: str + + description: str + + amount: str + + version: str + + created_at: Optional[str] = None + + updated_at: Optional[str] = None diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_salary_estimatesop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_salary_estimatesop.py new file mode 100644 index 00000000..e995ed07 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_salary_estimatesop.py @@ -0,0 +1,141 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class PostV1EmployeesEmployeeIDSalaryEstimatesExperienceLevel(str, Enum): + r"""Experience level for this occupation""" + + NOVICE = "novice" + INTERMEDIATE = "intermediate" + AVERAGE = "average" + SKILLED = "skilled" + EXPERT = "expert" + + +class PostV1EmployeesEmployeeIDSalaryEstimatesOccupationsTypedDict(TypedDict): + code: str + r"""Bureau of Labor Statistics (BLS) occupation code""" + experience_level: PostV1EmployeesEmployeeIDSalaryEstimatesExperienceLevel + r"""Experience level for this occupation""" + time_percentage: str + r"""Percentage of time spent in this occupation (as decimal, e.g., 1.0 = 100%)""" + primary: NotRequired[bool] + r"""Whether this is the primary occupation""" + + +class PostV1EmployeesEmployeeIDSalaryEstimatesOccupations(BaseModel): + code: str + r"""Bureau of Labor Statistics (BLS) occupation code""" + + experience_level: PostV1EmployeesEmployeeIDSalaryEstimatesExperienceLevel + r"""Experience level for this occupation""" + + time_percentage: str + r"""Percentage of time spent in this occupation (as decimal, e.g., 1.0 = 100%)""" + + primary: Optional[bool] = None + r"""Whether this is the primary occupation""" + + +class PostV1EmployeesEmployeeIDSalaryEstimatesRequestBodyTypedDict(TypedDict): + zip_code: str + r"""The ZIP code for location-based salary calculations""" + occupations: List[PostV1EmployeesEmployeeIDSalaryEstimatesOccupationsTypedDict] + r"""Array of occupations. Time percentages must sum to 100%.""" + annual_net_revenue: NotRequired[Nullable[float]] + r"""The annual net revenue of the business (must be greater than 0)""" + + +class PostV1EmployeesEmployeeIDSalaryEstimatesRequestBody(BaseModel): + zip_code: str + r"""The ZIP code for location-based salary calculations""" + + occupations: List[PostV1EmployeesEmployeeIDSalaryEstimatesOccupations] + r"""Array of occupations. Time percentages must sum to 100%.""" + + annual_net_revenue: OptionalNullable[float] = UNSET + r"""The annual net revenue of the business (must be greater than 0)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["annual_net_revenue"] + nullable_fields = ["annual_net_revenue"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PostV1EmployeesEmployeeIDSalaryEstimatesRequestTypedDict(TypedDict): + employee_id: str + r"""The UUID of the employee""" + request_body: PostV1EmployeesEmployeeIDSalaryEstimatesRequestBodyTypedDict + x_gusto_api_version: NotRequired[ + PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class PostV1EmployeesEmployeeIDSalaryEstimatesRequest(BaseModel): + employee_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the employee""" + + request_body: Annotated[ + PostV1EmployeesEmployeeIDSalaryEstimatesRequestBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + x_gusto_api_version: Annotated[ + Optional[PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_work_addressesop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_work_addressesop.py index 78bd887f..634f79cd 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_work_addressesop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_employees_employee_id_work_addressesop.py @@ -1,8 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from datetime import date +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( FieldMetadata, @@ -15,6 +15,12 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict(TypedDict): location_uuid: NotRequired[str] r"""Reference to a company location""" @@ -34,7 +40,9 @@ class PostV1EmployeesEmployeeIDWorkAddressesRequestTypedDict(TypedDict): employee_id: str r"""The UUID of the employee""" request_body: PostV1EmployeesEmployeeIDWorkAddressesRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -50,8 +58,8 @@ class PostV1EmployeesEmployeeIDWorkAddressesRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PostV1EmployeesEmployeeIDWorkAddressesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_employeesop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_employeesop.py index f73a4605..daef7eb0 100644 --- a/gusto_embedded/src/gusto_embedded/models/post_v1_employeesop.py +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_employeesop.py @@ -27,6 +27,8 @@ class PostV1EmployeesRequestBodyTypedDict(TypedDict): middle_initial: NotRequired[str] email: NotRequired[str] r"""The employee's personal email address.""" + work_email: NotRequired[str] + r"""The employee's work email address.""" date_of_birth: NotRequired[date] ssn: NotRequired[str] preferred_first_name: NotRequired[str] @@ -44,6 +46,9 @@ class PostV1EmployeesRequestBody(BaseModel): email: Optional[str] = None r"""The employee's personal email address.""" + work_email: Optional[str] = None + r"""The employee's work email address.""" + date_of_birth: Optional[date] = None ssn: Optional[str] = None diff --git a/gusto_embedded/src/gusto_embedded/models/post_v1_salary_estimates_uuid_acceptop.py b/gusto_embedded/src/gusto_embedded/models/post_v1_salary_estimates_uuid_acceptop.py new file mode 100644 index 00000000..e3e6d393 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/post_v1_salary_estimates_uuid_acceptop.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class PostV1SalaryEstimatesUUIDAcceptRequestBodyTypedDict(TypedDict): + employee_job_uuid: str + r"""The UUID of the employee job to associate with this salary estimate""" + + +class PostV1SalaryEstimatesUUIDAcceptRequestBody(BaseModel): + employee_job_uuid: str + r"""The UUID of the employee job to associate with this salary estimate""" + + +class PostV1SalaryEstimatesUUIDAcceptRequestTypedDict(TypedDict): + uuid: str + r"""The UUID of the salary estimate""" + request_body: PostV1SalaryEstimatesUUIDAcceptRequestBodyTypedDict + x_gusto_api_version: NotRequired[ + PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion + ] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class PostV1SalaryEstimatesUUIDAcceptRequest(BaseModel): + uuid: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the salary estimate""" + + request_body: Annotated[ + PostV1SalaryEstimatesUUIDAcceptRequestBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + x_gusto_api_version: Annotated[ + Optional[PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/put_time_off_policies_time_off_policy_uuidop.py b/gusto_embedded/src/gusto_embedded/models/put_time_off_policies_time_off_policy_uuidop.py index 1a549d28..bfdd9473 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_time_off_policies_time_off_policy_uuidop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_time_off_policies_time_off_policy_uuidop.py @@ -31,6 +31,8 @@ class AccrualMethod(str, Enum): class PutTimeOffPoliciesTimeOffPolicyUUIDRequestBodyTypedDict(TypedDict): r"""Can update any attributes of the time off policy except policy_type, is_active, complete & employees""" + version: str + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/api-fundamentals#optimistic-version-control) for information on how to use this field.""" name: NotRequired[str] r"""Name of the time off policy""" accrual_method: NotRequired[AccrualMethod] @@ -54,6 +56,9 @@ class PutTimeOffPoliciesTimeOffPolicyUUIDRequestBodyTypedDict(TypedDict): class PutTimeOffPoliciesTimeOffPolicyUUIDRequestBody(BaseModel): r"""Can update any attributes of the time off policy except policy_type, is_active, complete & employees""" + version: str + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/api-fundamentals#optimistic-version-control) for information on how to use this field.""" + name: Optional[str] = None r"""Name of the time off policy""" diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_calculateop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_calculateop.py index 5d3cf772..71008647 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_calculateop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_calculateop.py @@ -2,13 +2,13 @@ from __future__ import annotations from .payroll_blockers_error import PayrollBlockersErrorData -from .unprocessable_entity_error_object_error import ( - UnprocessableEntityErrorObjectErrorData, -) +from .unprocessable_entity_error_object import UnprocessableEntityErrorObjectData from .versionheader import VersionHeader -from gusto_embedded import utils +from dataclasses import dataclass, field +from gusto_embedded.models import GustoError from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import httpx import pydantic from typing import Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -44,23 +44,25 @@ class PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequest(BaseModel): PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion = TypeAliasType( "PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion", - Union[UnprocessableEntityErrorObjectErrorData, PayrollBlockersErrorData], + Union[UnprocessableEntityErrorObjectData, PayrollBlockersErrorData], ) r"""Unprocessable Entity""" -class PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBody(Exception): +@dataclass(unsafe_hash=True) +class PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBody(GustoError): r"""Unprocessable Entity""" - data: PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion + data: PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion = field( + hash=False + ) def __init__( - self, data: PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion + self, + data: PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion, + raw_response: httpx.Response, + body: Optional[str] = None, ): - self.data = data - - def __str__(self) -> str: - return utils.marshal_json( - self.data, - PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion, - ) + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_prepareop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_prepareop.py index edb07273..4eae6397 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_prepareop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_prepareop.py @@ -1,21 +1,47 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .payroll_prepare_sort_by import PayrollPrepareSortBy from .versionheader import VersionHeader from gusto_embedded.types import BaseModel -from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, +) import pydantic -from typing import Optional +from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict +class PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBodyTypedDict(TypedDict): + employee_uuids: NotRequired[List[str]] + r"""An array of employee UUIDs. If passed, only those employees payroll items will be prepared.""" + + +class PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody(BaseModel): + employee_uuids: Optional[List[str]] = None + r"""An array of employee UUIDs. If passed, only those employees payroll items will be prepared.""" + + class PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestTypedDict(TypedDict): company_id: str r"""The UUID of the company""" payroll_id: str r"""The UUID of the payroll""" + page: NotRequired[int] + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + per: NotRequired[int] + r"""Number of objects per page. For majority of endpoints will default to 25""" + sort_by: NotRequired[PayrollPrepareSortBy] + r"""Sort employee compenstations by name. Options: first_name, last_name""" x_gusto_api_version: NotRequired[VersionHeader] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + request_body: NotRequired[ + PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBodyTypedDict + ] class PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest(BaseModel): @@ -29,9 +55,32 @@ class PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest(BaseModel): ] r"""The UUID of the payroll""" + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The page that is requested. When unspecified, will load all objects unless endpoint forces pagination.""" + + per: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Number of objects per page. For majority of endpoints will default to 25""" + + sort_by: Annotated[ + Optional[PayrollPrepareSortBy], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Sort employee compenstations by name. Options: first_name, last_name""" + x_gusto_api_version: Annotated[ Optional[VersionHeader], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + request_body: Annotated[ + Optional[PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = None diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_submitop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_submitop.py index fa61e4b9..850ce431 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_submitop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrolls_payroll_id_submitop.py @@ -2,11 +2,10 @@ from __future__ import annotations from .payroll_blockers_error import PayrollBlockersErrorData -from .unprocessable_entity_error_object_error import ( - UnprocessableEntityErrorObjectErrorData, -) +from .unprocessable_entity_error_object import UnprocessableEntityErrorObjectData from .versionheader import VersionHeader -from gusto_embedded import utils +from dataclasses import dataclass, field +from gusto_embedded.models import GustoError from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( FieldMetadata, @@ -14,6 +13,7 @@ PathParamMetadata, RequestMetadata, ) +import httpx import pydantic from typing import List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -80,22 +80,25 @@ class PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequest(BaseModel): PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion = TypeAliasType( "PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion", - Union[UnprocessableEntityErrorObjectErrorData, PayrollBlockersErrorData], + Union[UnprocessableEntityErrorObjectData, PayrollBlockersErrorData], ) r"""Unprocessable Entity""" -class PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBody(Exception): +@dataclass(unsafe_hash=True) +class PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBody(GustoError): r"""Unprocessable Entity""" - data: PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion + data: PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion = field( + hash=False + ) def __init__( - self, data: PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion + self, + data: PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion, + raw_response: httpx.Response, + body: Optional[str] = None, ): - self.data = data - - def __str__(self) -> str: - return utils.marshal_json( - self.data, PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion - ) + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrollsop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrollsop.py index 93510580..97643fad 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrollsop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_companies_company_id_payrollsop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from .payroll_update import PayrollUpdate, PayrollUpdateTypedDict from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( @@ -11,180 +11,14 @@ RequestMetadata, ) import pydantic -from typing import List, Optional +from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class PutV1CompaniesCompanyIDPayrollsPaymentMethod(str, Enum): - r"""The employee's compensation payment method. Invalid values will be ignored.""" - - DIRECT_DEPOSIT = "Direct Deposit" - CHECK = "Check" - - -class PutV1CompaniesCompanyIDPayrollsFixedCompensationsTypedDict(TypedDict): - r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.""" - - name: NotRequired[str] - r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" - amount: NotRequired[str] - r"""The amount of the compensation for the pay period.""" - job_uuid: NotRequired[str] - r"""The UUID of the job for the compensation.""" - - -class PutV1CompaniesCompanyIDPayrollsFixedCompensations(BaseModel): - r"""An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.""" - - name: Optional[str] = None - r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" - - amount: Optional[str] = None - r"""The amount of the compensation for the pay period.""" - - job_uuid: Optional[str] = None - r"""The UUID of the job for the compensation.""" - - -class PutV1CompaniesCompanyIDPayrollsHourlyCompensationsTypedDict(TypedDict): - r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.""" - - name: NotRequired[str] - r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" - hours: NotRequired[str] - r"""The number of hours to be compensated for this pay period.""" - job_uuid: NotRequired[str] - r"""The UUIDs of the job for the compensation.""" - - -class PutV1CompaniesCompanyIDPayrollsHourlyCompensations(BaseModel): - r"""An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.""" - - name: Optional[str] = None - r"""The name of the compensation. This also serves as the unique, immutable identifier for this compensation.""" - - hours: Optional[str] = None - r"""The number of hours to be compensated for this pay period.""" - - job_uuid: Optional[str] = None - r"""The UUIDs of the job for the compensation.""" - - -class PutV1CompaniesCompanyIDPayrollsPaidTimeOffTypedDict(TypedDict): - name: NotRequired[str] - r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO. Must pass in name or policy_uuid but not both.""" - hours: NotRequired[str] - r"""The hours of this PTO taken during the pay period.""" - policy_uuid: NotRequired[str] - r"""The uuid of the PTO policy. Must pass in name or policy_uuid but not both.""" - final_payout_unused_hours_input: NotRequired[str] - r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" - - -class PutV1CompaniesCompanyIDPayrollsPaidTimeOff(BaseModel): - name: Optional[str] = None - r"""The name of the PTO. This also serves as the unique, immutable identifier for the PTO. Must pass in name or policy_uuid but not both.""" - - hours: Optional[str] = None - r"""The hours of this PTO taken during the pay period.""" - - policy_uuid: Optional[str] = None - r"""The uuid of the PTO policy. Must pass in name or policy_uuid but not both.""" - - final_payout_unused_hours_input: Optional[str] = None - r"""The outstanding hours paid upon termination. This field is only applicable for termination payrolls.""" - - -class PutV1CompaniesCompanyIDPayrollsEmployeeCompensationsTypedDict(TypedDict): - employee_uuid: NotRequired[str] - r"""The UUID of the employee.""" - version: NotRequired[str] - r"""The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" - excluded: NotRequired[bool] - r"""This employee will be excluded from payroll calculation and will not be paid for the payroll.""" - payment_method: NotRequired[PutV1CompaniesCompanyIDPayrollsPaymentMethod] - r"""The employee's compensation payment method. Invalid values will be ignored.""" - memo: NotRequired[str] - r"""Custom text that will be printed as a personal note to the employee on a paystub.""" - fixed_compensations: NotRequired[ - List[PutV1CompaniesCompanyIDPayrollsFixedCompensationsTypedDict] - ] - hourly_compensations: NotRequired[ - List[PutV1CompaniesCompanyIDPayrollsHourlyCompensationsTypedDict] - ] - paid_time_off: NotRequired[ - List[PutV1CompaniesCompanyIDPayrollsPaidTimeOffTypedDict] - ] - r"""An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid.""" - - -class PutV1CompaniesCompanyIDPayrollsEmployeeCompensations(BaseModel): - employee_uuid: Optional[str] = None - r"""The UUID of the employee.""" - - version: Optional[str] = None - r"""The current version of this employee compensation from the prepared payroll. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" - - excluded: Optional[bool] = None - r"""This employee will be excluded from payroll calculation and will not be paid for the payroll.""" - - payment_method: Optional[PutV1CompaniesCompanyIDPayrollsPaymentMethod] = None - r"""The employee's compensation payment method. Invalid values will be ignored.""" - - memo: Optional[str] = None - r"""Custom text that will be printed as a personal note to the employee on a paystub.""" - - fixed_compensations: Optional[ - List[PutV1CompaniesCompanyIDPayrollsFixedCompensations] - ] = None - - hourly_compensations: Optional[ - List[PutV1CompaniesCompanyIDPayrollsHourlyCompensations] - ] = None - - paid_time_off: Optional[List[PutV1CompaniesCompanyIDPayrollsPaidTimeOff]] = None - r"""An array of all paid time off the employee is eligible for this pay period. Each paid time off object can be the name or the specific policy_uuid.""" - - -class PutV1CompaniesCompanyIDPayrollsWithholdingPayPeriod(str, Enum): - r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" - - EVERY_WEEK = "Every week" - EVERY_OTHER_WEEK = "Every other week" - TWICE_PER_MONTH = "Twice per month" - MONTHLY = "Monthly" - QUARTERLY = "Quarterly" - SEMIANNUALLY = "Semiannually" - ANNUALLY = "Annually" - - -class PutV1CompaniesCompanyIDPayrollsRequestBodyTypedDict(TypedDict): - employee_compensations: List[ - PutV1CompaniesCompanyIDPayrollsEmployeeCompensationsTypedDict - ] - withholding_pay_period: NotRequired[ - PutV1CompaniesCompanyIDPayrollsWithholdingPayPeriod - ] - r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" - skip_regular_deductions: NotRequired[bool] - r"""Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls.""" - fixed_withholding_rate: NotRequired[bool] - r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls.""" - - -class PutV1CompaniesCompanyIDPayrollsRequestBody(BaseModel): - employee_compensations: List[PutV1CompaniesCompanyIDPayrollsEmployeeCompensations] - - withholding_pay_period: Optional[ - PutV1CompaniesCompanyIDPayrollsWithholdingPayPeriod - ] = None - r"""The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.""" - - skip_regular_deductions: Optional[bool] = None - r"""Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls.""" +class PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" - fixed_withholding_rate: Optional[bool] = None - r"""Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls.""" + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" class PutV1CompaniesCompanyIDPayrollsRequestTypedDict(TypedDict): @@ -192,8 +26,10 @@ class PutV1CompaniesCompanyIDPayrollsRequestTypedDict(TypedDict): r"""The UUID of the company""" payroll_id: str r"""The UUID of the payroll""" - request_body: PutV1CompaniesCompanyIDPayrollsRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + payroll_update: PayrollUpdateTypedDict + x_gusto_api_version: NotRequired[ + PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -208,14 +44,14 @@ class PutV1CompaniesCompanyIDPayrollsRequest(BaseModel): ] r"""The UUID of the payroll""" - request_body: Annotated[ - PutV1CompaniesCompanyIDPayrollsRequestBody, + payroll_update: Annotated[ + PayrollUpdate, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py new file mode 100644 index 00000000..ef92fbb0 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_company_benefits_company_benefit_id_contribution_exclusionsop.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .contribution_exclusion import ( + ContributionExclusion, + ContributionExclusionTypedDict, +) +from .versionheader import VersionHeader +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBodyTypedDict( + TypedDict +): + contribution_exclusions: List[ContributionExclusionTypedDict] + r"""The list of contribution exclusions to update""" + + +class PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody(BaseModel): + contribution_exclusions: List[ContributionExclusion] + r"""The list of contribution exclusions to update""" + + +class PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestTypedDict( + TypedDict +): + company_benefit_id: str + r"""The UUID of the company benefit""" + request_body: ( + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBodyTypedDict + ) + x_gusto_api_version: NotRequired[VersionHeader] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequest(BaseModel): + company_benefit_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the company benefit""" + + request_body: Annotated[ + PutV1CompanyBenefitsCompanyBenefitIDContributionExclusionsRequestBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + x_gusto_api_version: Annotated[ + Optional[VersionHeader], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_contractor_document_signop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_contractor_document_signop.py index 48104b92..5b11083c 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_contractor_document_signop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_contractor_document_signop.py @@ -51,7 +51,7 @@ class PutV1ContractorDocumentSignRequestBody(BaseModel): class PutV1ContractorDocumentSignRequestTypedDict(TypedDict): document_uuid: str - r"""The ID or UUID of the document""" + r"""The UUID of the document""" request_body: PutV1ContractorDocumentSignRequestBodyTypedDict x_gusto_client_ip: NotRequired[str] r"""Optional header to supply the IP address. This can be used to supply the IP address for signature endpoints instead of the signed_by_ip_address parameter.""" @@ -63,7 +63,7 @@ class PutV1ContractorDocumentSignRequest(BaseModel): document_uuid: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] - r"""The ID or UUID of the document""" + r"""The UUID of the document""" request_body: Annotated[ PutV1ContractorDocumentSignRequestBody, diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_contractor_payment_groups_contractor_payment_group_id_fundop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_contractor_payment_groups_contractor_payment_group_id_fundop.py index 66b77bee..f3b8f69d 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_contractor_payment_groups_contractor_payment_group_id_fundop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_contractor_payment_groups_contractor_payment_group_id_fundop.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic @@ -9,12 +9,22 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion( + str, Enum +): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequestTypedDict( TypedDict ): contractor_payment_group_uuid: str r"""The UUID of the contractor payment group""" - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -25,8 +35,10 @@ class PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundRequest(BaseModel) r"""The UUID of the contractor payment group""" x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[ + PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion + ], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PutV1ContractorPaymentGroupsContractorPaymentGroupIDFundHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_employee_benefits_employee_benefit_idop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_employee_benefits_employee_benefit_idop.py index 132ef5b3..98c282db 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_employee_benefits_employee_benefit_idop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_employee_benefits_employee_benefit_idop.py @@ -43,11 +43,15 @@ class PutV1EmployeeBenefitsEmployeeBenefitIDValue2TypedDict(TypedDict): rate: NotRequired[str] r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: NotRequired[str] - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + For example: + + If the first tier has a threshold of \"3\", and rate of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. + + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ @@ -58,11 +62,15 @@ class PutV1EmployeeBenefitsEmployeeBenefitIDValue2(BaseModel): r"""The percentage of employee deduction within this tier the company contribution will match.""" threshold: Optional[str] = None - r"""The percentage threshold at which this tier ends (inclusive). + r"""Specifies the upper limit (inclusive) percentage of the employee contribution that this tier applies to. + + Use threshold to define each tier's end point, with tiers applied cumulatively from 0% upwards. + + For example: - For example, a value of \"5\" means the company contribution will match employee deductions from the previous tier's threshold up to and including 5% of payroll. + If the first tier has a threshold of \"3\", and rate of \"100\", the company will match 100% of employee contributions from 0% up to and including 3% of payroll. - If this is the first tier, a value of \"5\" means the company contribution will match employee deductions from 0% up to and including 5% of payroll. + If the next tier has a threshold of \"5\" and a rate of \"50\", the company will match 50% of contributions from above 3% up to and including 5% of payroll. """ diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_onboarding_statusop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_onboarding_statusop.py index 183b8580..3b907b96 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_onboarding_statusop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_onboarding_statusop.py @@ -23,8 +23,13 @@ class PutV1EmployeesEmployeeIDOnboardingStatusHeaderXGustoAPIVersion(str, Enum): class PutV1EmployeesEmployeeIDOnboardingStatusOnboardingStatus(str, Enum): r"""Onboarding status value""" - SELF_ONBOARDING_INVITED = "self_onboarding_invited" ADMIN_ONBOARDING_INCOMPLETE = "admin_onboarding_incomplete" + SELF_ONBOARDING_PENDING_INVITE = "self_onboarding_pending_invite" + SELF_ONBOARDING_INVITED = "self_onboarding_invited" + SELF_ONBOARDING_INVITED_STARTED = "self_onboarding_invited_started" + SELF_ONBOARDING_INVITED_OVERDUE = "self_onboarding_invited_overdue" + SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE = "self_onboarding_completed_by_employee" + SELF_ONBOARDING_AWAITING_ADMIN_REVIEW = "self_onboarding_awaiting_admin_review" ONBOARDING_COMPLETED = "onboarding_completed" diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_payment_methodop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_payment_methodop.py index 8abccd4f..c522b3ef 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_payment_methodop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_payment_methodop.py @@ -23,20 +23,20 @@ class PutV1EmployeesEmployeeIDPaymentMethodType(str, Enum): - r"""The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required.""" + r"""The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required.""" DIRECT_DEPOSIT = "Direct Deposit" CHECK = "Check" class PutV1EmployeesEmployeeIDPaymentMethodSplitBy(str, Enum): - r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + r"""Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last `split` amount must be `null` to capture the remainder.""" AMOUNT = "Amount" PERCENTAGE = "Percentage" -class SplitsTypedDict(TypedDict): +class PutV1EmployeesEmployeeIDPaymentMethodSplitsTypedDict(TypedDict): uuid: NotRequired[str] r"""The bank account ID @@ -49,7 +49,7 @@ class SplitsTypedDict(TypedDict): r"""The cents amount allocated for each payment split""" -class Splits(BaseModel): +class PutV1EmployeesEmployeeIDPaymentMethodSplits(BaseModel): uuid: Optional[str] = None r"""The bank account ID @@ -99,10 +99,10 @@ class PutV1EmployeesEmployeeIDPaymentMethodRequestBodyTypedDict(TypedDict): version: str r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field.""" type: PutV1EmployeesEmployeeIDPaymentMethodType - r"""The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required.""" + r"""The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required.""" split_by: NotRequired[PutV1EmployeesEmployeeIDPaymentMethodSplitBy] - r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" - splits: NotRequired[List[SplitsTypedDict]] + r"""Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last `split` amount must be `null` to capture the remainder.""" + splits: NotRequired[List[PutV1EmployeesEmployeeIDPaymentMethodSplitsTypedDict]] class PutV1EmployeesEmployeeIDPaymentMethodRequestBody(BaseModel): @@ -110,12 +110,12 @@ class PutV1EmployeesEmployeeIDPaymentMethodRequestBody(BaseModel): r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field.""" type: PutV1EmployeesEmployeeIDPaymentMethodType - r"""The payment method type. If type is Check, then split_by and splits do not need to be populated. If type is Direct Deposit, split_by and splits are required.""" + r"""The payment method type. If type is Check, then `split_by` and `splits` do not need to be populated. If type is Direct Deposit, `split_by` and `splits` are required.""" split_by: Optional[PutV1EmployeesEmployeeIDPaymentMethodSplitBy] = None - r"""Describes how the payment will be split. If split_by is Percentage, then the split amounts must add up to exactly 100. If split_by is Amount, then the last split amount must be nil to capture the remainder.""" + r"""Describes how the payment will be split. If `split_by` is Percentage, then the `split` amounts must add up to exactly 100. If `split_by` is Amount, then the last `split` amount must be `null` to capture the remainder.""" - splits: Optional[List[Splits]] = None + splits: Optional[List[PutV1EmployeesEmployeeIDPaymentMethodSplits]] = None class PutV1EmployeesEmployeeIDPaymentMethodRequestTypedDict(TypedDict): diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_state_taxesop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_state_taxesop.py index e06d573f..5ddc742c 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_state_taxesop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_employees_employee_id_state_taxesop.py @@ -1,14 +1,12 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader -from gusto_embedded.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, +from .employee_state_taxes_request import ( + EmployeeStateTaxesRequest, + EmployeeStateTaxesRequestTypedDict, ) +from enum import Enum +from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( FieldMetadata, HeaderMetadata, @@ -16,100 +14,23 @@ RequestMetadata, ) import pydantic -from pydantic import model_serializer -from typing import Any, List, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict -PutV1EmployeesEmployeeIDStateTaxesValueTypedDict = TypeAliasType( - "PutV1EmployeesEmployeeIDStateTaxesValueTypedDict", Union[str, float, bool] -) - - -PutV1EmployeesEmployeeIDStateTaxesValue = TypeAliasType( - "PutV1EmployeesEmployeeIDStateTaxesValue", Union[str, float, bool] -) - - -class AnswersTypedDict(TypedDict): - value: Nullable[PutV1EmployeesEmployeeIDStateTaxesValueTypedDict] - valid_from: str - valid_up_to: NotRequired[Nullable[Any]] - - -class Answers(BaseModel): - value: Nullable[PutV1EmployeesEmployeeIDStateTaxesValue] - - valid_from: str - - valid_up_to: OptionalNullable[Any] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["valid_up_to"] - nullable_fields = ["value", "valid_up_to"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m - - -class QuestionsTypedDict(TypedDict): - key: str - answers: NotRequired[List[AnswersTypedDict]] - - -class Questions(BaseModel): - key: str - - answers: Optional[List[Answers]] = None - - -class StatesTypedDict(TypedDict): - state: str - questions: NotRequired[List[QuestionsTypedDict]] - - -class States(BaseModel): - state: str - - questions: Optional[List[Questions]] = None - - -class PutV1EmployeesEmployeeIDStateTaxesRequestBodyTypedDict(TypedDict): - states: List[StatesTypedDict] - +class PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" -class PutV1EmployeesEmployeeIDStateTaxesRequestBody(BaseModel): - states: List[States] + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" class PutV1EmployeesEmployeeIDStateTaxesRequestTypedDict(TypedDict): employee_uuid: str r"""The UUID of the employee""" - request_body: PutV1EmployeesEmployeeIDStateTaxesRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + employee_state_taxes_request: EmployeeStateTaxesRequestTypedDict + x_gusto_api_version: NotRequired[ + PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -119,14 +40,14 @@ class PutV1EmployeesEmployeeIDStateTaxesRequest(BaseModel): ] r"""The UUID of the employee""" - request_body: Annotated[ - PutV1EmployeesEmployeeIDStateTaxesRequestBody, + employee_state_taxes_request: Annotated[ + EmployeeStateTaxesRequest, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PutV1EmployeesEmployeeIDStateTaxesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_employeesop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_employeesop.py index 5cd3d179..8f993993 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_employeesop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_employeesop.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from enum import Enum from gusto_embedded.types import ( BaseModel, Nullable, @@ -20,6 +21,12 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PutV1EmployeesHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PutV1EmployeesRequestBodyTypedDict(TypedDict): version: str r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" @@ -27,6 +34,7 @@ class PutV1EmployeesRequestBodyTypedDict(TypedDict): middle_initial: NotRequired[Nullable[str]] last_name: NotRequired[str] email: NotRequired[str] + work_email: NotRequired[str] date_of_birth: NotRequired[str] ssn: NotRequired[str] preferred_first_name: NotRequired[Nullable[str]] @@ -46,6 +54,8 @@ class PutV1EmployeesRequestBody(BaseModel): email: Optional[str] = None + work_email: Optional[str] = None + date_of_birth: Optional[str] = None ssn: Optional[str] = None @@ -62,6 +72,7 @@ def serialize_model(self, handler): "middle_initial", "last_name", "email", + "work_email", "date_of_birth", "ssn", "preferred_first_name", @@ -99,7 +110,8 @@ class PutV1EmployeesRequestTypedDict(TypedDict): employee_id: str r"""The UUID of the employee""" request_body: PutV1EmployeesRequestBodyTypedDict - x_gusto_api_version: NotRequired[str] + x_gusto_api_version: NotRequired[PutV1EmployeesHeaderXGustoAPIVersion] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" class PutV1EmployeesRequest(BaseModel): @@ -114,7 +126,8 @@ class PutV1EmployeesRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[str], + Optional[PutV1EmployeesHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = None + ] = PutV1EmployeesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_home_addresses_home_address_uuidop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_home_addresses_home_address_uuidop.py index 81925770..847373cf 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_home_addresses_home_address_uuidop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_home_addresses_home_address_uuidop.py @@ -1,8 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from datetime import date +from enum import Enum from gusto_embedded.types import ( BaseModel, Nullable, @@ -22,21 +22,27 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict(TypedDict): version: str - r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field.""" + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" street_1: NotRequired[str] street_2: NotRequired[Nullable[str]] city: NotRequired[str] state: NotRequired[str] zip_code: NotRequired[str] - effective_date: NotRequired[date] + effective_date: NotRequired[Nullable[date]] courtesy_withholding: NotRequired[bool] class PutV1HomeAddressesHomeAddressUUIDRequestBody(BaseModel): version: str - r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field.""" + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" street_1: Optional[str] = None @@ -48,7 +54,7 @@ class PutV1HomeAddressesHomeAddressUUIDRequestBody(BaseModel): zip_code: Annotated[Optional[str], pydantic.Field(alias="zip")] = None - effective_date: Optional[date] = None + effective_date: OptionalNullable[date] = UNSET courtesy_withholding: Optional[bool] = None @@ -63,7 +69,7 @@ def serialize_model(self, handler): "effective_date", "courtesy_withholding", ] - nullable_fields = ["street_2"] + nullable_fields = ["street_2", "effective_date"] null_default_fields = [] serialized = handler(self) @@ -95,7 +101,9 @@ class PutV1HomeAddressesHomeAddressUUIDRequestTypedDict(TypedDict): home_address_uuid: str r"""The UUID of the home address""" request_body: PutV1HomeAddressesHomeAddressUUIDRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -111,8 +119,8 @@ class PutV1HomeAddressesHomeAddressUUIDRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PutV1HomeAddressesHomeAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_recurring_reimbursementsop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_recurring_reimbursementsop.py new file mode 100644 index 00000000..d2a6f998 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_recurring_reimbursementsop.py @@ -0,0 +1,97 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import BaseModel +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PutV1RecurringReimbursementsHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class PutV1RecurringReimbursementsRequestBodyTypedDict(TypedDict): + version: str + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + description: NotRequired[str] + r"""The description of the reimbursement""" + amount: NotRequired[float] + r"""The dollar amount of the reimbursement""" + + +class PutV1RecurringReimbursementsRequestBody(BaseModel): + version: str + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + + description: Optional[str] = None + r"""The description of the reimbursement""" + + amount: Optional[float] = None + r"""The dollar amount of the reimbursement""" + + +class PutV1RecurringReimbursementsRequestTypedDict(TypedDict): + id: str + r"""The UUID of the reimbursement""" + request_body: PutV1RecurringReimbursementsRequestBodyTypedDict + x_gusto_api_version: NotRequired[PutV1RecurringReimbursementsHeaderXGustoAPIVersion] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class PutV1RecurringReimbursementsRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the reimbursement""" + + request_body: Annotated[ + PutV1RecurringReimbursementsRequestBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + x_gusto_api_version: Annotated[ + Optional[PutV1RecurringReimbursementsHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = PutV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class PutV1RecurringReimbursementsResponseBodyTypedDict(TypedDict): + r"""successful""" + + uuid: str + employee_uuid: str + description: str + amount: str + version: str + created_at: NotRequired[str] + updated_at: NotRequired[str] + + +class PutV1RecurringReimbursementsResponseBody(BaseModel): + r"""successful""" + + uuid: str + + employee_uuid: str + + description: str + + amount: str + + version: str + + created_at: Optional[str] = None + + updated_at: Optional[str] = None diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_salary_estimates_idop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_salary_estimates_idop.py new file mode 100644 index 00000000..51aa7311 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_salary_estimates_idop.py @@ -0,0 +1,139 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from gusto_embedded.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PutV1SalaryEstimatesIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + +class PutV1SalaryEstimatesIDExperienceLevel(str, Enum): + r"""Experience level for this occupation""" + + NOVICE = "novice" + INTERMEDIATE = "intermediate" + AVERAGE = "average" + SKILLED = "skilled" + EXPERT = "expert" + + +class PutV1SalaryEstimatesIDOccupationsTypedDict(TypedDict): + code: str + r"""Bureau of Labor Statistics (BLS) occupation code""" + experience_level: PutV1SalaryEstimatesIDExperienceLevel + r"""Experience level for this occupation""" + time_percentage: str + r"""Percentage of time spent in this occupation (as decimal, e.g., 0.5 = 50%)""" + primary: NotRequired[bool] + r"""Whether this is the primary occupation""" + + +class PutV1SalaryEstimatesIDOccupations(BaseModel): + code: str + r"""Bureau of Labor Statistics (BLS) occupation code""" + + experience_level: PutV1SalaryEstimatesIDExperienceLevel + r"""Experience level for this occupation""" + + time_percentage: str + r"""Percentage of time spent in this occupation (as decimal, e.g., 0.5 = 50%)""" + + primary: Optional[bool] = None + r"""Whether this is the primary occupation""" + + +class PutV1SalaryEstimatesIDRequestBodyTypedDict(TypedDict): + zip_code: str + r"""The ZIP code for location-based salary calculations""" + occupations: List[PutV1SalaryEstimatesIDOccupationsTypedDict] + r"""Array of occupations. Time percentages must sum to 100%.""" + annual_net_revenue: NotRequired[Nullable[float]] + r"""The annual net revenue of the business (must be greater than 0)""" + + +class PutV1SalaryEstimatesIDRequestBody(BaseModel): + zip_code: str + r"""The ZIP code for location-based salary calculations""" + + occupations: List[PutV1SalaryEstimatesIDOccupations] + r"""Array of occupations. Time percentages must sum to 100%.""" + + annual_net_revenue: OptionalNullable[float] = UNSET + r"""The annual net revenue of the business (must be greater than 0)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["annual_net_revenue"] + nullable_fields = ["annual_net_revenue"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PutV1SalaryEstimatesIDRequestTypedDict(TypedDict): + uuid: str + r"""The UUID of the salary estimate""" + request_body: PutV1SalaryEstimatesIDRequestBodyTypedDict + x_gusto_api_version: NotRequired[PutV1SalaryEstimatesIDHeaderXGustoAPIVersion] + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + +class PutV1SalaryEstimatesIDRequest(BaseModel): + uuid: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The UUID of the salary estimate""" + + request_body: Annotated[ + PutV1SalaryEstimatesIDRequestBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + x_gusto_api_version: Annotated[ + Optional[PutV1SalaryEstimatesIDHeaderXGustoAPIVersion], + pydantic.Field(alias="X-Gusto-API-Version"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = PutV1SalaryEstimatesIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/put_v1_work_addresses_work_address_uuidop.py b/gusto_embedded/src/gusto_embedded/models/put_v1_work_addresses_work_address_uuidop.py index 2d88775c..cbe305ba 100644 --- a/gusto_embedded/src/gusto_embedded/models/put_v1_work_addresses_work_address_uuidop.py +++ b/gusto_embedded/src/gusto_embedded/models/put_v1_work_addresses_work_address_uuidop.py @@ -1,8 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .versionheader import VersionHeader from datetime import date +from enum import Enum from gusto_embedded.types import BaseModel from gusto_embedded.utils import ( FieldMetadata, @@ -15,9 +15,15 @@ from typing_extensions import Annotated, NotRequired, TypedDict +class PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion(str, Enum): + r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" + + TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 = "2024-04-01" + + class PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict(TypedDict): version: str - r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field.""" + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" location_uuid: NotRequired[str] r"""Reference to a company location""" effective_date: NotRequired[date] @@ -25,7 +31,7 @@ class PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict(TypedDict): class PutV1WorkAddressesWorkAddressUUIDRequestBody(BaseModel): version: str - r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field.""" + r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" location_uuid: Optional[str] = None r"""Reference to a company location""" @@ -37,7 +43,9 @@ class PutV1WorkAddressesWorkAddressUUIDRequestTypedDict(TypedDict): work_address_uuid: str r"""The UUID of the work address""" request_body: PutV1WorkAddressesWorkAddressUUIDRequestBodyTypedDict - x_gusto_api_version: NotRequired[VersionHeader] + x_gusto_api_version: NotRequired[ + PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion + ] r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" @@ -53,8 +61,8 @@ class PutV1WorkAddressesWorkAddressUUIDRequest(BaseModel): ] x_gusto_api_version: Annotated[ - Optional[VersionHeader], + Optional[PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion], pydantic.Field(alias="X-Gusto-API-Version"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), - ] = VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 + ] = PutV1WorkAddressesWorkAddressUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01 r"""Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.""" diff --git a/gusto_embedded/src/gusto_embedded/models/recovery_case.py b/gusto_embedded/src/gusto_embedded/models/recovery_case.py index 7d7fa7e8..a3bd1e3b 100644 --- a/gusto_embedded/src/gusto_embedded/models/recovery_case.py +++ b/gusto_embedded/src/gusto_embedded/models/recovery_case.py @@ -2,7 +2,14 @@ from __future__ import annotations from enum import Enum -from gusto_embedded.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -34,7 +41,7 @@ class RecoveryCaseTypedDict(TypedDict): r"""Check date for the associated payroll or contractor payments""" payroll_uuid: NotRequired[str] r"""The uuid of the associated payroll for which the recovery case was created. If the recovery case was created for a contractor payment, this field will be null.""" - contractor_payment_uuids: NotRequired[List[str]] + contractor_payment_uuids: NotRequired[Nullable[List[str]]] r"""The uuids of the associated contractor payments for which the recovery case was created. If the recovery case was created for a payroll, this field will be null.""" amount_outstanding: NotRequired[str] r"""Amount outstanding for the recovery case""" @@ -66,7 +73,7 @@ class RecoveryCase(BaseModel): payroll_uuid: Optional[str] = None r"""The uuid of the associated payroll for which the recovery case was created. If the recovery case was created for a contractor payment, this field will be null.""" - contractor_payment_uuids: Optional[List[str]] = None + contractor_payment_uuids: OptionalNullable[List[str]] = UNSET r"""The uuids of the associated contractor payments for which the recovery case was created. If the recovery case was created for a payroll, this field will be null.""" amount_outstanding: Optional[str] = None @@ -74,3 +81,43 @@ class RecoveryCase(BaseModel): event_total_amount: Optional[str] = None r"""Total amount to be debited from the payroll or contractor payments""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "company_uuid", + "status", + "latest_error_code", + "original_debit_date", + "check_date", + "payroll_uuid", + "contractor_payment_uuids", + "amount_outstanding", + "event_total_amount", + ] + nullable_fields = ["contractor_payment_uuids"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/responsevalidationerror.py b/gusto_embedded/src/gusto_embedded/models/responsevalidationerror.py new file mode 100644 index 00000000..13f0e7a8 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/responsevalidationerror.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import httpx +from typing import Optional +from dataclasses import dataclass + +from gusto_embedded.models import GustoError + + +@dataclass(unsafe_hash=True) +class ResponseValidationError(GustoError): + """Error raised when there is a type mismatch between the response data and the expected Pydantic model.""" + + def __init__( + self, + message: str, + raw_response: httpx.Response, + cause: Exception, + body: Optional[str] = None, + ): + message = f"{message}: {cause}" + super().__init__(message, raw_response, body) + + @property + def cause(self): + """Normally the Pydantic ValidationError""" + return self.__cause__ diff --git a/gusto_embedded/src/gusto_embedded/models/salary_estimate.py b/gusto_embedded/src/gusto_embedded/models/salary_estimate.py new file mode 100644 index 00000000..3223c3bb --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/salary_estimate.py @@ -0,0 +1,156 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class ExperienceLevel(str, Enum): + r"""Experience level for this occupation.""" + + NOVICE = "novice" + INTERMEDIATE = "intermediate" + AVERAGE = "average" + SKILLED = "skilled" + EXPERT = "expert" + + +class OccupationsTypedDict(TypedDict): + code: str + r"""Bureau of Labor Statistics (BLS) occupation code.""" + experience_level: ExperienceLevel + r"""Experience level for this occupation.""" + time_percentage: str + r"""Percentage of time spent in this occupation (as decimal string, 0-1).""" + name: NotRequired[str] + r"""Occupation name.""" + description: NotRequired[str] + r"""Occupation description.""" + primary: NotRequired[bool] + r"""Whether this is the primary occupation.""" + + +class Occupations(BaseModel): + code: str + r"""Bureau of Labor Statistics (BLS) occupation code.""" + + experience_level: ExperienceLevel + r"""Experience level for this occupation.""" + + time_percentage: str + r"""Percentage of time spent in this occupation (as decimal string, 0-1).""" + + name: Optional[str] = None + r"""Occupation name.""" + + description: Optional[str] = None + r"""Occupation description.""" + + primary: Optional[bool] = None + r"""Whether this is the primary occupation.""" + + +class SalaryEstimateTypedDict(TypedDict): + r"""A salary estimate calculation for an S-Corp owner based on occupation, experience level, location, and business revenue.""" + + uuid: str + r"""The UUID of the salary estimate.""" + employee_uuid: Nullable[str] + r"""The UUID of the employee this salary estimate is for.""" + annual_net_revenue: Nullable[str] + r"""The annual net revenue of the business used for salary calculations.""" + zip_code: Nullable[str] + r"""The ZIP code used for location-based salary calculations.""" + created_at: datetime + r"""The timestamp when this salary estimate was created.""" + updated_at: datetime + r"""The timestamp when this salary estimate was last updated.""" + occupations: List[OccupationsTypedDict] + r"""Array of occupations with their experience levels and time allocations.""" + employee_job_uuid: NotRequired[Nullable[str]] + r"""The UUID of the employee job this salary estimate is associated with (once accepted).""" + result: NotRequired[Nullable[int]] + r"""The calculated reasonable salary estimate in cents. Null if not yet calculated.""" + accepted_at: NotRequired[Nullable[datetime]] + r"""The timestamp when this salary estimate was accepted and finalized.""" + + +class SalaryEstimate(BaseModel): + r"""A salary estimate calculation for an S-Corp owner based on occupation, experience level, location, and business revenue.""" + + uuid: str + r"""The UUID of the salary estimate.""" + + employee_uuid: Nullable[str] + r"""The UUID of the employee this salary estimate is for.""" + + annual_net_revenue: Nullable[str] + r"""The annual net revenue of the business used for salary calculations.""" + + zip_code: Nullable[str] + r"""The ZIP code used for location-based salary calculations.""" + + created_at: datetime + r"""The timestamp when this salary estimate was created.""" + + updated_at: datetime + r"""The timestamp when this salary estimate was last updated.""" + + occupations: List[Occupations] + r"""Array of occupations with their experience levels and time allocations.""" + + employee_job_uuid: OptionalNullable[str] = UNSET + r"""The UUID of the employee job this salary estimate is associated with (once accepted).""" + + result: OptionalNullable[int] = UNSET + r"""The calculated reasonable salary estimate in cents. Null if not yet calculated.""" + + accepted_at: OptionalNullable[datetime] = UNSET + r"""The timestamp when this salary estimate was accepted and finalized.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["employee_job_uuid", "result", "accepted_at"] + nullable_fields = [ + "employee_uuid", + "employee_job_uuid", + "annual_net_revenue", + "zip_code", + "result", + "accepted_at", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/show_employees.py b/gusto_embedded/src/gusto_embedded/models/show_employees.py new file mode 100644 index 00000000..370bd140 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/show_employees.py @@ -0,0 +1,358 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .employee_custom_field import EmployeeCustomField, EmployeeCustomFieldTypedDict +from .employee_home_address import EmployeeHomeAddress, EmployeeHomeAddressTypedDict +from .flsa_status_type import FlsaStatusType +from .garnishment import Garnishment, GarnishmentTypedDict +from .job import Job, JobTypedDict +from .paid_time_off import PaidTimeOff, PaidTimeOffTypedDict +from .termination import Termination, TerminationTypedDict +from datetime import date +from enum import Enum +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, List, Optional +from typing_extensions import NotRequired, TypedDict + + +class OnboardingStatus(str, Enum): + r"""The current onboarding status of the employee""" + + ONBOARDING_COMPLETED = "onboarding_completed" + ADMIN_ONBOARDING_INCOMPLETE = "admin_onboarding_incomplete" + SELF_ONBOARDING_PENDING_INVITE = "self_onboarding_pending_invite" + SELF_ONBOARDING_INVITED = "self_onboarding_invited" + SELF_ONBOARDING_INVITED_STARTED = "self_onboarding_invited_started" + SELF_ONBOARDING_INVITED_OVERDUE = "self_onboarding_invited_overdue" + SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE = "self_onboarding_completed_by_employee" + SELF_ONBOARDING_AWAITING_ADMIN_REVIEW = "self_onboarding_awaiting_admin_review" + + +class OnboardingDocumentsConfigTypedDict(TypedDict): + r"""Configuration for an employee onboarding documents during onboarding""" + + uuid: NotRequired[Nullable[str]] + r"""The UUID of the onboarding documents config""" + i9_document: NotRequired[bool] + r"""Whether to include Form I-9 for an employee during onboarding""" + + +class OnboardingDocumentsConfig(BaseModel): + r"""Configuration for an employee onboarding documents during onboarding""" + + uuid: OptionalNullable[str] = UNSET + r"""The UUID of the onboarding documents config""" + + i9_document: Optional[bool] = None + r"""Whether to include Form I-9 for an employee during onboarding""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["uuid", "i9_document"] + nullable_fields = ["uuid"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PaymentMethod(str, Enum): + r"""The employee's payment method""" + + DIRECT_DEPOSIT = "Direct Deposit" + CHECK = "Check" + + +class CurrentEmploymentStatus(str, Enum): + r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" + + FULL_TIME = "full_time" + PART_TIME_UNDER_TWENTY_HOURS = "part_time_under_twenty_hours" + PART_TIME_TWENTY_PLUS_HOURS = "part_time_twenty_plus_hours" + VARIABLE = "variable" + SEASONAL = "seasonal" + + +class ShowEmployeesTypedDict(TypedDict): + r"""The representation of an employee in Gusto.""" + + uuid: str + r"""The UUID of the employee in Gusto.""" + first_name: str + last_name: str + middle_initial: NotRequired[Nullable[str]] + email: NotRequired[Nullable[str]] + r"""The personal email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" + company_uuid: NotRequired[str] + r"""The UUID of the company the employee is employed by.""" + manager_uuid: NotRequired[Nullable[str]] + r"""The UUID of the employee's manager.""" + version: NotRequired[str] + r"""The current version of the employee. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + department: NotRequired[Nullable[str]] + r"""The employee's department in the company.""" + terminated: NotRequired[bool] + r"""Whether the employee is terminated.""" + two_percent_shareholder: NotRequired[Nullable[bool]] + r"""Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type.""" + work_email: NotRequired[Nullable[str]] + r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" + onboarded: NotRequired[bool] + r"""Whether the employee has completed onboarding.""" + onboarding_status: NotRequired[Nullable[OnboardingStatus]] + r"""The current onboarding status of the employee""" + onboarding_documents_config: NotRequired[OnboardingDocumentsConfigTypedDict] + r"""Configuration for an employee onboarding documents during onboarding""" + jobs: NotRequired[List[JobTypedDict]] + eligible_paid_time_off: NotRequired[List[PaidTimeOffTypedDict]] + terminations: NotRequired[List[TerminationTypedDict]] + garnishments: NotRequired[List[GarnishmentTypedDict]] + custom_fields: NotRequired[List[EmployeeCustomFieldTypedDict]] + r"""Custom fields are only included for the employee if the include param has the custom_fields value set""" + date_of_birth: NotRequired[Nullable[str]] + has_ssn: NotRequired[bool] + r"""Indicates whether the employee has an SSN in Gusto.""" + ssn: NotRequired[str] + r"""Deprecated. This field always returns an empty string.""" + phone: NotRequired[Nullable[str]] + preferred_first_name: NotRequired[Nullable[str]] + payment_method: NotRequired[PaymentMethod] + r"""The employee's payment method""" + current_employment_status: NotRequired[Nullable[CurrentEmploymentStatus]] + r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" + historical: NotRequired[bool] + employee_code: NotRequired[str] + r"""The short format code of the employee""" + department_uuid: NotRequired[Nullable[str]] + r"""The UUID of the department the employee is under""" + title: NotRequired[str] + hired_at: NotRequired[date] + r"""The date when the employee was hired to the company""" + hidden_ssn: NotRequired[str] + flsa_status: NotRequired[FlsaStatusType] + r"""The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company.""" + applicable_tax_ids: NotRequired[List[float]] + current_home_address: NotRequired[EmployeeHomeAddressTypedDict] + all_home_addresses: NotRequired[List[EmployeeHomeAddressTypedDict]] + + +class ShowEmployees(BaseModel): + r"""The representation of an employee in Gusto.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + uuid: str + r"""The UUID of the employee in Gusto.""" + + first_name: str + + last_name: str + + middle_initial: OptionalNullable[str] = UNSET + + email: OptionalNullable[str] = UNSET + r"""The personal email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" + + company_uuid: Optional[str] = None + r"""The UUID of the company the employee is employed by.""" + + manager_uuid: OptionalNullable[str] = UNSET + r"""The UUID of the employee's manager.""" + + version: Optional[str] = None + r"""The current version of the employee. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.""" + + department: OptionalNullable[str] = UNSET + r"""The employee's department in the company.""" + + terminated: Optional[bool] = None + r"""Whether the employee is terminated.""" + + two_percent_shareholder: OptionalNullable[bool] = UNSET + r"""Whether the employee is a two percent shareholder of the company. This field only applies to companies with an S-Corp entity type.""" + + work_email: OptionalNullable[str] = UNSET + r"""The work email address of the employee. This is provided to support syncing users between our system and yours. You may not use this email address for any other purpose (e.g. marketing).""" + + onboarded: Optional[bool] = None + r"""Whether the employee has completed onboarding.""" + + onboarding_status: OptionalNullable[OnboardingStatus] = UNSET + r"""The current onboarding status of the employee""" + + onboarding_documents_config: Optional[OnboardingDocumentsConfig] = None + r"""Configuration for an employee onboarding documents during onboarding""" + + jobs: Optional[List[Job]] = None + + eligible_paid_time_off: Optional[List[PaidTimeOff]] = None + + terminations: Optional[List[Termination]] = None + + garnishments: Optional[List[Garnishment]] = None + + custom_fields: Optional[List[EmployeeCustomField]] = None + r"""Custom fields are only included for the employee if the include param has the custom_fields value set""" + + date_of_birth: OptionalNullable[str] = UNSET + + has_ssn: Optional[bool] = None + r"""Indicates whether the employee has an SSN in Gusto.""" + + ssn: Optional[str] = None + r"""Deprecated. This field always returns an empty string.""" + + phone: OptionalNullable[str] = UNSET + + preferred_first_name: OptionalNullable[str] = UNSET + + payment_method: Optional[PaymentMethod] = PaymentMethod.CHECK + r"""The employee's payment method""" + + current_employment_status: OptionalNullable[CurrentEmploymentStatus] = UNSET + r"""The current employment status of the employee. Full-time employees work 30+ hours per week. Part-time employees are split into two groups: those that work 20-29 hours a week, and those that work under 20 hours a week. Variable employees have hours that vary each week. Seasonal employees are hired for 6 months of the year or less.""" + + historical: Optional[bool] = None + + employee_code: Optional[str] = None + r"""The short format code of the employee""" + + department_uuid: OptionalNullable[str] = UNSET + r"""The UUID of the department the employee is under""" + + title: Optional[str] = None + + hired_at: Optional[date] = None + r"""The date when the employee was hired to the company""" + + hidden_ssn: Optional[str] = None + + flsa_status: Optional[FlsaStatusType] = None + r"""The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company.""" + + applicable_tax_ids: Optional[List[float]] = None + + current_home_address: Optional[EmployeeHomeAddress] = None + + all_home_addresses: Optional[List[EmployeeHomeAddress]] = None + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "middle_initial", + "email", + "company_uuid", + "manager_uuid", + "version", + "department", + "terminated", + "two_percent_shareholder", + "work_email", + "onboarded", + "onboarding_status", + "onboarding_documents_config", + "jobs", + "eligible_paid_time_off", + "terminations", + "garnishments", + "custom_fields", + "date_of_birth", + "has_ssn", + "ssn", + "phone", + "preferred_first_name", + "payment_method", + "current_employment_status", + "historical", + "employee_code", + "department_uuid", + "title", + "hired_at", + "hidden_ssn", + "flsa_status", + "applicable_tax_ids", + "current_home_address", + "all_home_addresses", + ] + nullable_fields = [ + "middle_initial", + "email", + "manager_uuid", + "department", + "two_percent_shareholder", + "work_email", + "onboarding_status", + "date_of_birth", + "phone", + "preferred_first_name", + "current_employment_status", + "department_uuid", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/supported_benefit.py b/gusto_embedded/src/gusto_embedded/models/supported_benefit.py index e0641f6a..bc1f6459 100644 --- a/gusto_embedded/src/gusto_embedded/models/supported_benefit.py +++ b/gusto_embedded/src/gusto_embedded/models/supported_benefit.py @@ -29,6 +29,8 @@ class SupportedBenefitTypedDict(TypedDict): r"""Whether the benefit has a government mandated yearly limit. If the benefit has a government mandated yearly limit, employees cannot be added to more than one benefit of this type.""" category: NotRequired[str] r"""Category where the benefit belongs to.""" + writable_by_application: NotRequired[bool] + r"""Whether this benefit can be written (created, updated, or destroyed). Returns true if the benefit type is permitted for the application, false otherwise.""" class SupportedBenefit(BaseModel): @@ -63,3 +65,6 @@ class SupportedBenefit(BaseModel): category: Optional[str] = None r"""Category where the benefit belongs to.""" + + writable_by_application: Optional[bool] = None + r"""Whether this benefit can be written (created, updated, or destroyed). Returns true if the benefit type is permitted for the application, false otherwise.""" diff --git a/gusto_embedded/src/gusto_embedded/models/tax_requirement.py b/gusto_embedded/src/gusto_embedded/models/tax_requirement.py index 5ae03b5f..acfa3298 100644 --- a/gusto_embedded/src/gusto_embedded/models/tax_requirement.py +++ b/gusto_embedded/src/gusto_embedded/models/tax_requirement.py @@ -75,12 +75,12 @@ def serialize_model(self, handler): TaxRequirementValueTypedDict = TypeAliasType( - "TaxRequirementValueTypedDict", Union[str, bool] + "TaxRequirementValueTypedDict", Union[bool, str, float] ) r"""The \"answer\" """ -TaxRequirementValue = TypeAliasType("TaxRequirementValue", Union[str, bool]) +TaxRequirementValue = TypeAliasType("TaxRequirementValue", Union[bool, str, float]) r"""The \"answer\" """ diff --git a/gusto_embedded/src/gusto_embedded/models/tax_requirement_metadata.py b/gusto_embedded/src/gusto_embedded/models/tax_requirement_metadata.py index f139d893..ff6de8e9 100644 --- a/gusto_embedded/src/gusto_embedded/models/tax_requirement_metadata.py +++ b/gusto_embedded/src/gusto_embedded/models/tax_requirement_metadata.py @@ -55,7 +55,7 @@ class TaxRequirementMetadataOptionsTypedDict(TypedDict): r"""A customer facing label for the answer""" value: TaxRequirementMetadataValueTypedDict r"""The actual value to be submitted""" - short_label: NotRequired[str] + short_label: NotRequired[Nullable[str]] r"""A less verbose label that may sometimes be available""" @@ -66,9 +66,39 @@ class TaxRequirementMetadataOptions(BaseModel): value: TaxRequirementMetadataValue r"""The actual value to be submitted""" - short_label: Optional[str] = None + short_label: OptionalNullable[str] = UNSET r"""A less verbose label that may sometimes be available""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["short_label"] + nullable_fields = ["short_label"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + class RateType(str, Enum): r"""[for `workers_compensation_rate`] The type of rate being collected. Either: diff --git a/gusto_embedded/src/gusto_embedded/models/time_off_policy.py b/gusto_embedded/src/gusto_embedded/models/time_off_policy.py index 77fc1e82..08186c94 100644 --- a/gusto_embedded/src/gusto_embedded/models/time_off_policy.py +++ b/gusto_embedded/src/gusto_embedded/models/time_off_policy.py @@ -2,7 +2,14 @@ from __future__ import annotations from enum import Enum -from gusto_embedded.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -16,11 +23,16 @@ class PolicyType(str, Enum): class TimeOffPolicyEmployeesTypedDict(TypedDict): uuid: NotRequired[str] + balance: NotRequired[str] + r"""Employee's current time off balance. Represented as a float, e.g. \"40.0\".""" class TimeOffPolicyEmployees(BaseModel): uuid: Optional[str] = None + balance: Optional[str] = None + r"""Employee's current time off balance. Represented as a float, e.g. \"40.0\".""" + class TimeOffPolicyTypedDict(TypedDict): r"""Representation of a Time Off Policy""" @@ -39,13 +51,13 @@ class TimeOffPolicyTypedDict(TypedDict): r"""boolean representing if a policy is active or not""" employees: List[TimeOffPolicyEmployeesTypedDict] r"""List of employee UUIDs under a time off policy""" - accrual_rate: NotRequired[str] + accrual_rate: NotRequired[Nullable[str]] r"""The rate at which the time off hours will accrue for an employee on the policy. Represented as a float, e.g. \"40.0\".""" - accrual_rate_unit: NotRequired[str] + accrual_rate_unit: NotRequired[Nullable[str]] r"""The number of hours an employee has to work or be paid for to accrue the number of hours set in the accrual rate. Only used for hourly policies (per_hour_paid, per_hour_paid_no_overtime, per_hour_work, per_hour_worked_no_overtime). Represented as a float, e.g. \"40.0\".""" paid_out_on_termination: NotRequired[bool] r"""Boolean representing if an employee's accrued time off hours will be paid out on termination""" - accrual_waiting_period_days: NotRequired[int] + accrual_waiting_period_days: NotRequired[Nullable[int]] r"""Number of days before an employee on the policy will begin accruing time off hours""" carryover_limit_hours: NotRequired[str] r"""The max number of hours an employee can carryover from one year to the next""" @@ -83,16 +95,16 @@ class TimeOffPolicy(BaseModel): employees: List[TimeOffPolicyEmployees] r"""List of employee UUIDs under a time off policy""" - accrual_rate: Optional[str] = None + accrual_rate: OptionalNullable[str] = UNSET r"""The rate at which the time off hours will accrue for an employee on the policy. Represented as a float, e.g. \"40.0\".""" - accrual_rate_unit: Optional[str] = None + accrual_rate_unit: OptionalNullable[str] = UNSET r"""The number of hours an employee has to work or be paid for to accrue the number of hours set in the accrual rate. Only used for hourly policies (per_hour_paid, per_hour_paid_no_overtime, per_hour_work, per_hour_worked_no_overtime). Represented as a float, e.g. \"40.0\".""" paid_out_on_termination: Optional[bool] = None r"""Boolean representing if an employee's accrued time off hours will be paid out on termination""" - accrual_waiting_period_days: Optional[int] = None + accrual_waiting_period_days: OptionalNullable[int] = UNSET r"""Number of days before an employee on the policy will begin accruing time off hours""" carryover_limit_hours: Optional[str] = None @@ -109,3 +121,47 @@ class TimeOffPolicy(BaseModel): version: Optional[str] = None r"""The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for information on how to use this field.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "accrual_rate", + "accrual_rate_unit", + "paid_out_on_termination", + "accrual_waiting_period_days", + "carryover_limit_hours", + "max_accrual_hours_per_year", + "max_hours", + "complete", + "version", + ] + nullable_fields = [ + "accrual_rate", + "accrual_rate_unit", + "accrual_waiting_period_days", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/models/unprocessable_entity_error_object.py b/gusto_embedded/src/gusto_embedded/models/unprocessable_entity_error_object.py new file mode 100644 index 00000000..2ebe0f09 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/unprocessable_entity_error_object.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .entity_error_object import EntityErrorObject +from dataclasses import dataclass, field +from gusto_embedded.models import GustoError +from gusto_embedded.types import BaseModel +import httpx +from typing import List, Optional + + +class UnprocessableEntityErrorObjectData(BaseModel): + errors: List[EntityErrorObject] + + +@dataclass(unsafe_hash=True) +class UnprocessableEntityErrorObject(GustoError): + r"""Unprocessable Entity + + This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. + + """ + + data: UnprocessableEntityErrorObjectData = field(hash=False) + + def __init__( + self, + data: UnprocessableEntityErrorObjectData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/gusto_embedded/src/gusto_embedded/models/unprocessable_entity_error_object_error.py b/gusto_embedded/src/gusto_embedded/models/unprocessable_entity_error_object_error.py deleted file mode 100644 index a1ca56fa..00000000 --- a/gusto_embedded/src/gusto_embedded/models/unprocessable_entity_error_object_error.py +++ /dev/null @@ -1,27 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .entity_error_object import EntityErrorObject -from gusto_embedded import utils -from gusto_embedded.types import BaseModel -from typing import List - - -class UnprocessableEntityErrorObjectErrorData(BaseModel): - errors: List[EntityErrorObject] - - -class UnprocessableEntityErrorObjectError(Exception): - r"""Unprocessable Entity - - This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details. - - """ - - data: UnprocessableEntityErrorObjectErrorData - - def __init__(self, data: UnprocessableEntityErrorObjectErrorData): - self.data = data - - def __str__(self) -> str: - return utils.marshal_json(self.data, UnprocessableEntityErrorObjectErrorData) diff --git a/gusto_embedded/src/gusto_embedded/models/webhooks_health_check_status.py b/gusto_embedded/src/gusto_embedded/models/webhooks_health_check_status.py new file mode 100644 index 00000000..323827fe --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/models/webhooks_health_check_status.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +from gusto_embedded.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class WebhooksHealthCheckStatusStatus(str, Enum): + r"""Latest health status of the webhooks system""" + + HEALTHY = "healthy" + UNHEALTHY = "unhealthy" + UNKNOWN = "unknown" + + +class WebhooksHealthCheckStatusTypedDict(TypedDict): + r"""The representation of a webhooks health check response""" + + status: NotRequired[WebhooksHealthCheckStatusStatus] + r"""Latest health status of the webhooks system""" + last_checked_at: NotRequired[datetime] + r"""ISO8601 timestamp of the last successful health check with millisecond precision""" + + +class WebhooksHealthCheckStatus(BaseModel): + r"""The representation of a webhooks health check response""" + + status: Optional[WebhooksHealthCheckStatusStatus] = None + r"""Latest health status of the webhooks system""" + + last_checked_at: Optional[datetime] = None + r"""ISO8601 timestamp of the last successful health check with millisecond precision""" diff --git a/gusto_embedded/src/gusto_embedded/models/wire_in_request.py b/gusto_embedded/src/gusto_embedded/models/wire_in_request.py index 68c5f7ee..584022a9 100644 --- a/gusto_embedded/src/gusto_embedded/models/wire_in_request.py +++ b/gusto_embedded/src/gusto_embedded/models/wire_in_request.py @@ -2,7 +2,14 @@ from __future__ import annotations from enum import Enum -from gusto_embedded.types import BaseModel +from gusto_embedded.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -13,12 +20,11 @@ class WireInRequestStatus(str, Enum): AWAITING_FUNDS = "awaiting_funds" PENDING_REVIEW = "pending_review" APPROVED = "approved" - RFI = "rfi" CANCELED = "canceled" -class PaymentUUID(str, Enum): - r"""Unique identifier of the payment""" +class PaymentType(str, Enum): + r"""Type of payment for the wire in""" PAYROLL = "payroll" @@ -42,7 +48,7 @@ class WireInRequestTypedDict(TypedDict): r"""Recipient bank account number""" recipient_routing_number: NotRequired[str] r"""Recipient bank routing number""" - additional_notes: NotRequired[str] + additional_notes: NotRequired[Nullable[str]] r"""Notes for the wire in request""" bank_name: NotRequired[str] r"""Name of the bank initiating the wire in""" @@ -50,9 +56,9 @@ class WireInRequestTypedDict(TypedDict): r"""Date the wire in was sent""" unique_tracking_code: NotRequired[str] r"""Include in note with bank to track payment""" - payment_type: NotRequired[str] + payment_type: NotRequired[PaymentType] r"""Type of payment for the wire in""" - payment_uuid: NotRequired[PaymentUUID] + payment_uuid: NotRequired[str] r"""Unique identifier of the payment""" amount_sent: NotRequired[str] r"""Amount sent through wire in""" @@ -89,7 +95,7 @@ class WireInRequest(BaseModel): recipient_routing_number: Optional[str] = None r"""Recipient bank routing number""" - additional_notes: Optional[str] = None + additional_notes: OptionalNullable[str] = UNSET r"""Notes for the wire in request""" bank_name: Optional[str] = None @@ -101,10 +107,10 @@ class WireInRequest(BaseModel): unique_tracking_code: Optional[str] = None r"""Include in note with bank to track payment""" - payment_type: Optional[str] = None + payment_type: Optional[PaymentType] = None r"""Type of payment for the wire in""" - payment_uuid: Optional[PaymentUUID] = None + payment_uuid: Optional[str] = None r"""Unique identifier of the payment""" amount_sent: Optional[str] = None @@ -115,3 +121,51 @@ class WireInRequest(BaseModel): wire_in_deadline: Optional[str] = None r"""Deadline to submit the wire in""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "uuid", + "status", + "origination_bank", + "origination_bank_address", + "recipient_name", + "recipient_address", + "recipient_account_number", + "recipient_routing_number", + "additional_notes", + "bank_name", + "date_sent", + "unique_tracking_code", + "payment_type", + "payment_uuid", + "amount_sent", + "requested_amount", + "wire_in_deadline", + ] + nullable_fields = ["additional_notes"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/gusto_embedded/src/gusto_embedded/notifications.py b/gusto_embedded/src/gusto_embedded/notifications.py index c1c88cc3..9ea068bc 100644 --- a/gusto_embedded/src/gusto_embedded/notifications.py +++ b/gusto_embedded/src/gusto_embedded/notifications.py @@ -5,7 +5,8 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env -from typing import Any, Mapping, Optional +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, List, Mapping, Optional class Notifications(BaseSDK): @@ -79,9 +80,10 @@ def get_details( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-notifications-notification_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -93,31 +95,20 @@ def get_details( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Notification) + return unmarshal_json_response(models.Notification, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_details_async( self, @@ -189,9 +180,10 @@ async def get_details_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-notifications-notification_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -203,28 +195,217 @@ async def get_details_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Notification) + return unmarshal_json_response(models.Notification, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_company_notifications( + self, + *, + company_uuid: str, + status: Optional[models.QueryParamStatus] = None, + x_gusto_api_version: Optional[ + models.GetCompanyNotificationsHeaderXGustoAPIVersion + ] = models.GetCompanyNotificationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + page: Optional[int] = None, + per: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.Notification]: + r"""Get notifications for company + + Returns all notifications relevant for the given company. + + scope: `notifications:read` + + + :param company_uuid: The UUID of the company for which you would like to return notifications + :param status: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCompanyNotificationsRequest( + company_uuid=company_uuid, + status=status, + x_gusto_api_version=x_gusto_api_version, + page=page, + per=per, + ) + + req = self._build_request( + method="GET", + path="/v1/companies/{company_uuid}/notifications", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-company-notifications", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.Notification], http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, + raise models.APIError("Unexpected response received", http_res) + + async def get_company_notifications_async( + self, + *, + company_uuid: str, + status: Optional[models.QueryParamStatus] = None, + x_gusto_api_version: Optional[ + models.GetCompanyNotificationsHeaderXGustoAPIVersion + ] = models.GetCompanyNotificationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + page: Optional[int] = None, + per: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.Notification]: + r"""Get notifications for company + + Returns all notifications relevant for the given company. + + scope: `notifications:read` + + + :param company_uuid: The UUID of the company for which you would like to return notifications + :param status: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCompanyNotificationsRequest( + company_uuid=company_uuid, + status=status, + x_gusto_api_version=x_gusto_api_version, + page=page, + per=per, ) + + req = self._build_request_async( + method="GET", + path="/v1/companies/{company_uuid}/notifications", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-company-notifications", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.Notification], http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/paymentconfigs_sdk.py b/gusto_embedded/src/gusto_embedded/paymentconfigs_sdk.py index aa4281d2..ce02a40c 100644 --- a/gusto_embedded/src/gusto_embedded/paymentconfigs_sdk.py +++ b/gusto_embedded/src/gusto_embedded/paymentconfigs_sdk.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Mapping, Optional, Union @@ -23,7 +24,7 @@ def get( ) -> models.PaymentConfigs: r"""Get a company's payment configs - Get payment speed for the company and fast payment limit (1-day is only applicable to partners that opt in). + Get payment speed configurations for the company and fast payment limit (1-day is only applicable to partners that opt in). scope: `company_payment_configs:read` @@ -75,9 +76,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-payment-configs", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,26 +90,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PaymentConfigs) + return unmarshal_json_response(models.PaymentConfigs, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -123,7 +114,7 @@ async def get_async( ) -> models.PaymentConfigs: r"""Get a company's payment configs - Get payment speed for the company and fast payment limit (1-day is only applicable to partners that opt in). + Get payment speed configurations for the company and fast payment limit (1-day is only applicable to partners that opt in). scope: `company_payment_configs:read` @@ -175,9 +166,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-company-payment-configs", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -188,26 +180,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PaymentConfigs) + return unmarshal_json_response(models.PaymentConfigs, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -290,9 +271,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company-payment-configs", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -304,31 +286,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PaymentConfigs) + return unmarshal_json_response(models.PaymentConfigs, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -411,9 +382,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-company-payment-configs", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -425,28 +397,17 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PaymentConfigs) + return unmarshal_json_response(models.PaymentConfigs, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/payrolls.py b/gusto_embedded/src/gusto_embedded/payrolls.py index a4071bea..62384e33 100644 --- a/gusto_embedded/src/gusto_embedded/payrolls.py +++ b/gusto_embedded/src/gusto_embedded/payrolls.py @@ -1,61 +1,601 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from .basesdk import BaseSDK +from datetime import date from gusto_embedded import models, utils from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response +import httpx from typing import Any, List, Mapping, Optional, Union class Payrolls(BaseSDK): + def list( + self, + *, + company_id: str, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + processing_statuses: Optional[List[models.ProcessingStatuses]] = None, + payroll_types: Optional[List[models.PayrollTypes]] = None, + processed: Optional[bool] = None, + include_off_cycle: Optional[bool] = None, + include: Optional[ + List[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude] + ] = None, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + page: Optional[int] = None, + per: Optional[int] = None, + sort_order: Optional[models.QueryParamSortOrder] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.Payroll]: + r"""Get all payrolls for a company + + Returns a list of payrolls for a company. You can change the payrolls returned by updating the processing_status, payroll_types, start_date, & end_date params. + + By default, will return processed, regular payrolls for the past 6 months. + + Notes: + * Dollar amounts are returned as string representations of numeric decimals, are represented to the cent. + * end_date can be at most 3 months in the future and start_date and end_date can't be more than 1 year apart. + + scope: `payrolls:read` + + + :param company_id: The UUID of the company + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param processing_statuses: Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` + :param payroll_types: Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` + :param processed: Whether to return processed or unprocessed payrolls + :param include_off_cycle: Whether to include off cycle payrolls in the response + :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` + :param start_date: Return payrolls whose pay period is after the start date + :param end_date: Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param sort_order: A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1CompaniesCompanyIDPayrollsRequest( + company_id=company_id, + x_gusto_api_version=x_gusto_api_version, + processing_statuses=processing_statuses, + payroll_types=payroll_types, + processed=processed, + include_off_cycle=include_off_cycle, + include=include, + start_date=start_date, + end_date=end_date, + page=page, + per=per, + sort_order=sort_order, + ) + + req = self._build_request( + method="GET", + path="/v1/companies/{company_id}/payrolls", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-payrolls", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.Payroll], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def list_async( + self, + *, + company_id: str, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + processing_statuses: Optional[List[models.ProcessingStatuses]] = None, + payroll_types: Optional[List[models.PayrollTypes]] = None, + processed: Optional[bool] = None, + include_off_cycle: Optional[bool] = None, + include: Optional[ + List[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude] + ] = None, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + page: Optional[int] = None, + per: Optional[int] = None, + sort_order: Optional[models.QueryParamSortOrder] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.Payroll]: + r"""Get all payrolls for a company + + Returns a list of payrolls for a company. You can change the payrolls returned by updating the processing_status, payroll_types, start_date, & end_date params. + + By default, will return processed, regular payrolls for the past 6 months. + + Notes: + * Dollar amounts are returned as string representations of numeric decimals, are represented to the cent. + * end_date can be at most 3 months in the future and start_date and end_date can't be more than 1 year apart. + + scope: `payrolls:read` + + + :param company_id: The UUID of the company + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param processing_statuses: Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` + :param payroll_types: Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` + :param processed: Whether to return processed or unprocessed payrolls + :param include_off_cycle: Whether to include off cycle payrolls in the response + :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` + :param start_date: Return payrolls whose pay period is after the start date + :param end_date: Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param sort_order: A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1CompaniesCompanyIDPayrollsRequest( + company_id=company_id, + x_gusto_api_version=x_gusto_api_version, + processing_statuses=processing_statuses, + payroll_types=payroll_types, + processed=processed, + include_off_cycle=include_off_cycle, + include=include, + start_date=start_date, + end_date=end_date, + page=page, + per=per, + sort_order=sort_order, + ) + + req = self._build_request_async( + method="GET", + path="/v1/companies/{company_id}/payrolls", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-companies-company_id-payrolls", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.Payroll], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + def create_off_cycle( self, *, company_id: str, off_cycle: bool, off_cycle_reason: models.OffCycleReason, - start_date: str, - end_date: str, + start_date: date, + end_date: date, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, pay_schedule_uuid: Optional[str] = None, employee_uuids: Optional[List[str]] = None, - check_date: Optional[str] = None, - withholding_pay_period: Optional[models.WithholdingPayPeriod] = None, + check_date: Optional[date] = None, + withholding_pay_period: Optional[ + models.PostV1CompaniesCompanyIDPayrollsWithholdingPayPeriod + ] = None, skip_regular_deductions: Optional[bool] = None, fixed_withholding_rate: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PayrollPrepared: - r"""Create an off-cycle payroll - - Creates a new, unprocessed, off-cycle payroll. - - ## `off_cycle_reason` - By default: - - External benefits and deductions will be included when the `off_cycle_reason` is set to `Correction`. - - All benefits and deductions are blocked when the `off_cycle_reason` is set to `Bonus`. + ) -> models.PayrollPrepared: + r"""Create an off-cycle payroll + + Creates a new, unprocessed, off-cycle payroll. + + ## `off_cycle_reason` + By default: + - External benefits and deductions will be included when the `off_cycle_reason` is set to `Correction`. + - All benefits and deductions are blocked when the `off_cycle_reason` is set to `Bonus`. + + These elections can be overridden with the `skip_regular_deductions` boolean. + + scope: `payrolls:run` + + + :param company_id: The UUID of the company + :param off_cycle: Whether it is an off cycle payroll. + :param off_cycle_reason: An off cycle payroll reason. Select one from the following list. + :param start_date: Pay period start date. + :param end_date: Pay period end date. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param pay_schedule_uuid: A pay schedule is required for transition from old pay schedule payroll to identify the matching transition pay period. + :param employee_uuids: A list of employee uuids to include on the payroll. + :param check_date: Payment date. + :param withholding_pay_period: The payment schedule tax rate the payroll is based on. + :param skip_regular_deductions: Block regular deductions and contributions for this payroll. + :param fixed_withholding_rate: Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostV1CompaniesCompanyIDPayrollsRequest( + x_gusto_api_version=x_gusto_api_version, + company_id=company_id, + request_body=models.PostV1CompaniesCompanyIDPayrollsRequestBody( + off_cycle=off_cycle, + off_cycle_reason=off_cycle_reason, + start_date=start_date, + end_date=end_date, + pay_schedule_uuid=pay_schedule_uuid, + employee_uuids=employee_uuids, + check_date=check_date, + withholding_pay_period=withholding_pay_period, + skip_regular_deductions=skip_regular_deductions, + fixed_withholding_rate=fixed_withholding_rate, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/companies/{company_id}/payrolls", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "json", + Optional[models.PostV1CompaniesCompanyIDPayrollsRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-v1-companies-company_id-payrolls", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PayrollPrepared, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def create_off_cycle_async( + self, + *, + company_id: str, + off_cycle: bool, + off_cycle_reason: models.OffCycleReason, + start_date: date, + end_date: date, + x_gusto_api_version: Optional[ + models.PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.PostV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + pay_schedule_uuid: Optional[str] = None, + employee_uuids: Optional[List[str]] = None, + check_date: Optional[date] = None, + withholding_pay_period: Optional[ + models.PostV1CompaniesCompanyIDPayrollsWithholdingPayPeriod + ] = None, + skip_regular_deductions: Optional[bool] = None, + fixed_withholding_rate: Optional[bool] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PayrollPrepared: + r"""Create an off-cycle payroll + + Creates a new, unprocessed, off-cycle payroll. + + ## `off_cycle_reason` + By default: + - External benefits and deductions will be included when the `off_cycle_reason` is set to `Correction`. + - All benefits and deductions are blocked when the `off_cycle_reason` is set to `Bonus`. + + These elections can be overridden with the `skip_regular_deductions` boolean. + + scope: `payrolls:run` + + + :param company_id: The UUID of the company + :param off_cycle: Whether it is an off cycle payroll. + :param off_cycle_reason: An off cycle payroll reason. Select one from the following list. + :param start_date: Pay period start date. + :param end_date: Pay period end date. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param pay_schedule_uuid: A pay schedule is required for transition from old pay schedule payroll to identify the matching transition pay period. + :param employee_uuids: A list of employee uuids to include on the payroll. + :param check_date: Payment date. + :param withholding_pay_period: The payment schedule tax rate the payroll is based on. + :param skip_regular_deductions: Block regular deductions and contributions for this payroll. + :param fixed_withholding_rate: Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostV1CompaniesCompanyIDPayrollsRequest( + x_gusto_api_version=x_gusto_api_version, + company_id=company_id, + request_body=models.PostV1CompaniesCompanyIDPayrollsRequestBody( + off_cycle=off_cycle, + off_cycle_reason=off_cycle_reason, + start_date=start_date, + end_date=end_date, + pay_schedule_uuid=pay_schedule_uuid, + employee_uuids=employee_uuids, + check_date=check_date, + withholding_pay_period=withholding_pay_period, + skip_regular_deductions=skip_regular_deductions, + fixed_withholding_rate=fixed_withholding_rate, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/companies/{company_id}/payrolls", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + True, + "json", + Optional[models.PostV1CompaniesCompanyIDPayrollsRequestBody], + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-v1-companies-company_id-payrolls", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PayrollPrepared, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_approved_reversals( + self, + *, + company_id: str, + page: Optional[int] = None, + per: Optional[int] = None, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PayrollReversal: + r"""Get approved payroll reversals - These elections can be overridden with the `skip_regular_deductions` boolean. + Returns all approved Payroll Reversals for a Company. - scope: `payrolls:run` + scope: `payrolls:read` :param company_id: The UUID of the company - :param off_cycle: Whether it is an off cycle payroll. - :param off_cycle_reason: An off cycle payroll reason. Select one from the following list. - :param start_date: Pay period start date. - :param end_date: Pay period end date. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param pay_schedule_uuid: A pay schedule is required for transition from old pay schedule payroll to identify the matching transition pay period. - :param employee_uuids: A list of employee uuids to include on the payroll. - :param check_date: Payment date. - :param withholding_pay_period: The payment schedule tax rate the payroll is based on. - :param skip_regular_deductions: Block regular deductions and contributions for this payroll. - :param fixed_withholding_rate: Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -71,43 +611,26 @@ def create_off_cycle( else: base_url = self._get_url(base_url, url_variables) - request = models.PostV1CompaniesCompanyIDPayrollsRequest( + request = models.GetV1CompaniesCompanyIDPayrollReversalsRequest( company_id=company_id, + page=page, + per=per, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1CompaniesCompanyIDPayrollsRequestBody( - off_cycle=off_cycle, - off_cycle_reason=off_cycle_reason, - start_date=start_date, - end_date=end_date, - pay_schedule_uuid=pay_schedule_uuid, - employee_uuids=employee_uuids, - check_date=check_date, - withholding_pay_period=withholding_pay_period, - skip_regular_deductions=skip_regular_deductions, - fixed_withholding_rate=fixed_withholding_rate, - ), ) req = self._build_request( - method="POST", - path="/v1/companies/{company_id}/payrolls", + method="GET", + path="/v1/companies/{company_id}/payroll_reversals", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PostV1CompaniesCompanyIDPayrollsRequestBody, - ), timeout_ms=timeout_ms, ) @@ -121,93 +644,54 @@ def create_off_cycle( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-v1-companies-company_id-payrolls", - oauth2_scopes=[], + operation_id="get-v1-companies-company_id-payroll_reversals", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) - response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollPrepared) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData - ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + return unmarshal_json_response(models.PayrollReversal, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def create_off_cycle_async( + async def get_approved_reversals_async( self, *, company_id: str, - off_cycle: bool, - off_cycle_reason: models.OffCycleReason, - start_date: str, - end_date: str, + page: Optional[int] = None, + per: Optional[int] = None, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - pay_schedule_uuid: Optional[str] = None, - employee_uuids: Optional[List[str]] = None, - check_date: Optional[str] = None, - withholding_pay_period: Optional[models.WithholdingPayPeriod] = None, - skip_regular_deductions: Optional[bool] = None, - fixed_withholding_rate: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PayrollPrepared: - r"""Create an off-cycle payroll - - Creates a new, unprocessed, off-cycle payroll. - - ## `off_cycle_reason` - By default: - - External benefits and deductions will be included when the `off_cycle_reason` is set to `Correction`. - - All benefits and deductions are blocked when the `off_cycle_reason` is set to `Bonus`. + ) -> models.PayrollReversal: + r"""Get approved payroll reversals - These elections can be overridden with the `skip_regular_deductions` boolean. + Returns all approved Payroll Reversals for a Company. - scope: `payrolls:run` + scope: `payrolls:read` :param company_id: The UUID of the company - :param off_cycle: Whether it is an off cycle payroll. - :param off_cycle_reason: An off cycle payroll reason. Select one from the following list. - :param start_date: Pay period start date. - :param end_date: Pay period end date. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param pay_schedule_uuid: A pay schedule is required for transition from old pay schedule payroll to identify the matching transition pay period. - :param employee_uuids: A list of employee uuids to include on the payroll. - :param check_date: Payment date. - :param withholding_pay_period: The payment schedule tax rate the payroll is based on. - :param skip_regular_deductions: Block regular deductions and contributions for this payroll. - :param fixed_withholding_rate: Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -223,43 +707,26 @@ async def create_off_cycle_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PostV1CompaniesCompanyIDPayrollsRequest( + request = models.GetV1CompaniesCompanyIDPayrollReversalsRequest( company_id=company_id, + page=page, + per=per, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1CompaniesCompanyIDPayrollsRequestBody( - off_cycle=off_cycle, - off_cycle_reason=off_cycle_reason, - start_date=start_date, - end_date=end_date, - pay_schedule_uuid=pay_schedule_uuid, - employee_uuids=employee_uuids, - check_date=check_date, - withholding_pay_period=withholding_pay_period, - skip_regular_deductions=skip_regular_deductions, - fixed_withholding_rate=fixed_withholding_rate, - ), ) req = self._build_request_async( - method="POST", - path="/v1/companies/{company_id}/payrolls", + method="GET", + path="/v1/companies/{company_id}/payroll_reversals", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PostV1CompaniesCompanyIDPayrollsRequestBody, - ), timeout_ms=timeout_ms, ) @@ -273,90 +740,70 @@ async def create_off_cycle_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-v1-companies-company_id-payrolls", - oauth2_scopes=[], + operation_id="get-v1-companies-company_id-payroll_reversals", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) - response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollPrepared) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData - ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + return unmarshal_json_response(models.PayrollReversal, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def list( + def get( self, *, company_id: str, - processing_statuses: Optional[List[models.ProcessingStatuses]] = None, - payroll_types: Optional[List[models.PayrollTypes]] = None, + payroll_id: str, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, include: Optional[ - List[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude] + List[models.GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude] ] = None, - start_date: Optional[str] = None, - end_date: Optional[str] = None, - sort_order: Optional[models.SortOrder] = None, page: Optional[int] = None, per: Optional[int] = None, - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + sort_by: Optional[models.SortBy] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.PayrollMinimal]: - r"""Get all payrolls for a company - - Returns a list of payrolls for a company. You can change the payrolls returned by updating the processing_status, payroll_types, start_date, & end_date params. + ) -> models.PayrollShow: + r"""Get a single payroll - By default, will return processed, regular payrolls for the past 6 months. + Returns a payroll. If payroll is calculated or processed, will return employee_compensations and totals. Notes: - * Dollar amounts are returned as string representations of numeric decimals, are represented to the cent. - * end_date can be at most 3 months in the future and start_date and end_date can't be more than 1 year apart. + * Hour and dollar amounts are returned as string representations of numeric decimals. + * Hours are represented to the thousands place; dollar amounts are represented to the cent. + * Every eligible compensation is returned for each employee. If no data has yet be inserted for a given field, it defaults to “0.00” (for fixed amounts) or “0.000” (for hours ). + * When include parameter with benefits value is passed, employee_benefits:read scope is required to return benefits + * Benefits containing PHI are only visible with the `employee_benefits:read:phi` scope scope: `payrolls:read` + :param company_id: The UUID of the company - :param processing_statuses: Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` - :param payroll_types: Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` - :param include: Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta` - :param start_date: Return payrolls whose pay period is after the start date - :param end_date: Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. - :param sort_order: A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. + :param payroll_id: The UUID of the payroll + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 - :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param sort_by: Field to sort employee compensations by :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -372,22 +819,19 @@ def list( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesCompanyIDPayrollsRequest( + request = models.GetV1CompaniesCompanyIDPayrollsPayrollIDRequest( company_id=company_id, - processing_statuses=processing_statuses, - payroll_types=payroll_types, + payroll_id=payroll_id, + x_gusto_api_version=x_gusto_api_version, include=include, - start_date=start_date, - end_date=end_date, - sort_order=sort_order, page=page, per=per, - x_gusto_api_version=x_gusto_api_version, + sort_by=sort_by, ) req = self._build_request( method="GET", - path="/v1/companies/{company_id}/payrolls", + path="/v1/companies/{company_id}/payrolls/{payroll_id}", base_url=base_url, url_variables=url_variables, request=request, @@ -411,9 +855,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-company_id-payrolls", - oauth2_scopes=[], + operation_id="get-v1-companies-company_id-payrolls-payroll_id", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -423,72 +868,63 @@ def list( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayrollMinimal]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.PayrollShow, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def list_async( + async def get_async( self, *, company_id: str, - processing_statuses: Optional[List[models.ProcessingStatuses]] = None, - payroll_types: Optional[List[models.PayrollTypes]] = None, + payroll_id: str, + x_gusto_api_version: Optional[ + models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDPayrollsPayrollIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, include: Optional[ - List[models.GetV1CompaniesCompanyIDPayrollsQueryParamInclude] + List[models.GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude] ] = None, - start_date: Optional[str] = None, - end_date: Optional[str] = None, - sort_order: Optional[models.SortOrder] = None, page: Optional[int] = None, per: Optional[int] = None, - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + sort_by: Optional[models.SortBy] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.PayrollMinimal]: - r"""Get all payrolls for a company - - Returns a list of payrolls for a company. You can change the payrolls returned by updating the processing_status, payroll_types, start_date, & end_date params. + ) -> models.PayrollShow: + r"""Get a single payroll - By default, will return processed, regular payrolls for the past 6 months. + Returns a payroll. If payroll is calculated or processed, will return employee_compensations and totals. Notes: - * Dollar amounts are returned as string representations of numeric decimals, are represented to the cent. - * end_date can be at most 3 months in the future and start_date and end_date can't be more than 1 year apart. + * Hour and dollar amounts are returned as string representations of numeric decimals. + * Hours are represented to the thousands place; dollar amounts are represented to the cent. + * Every eligible compensation is returned for each employee. If no data has yet be inserted for a given field, it defaults to “0.00” (for fixed amounts) or “0.000” (for hours ). + * When include parameter with benefits value is passed, employee_benefits:read scope is required to return benefits + * Benefits containing PHI are only visible with the `employee_benefits:read:phi` scope scope: `payrolls:read` + :param company_id: The UUID of the company - :param processing_statuses: Whether to include processed and/or unprocessed payrolls in the response, defaults to processed, for multiple attributes comma separate the values, i.e. `?processing_statuses=processed,unprocessed` - :param payroll_types: Whether to include regular and/or off_cycle payrolls in the response, defaults to regular, for multiple attributes comma separate the values, i.e. `?payroll_types=regular,off_cycle` - :param include: Include the requested attribute in the response. The risk_blockers option will include submission_blockers and credit_blockers if applicable. The reversals option will include reversal payroll UUIDs if applicable. In v2023-04-01 totals are no longer included by default. For multiple attributes comma separate the values, i.e. `?include=totals,payroll_status_meta` - :param start_date: Return payrolls whose pay period is after the start date - :param end_date: Return payrolls whose pay period is before the end date. If left empty, defaults to today's date. - :param sort_order: A string indicating whether to sort resulting events in ascending (asc) or descending (desc) chronological order. Events are sorted by their `timestamp`. Defaults to asc if left empty. + :param payroll_id: The UUID of the payroll + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. :param per: Number of objects per page. For majority of endpoints will default to 25 - :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param sort_by: Field to sort employee compensations by :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -504,22 +940,19 @@ async def list_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesCompanyIDPayrollsRequest( + request = models.GetV1CompaniesCompanyIDPayrollsPayrollIDRequest( company_id=company_id, - processing_statuses=processing_statuses, - payroll_types=payroll_types, + payroll_id=payroll_id, + x_gusto_api_version=x_gusto_api_version, include=include, - start_date=start_date, - end_date=end_date, - sort_order=sort_order, page=page, per=per, - x_gusto_api_version=x_gusto_api_version, + sort_by=sort_by, ) req = self._build_request_async( method="GET", - path="/v1/companies/{company_id}/payrolls", + path="/v1/companies/{company_id}/payrolls/{payroll_id}", base_url=base_url, url_variables=url_variables, request=request, @@ -543,9 +976,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-company_id-payrolls", - oauth2_scopes=[], + operation_id="get-v1-companies-company_id-payrolls-payroll_id", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -555,52 +989,60 @@ async def list_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayrollMinimal]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.PayrollShow, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def get_approved_reversals( + def update( self, *, company_id: str, - page: Optional[int] = None, - per: Optional[int] = None, + payroll_id: str, + employee_compensations: Union[ + List[models.PayrollUpdateEmployeeCompensations], + List[models.PayrollUpdateEmployeeCompensationsTypedDict], + ], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + withholding_pay_period: Optional[models.WithholdingPayPeriod] = None, + skip_regular_deductions: Optional[bool] = None, + fixed_withholding_rate: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PayrollReversal: - r"""Get approved payroll reversals + ) -> models.PayrollPrepared: + r"""Update a payroll by ID - Returns all approved Payroll Reversals for a Company. + This endpoint allows you to update information for one or more employees for a specific **unprocessed** payroll. You can think of the **unprocessed** + payroll object as a template of fields that you can update. You cannot modify the structure of the payroll object through this endpoint, only values + of the fields included in the payroll. If you do not include specific employee compensations or fixed/hourly compensations in your request body, they + will not be removed from the payroll. + + scope: `payrolls:write` - scope: `payrolls:read` :param company_id: The UUID of the company - :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. - :param per: Number of objects per page. For majority of endpoints will default to 25 + :param payroll_id: The UUID of the payroll + :param employee_compensations: :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param withholding_pay_period: The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. + :param skip_regular_deductions: Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls. + :param fixed_withholding_rate: Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -616,26 +1058,37 @@ def get_approved_reversals( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesCompanyIDPayrollReversalsRequest( - company_id=company_id, - page=page, - per=per, + request = models.PutV1CompaniesCompanyIDPayrollsRequest( x_gusto_api_version=x_gusto_api_version, + company_id=company_id, + payroll_id=payroll_id, + payroll_update=models.PayrollUpdate( + employee_compensations=utils.get_pydantic_model( + employee_compensations, + List[models.PayrollUpdateEmployeeCompensations], + ), + withholding_pay_period=withholding_pay_period, + skip_regular_deductions=skip_regular_deductions, + fixed_withholding_rate=fixed_withholding_rate, + ), ) req = self._build_request( - method="GET", - path="/v1/companies/{company_id}/payroll_reversals", + method="PUT", + path="/v1/companies/{company_id}/payrolls/{payroll_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.payroll_update, False, False, "json", models.PayrollUpdate + ), timeout_ms=timeout_ms, ) @@ -649,64 +1102,73 @@ def get_approved_reversals( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-company_id-payroll_reversals", - oauth2_scopes=[], + operation_id="put-v1-companies-company_id-payrolls", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollReversal) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.PayrollPrepared, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def get_approved_reversals_async( + async def update_async( self, *, company_id: str, - page: Optional[int] = None, - per: Optional[int] = None, + payroll_id: str, + employee_compensations: Union[ + List[models.PayrollUpdateEmployeeCompensations], + List[models.PayrollUpdateEmployeeCompensationsTypedDict], + ], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.PutV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + withholding_pay_period: Optional[models.WithholdingPayPeriod] = None, + skip_regular_deductions: Optional[bool] = None, + fixed_withholding_rate: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PayrollReversal: - r"""Get approved payroll reversals + ) -> models.PayrollPrepared: + r"""Update a payroll by ID - Returns all approved Payroll Reversals for a Company. + This endpoint allows you to update information for one or more employees for a specific **unprocessed** payroll. You can think of the **unprocessed** + payroll object as a template of fields that you can update. You cannot modify the structure of the payroll object through this endpoint, only values + of the fields included in the payroll. If you do not include specific employee compensations or fixed/hourly compensations in your request body, they + will not be removed from the payroll. + + scope: `payrolls:write` - scope: `payrolls:read` :param company_id: The UUID of the company - :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. - :param per: Number of objects per page. For majority of endpoints will default to 25 + :param payroll_id: The UUID of the payroll + :param employee_compensations: :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param withholding_pay_period: The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. + :param skip_regular_deductions: Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls. + :param fixed_withholding_rate: Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -722,26 +1184,37 @@ async def get_approved_reversals_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesCompanyIDPayrollReversalsRequest( - company_id=company_id, - page=page, - per=per, + request = models.PutV1CompaniesCompanyIDPayrollsRequest( x_gusto_api_version=x_gusto_api_version, + company_id=company_id, + payroll_id=payroll_id, + payroll_update=models.PayrollUpdate( + employee_compensations=utils.get_pydantic_model( + employee_compensations, + List[models.PayrollUpdateEmployeeCompensations], + ), + withholding_pay_period=withholding_pay_period, + skip_regular_deductions=skip_regular_deductions, + fixed_withholding_rate=fixed_withholding_rate, + ), ) req = self._build_request_async( - method="GET", - path="/v1/companies/{company_id}/payroll_reversals", + method="PUT", + path="/v1/companies/{company_id}/payrolls/{payroll_id}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.payroll_update, False, False, "json", models.PayrollUpdate + ), timeout_ms=timeout_ms, ) @@ -755,72 +1228,62 @@ async def get_approved_reversals_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-company_id-payroll_reversals", - oauth2_scopes=[], + operation_id="put-v1-companies-company_id-payrolls", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollReversal) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(models.PayrollPrepared, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def get( + def delete( self, *, company_id: str, payroll_id: str, - include: Optional[ - List[models.GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude] - ] = None, + async_: Optional[bool] = None, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Payroll: - r"""Get a single payroll + ): + r"""Delete a payroll - Returns a payroll. If payroll is calculated or processed, will return employee_compensations and totals. + This endpoint allows you to delete an **unprocessed** payroll. - Notes: - * Hour and dollar amounts are returned as string representations of numeric decimals. - * Hours are represented to the thousands place; dollar amounts are represented to the cent. - * Every eligible compensation is returned for each employee. If no data has yet be inserted for a given field, it defaults to “0.00” (for fixed amounts) or “0.000” (for hours ). - * When include parameter with benefits value is passed, employee_benefits:read scope is required to return benefits - * Benefits containing PHI are only visible with the `employee_benefits:read:phi` scope + By default the payroll and associated data is deleted synchronously. To request an asynchronous delete, use the `async=true` query parameter. In both cases validation of ability to delete will be performed and an Unprocessable Entity error will be returned if the payroll is not able to be deleted. A successful synchronous delete will return `204/No Content`. When a payroll has been enqueued for asynchronous deletion, `202/Accepted` will be returned. + + scope: `payrolls:run` - scope: `payrolls:read` :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll - :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` + :param async_: When true, request an asynchronous delete of the payroll. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -837,15 +1300,15 @@ def get( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesCompanyIDPayrollsPayrollIDRequest( + request = models.DeleteV1CompaniesCompanyIDPayrollsRequest( company_id=company_id, payroll_id=payroll_id, - include=include, + async_=async_, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request( - method="GET", + method="DELETE", path="/v1/companies/{company_id}/payrolls/{payroll_id}", base_url=base_url, url_variables=url_variables, @@ -870,9 +1333,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-company_id-payrolls-payroll_id", - oauth2_scopes=[], + operation_id="delete-v1-companies-company_id-payrolls", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -882,60 +1346,49 @@ def get( retry_config=retry_config, ) - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Payroll) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + response_data: Any = None + if utils.match_response(http_res, ["202", "204"], "*"): + return + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def get_async( + async def delete_async( self, *, company_id: str, payroll_id: str, - include: Optional[ - List[models.GetV1CompaniesCompanyIDPayrollsPayrollIDQueryParamInclude] - ] = None, + async_: Optional[bool] = None, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion + ] = models.DeleteV1CompaniesCompanyIDPayrollsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Payroll: - r"""Get a single payroll + ): + r"""Delete a payroll - Returns a payroll. If payroll is calculated or processed, will return employee_compensations and totals. + This endpoint allows you to delete an **unprocessed** payroll. - Notes: - * Hour and dollar amounts are returned as string representations of numeric decimals. - * Hours are represented to the thousands place; dollar amounts are represented to the cent. - * Every eligible compensation is returned for each employee. If no data has yet be inserted for a given field, it defaults to “0.00” (for fixed amounts) or “0.000” (for hours ). - * When include parameter with benefits value is passed, employee_benefits:read scope is required to return benefits - * Benefits containing PHI are only visible with the `employee_benefits:read:phi` scope + By default the payroll and associated data is deleted synchronously. To request an asynchronous delete, use the `async=true` query parameter. In both cases validation of ability to delete will be performed and an Unprocessable Entity error will be returned if the payroll is not able to be deleted. A successful synchronous delete will return `204/No Content`. When a payroll has been enqueued for asynchronous deletion, `202/Accepted` will be returned. + + scope: `payrolls:run` - scope: `payrolls:read` :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll - :param include: Include the requested attribute in the response, for multiple attributes comma separate the values, i.e. `?include=benefits,deductions,taxes` + :param async_: When true, request an asynchronous delete of the payroll. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -952,15 +1405,15 @@ async def get_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesCompanyIDPayrollsPayrollIDRequest( + request = models.DeleteV1CompaniesCompanyIDPayrollsRequest( company_id=company_id, payroll_id=payroll_id, - include=include, + async_=async_, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request_async( - method="GET", + method="DELETE", path="/v1/companies/{company_id}/payrolls/{payroll_id}", base_url=base_url, url_variables=url_variables, @@ -985,9 +1438,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-company_id-payrolls-payroll_id", - oauth2_scopes=[], + operation_id="delete-v1-companies-company_id-payrolls", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -997,66 +1451,57 @@ async def get_async( retry_config=retry_config, ) - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Payroll) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + response_data: Any = None + if utils.match_response(http_res, ["202", "204"], "*"): + return + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def update( + def prepare( self, *, company_id: str, payroll_id: str, - employee_compensations: Union[ - List[models.PutV1CompaniesCompanyIDPayrollsEmployeeCompensations], - List[models.PutV1CompaniesCompanyIDPayrollsEmployeeCompensationsTypedDict], - ], + page: Optional[int] = None, + per: Optional[int] = None, + sort_by: Optional[models.PayrollPrepareSortBy] = None, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - withholding_pay_period: Optional[ - models.PutV1CompaniesCompanyIDPayrollsWithholdingPayPeriod - ] = None, - skip_regular_deductions: Optional[bool] = None, - fixed_withholding_rate: Optional[bool] = None, + employee_uuids: Optional[List[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.PayrollPrepared: - r"""Update a payroll by ID + r"""Prepare a payroll for update - This endpoint allows you to update information for one or more employees for a specific **unprocessed** payroll. You can think of the **unprocessed** - payroll object as a template of fields that you can update. You cannot modify the structure of the payroll object through this endpoint, only values - of the fields included in the payroll. If you do not include specific employee compensations or fixed/hourly compensations in your request body, they - will not be removed from the payroll. + This endpoint will build the payroll and get it ready for making updates. This includes adding/removing eligible employees from the Payroll and updating the check_date, payroll_deadline, and payroll_status_meta dates & times. + + Notes: + * Will null out calculated_at & totals if a payroll has already been calculated. + * Will return the version param used for updating the payroll scope: `payrolls:write` :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll - :param employee_compensations: + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param sort_by: Sort employee compenstations by name. Options: first_name, last_name :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param withholding_pay_period: The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. - :param skip_regular_deductions: Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls. - :param fixed_withholding_rate: Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls. + :param employee_uuids: An array of employee UUIDs. If passed, only those employees payroll items will be prepared. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1072,28 +1517,25 @@ def update( else: base_url = self._get_url(base_url, url_variables) - request = models.PutV1CompaniesCompanyIDPayrollsRequest( + request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest( company_id=company_id, payroll_id=payroll_id, + page=page, + per=per, + sort_by=sort_by, x_gusto_api_version=x_gusto_api_version, - request_body=models.PutV1CompaniesCompanyIDPayrollsRequestBody( - employee_compensations=utils.get_pydantic_model( - employee_compensations, - List[models.PutV1CompaniesCompanyIDPayrollsEmployeeCompensations], - ), - withholding_pay_period=withholding_pay_period, - skip_regular_deductions=skip_regular_deductions, - fixed_withholding_rate=fixed_withholding_rate, + request_body=models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody( + employee_uuids=employee_uuids, ), ) req = self._build_request( method="PUT", - path="/v1/companies/{company_id}/payrolls/{payroll_id}", + path="/v1/companies/{company_id}/payrolls/{payroll_id}/prepare", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", @@ -1103,9 +1545,11 @@ def update( get_serialized_body=lambda: utils.serialize_request_body( request.request_body, False, - False, + True, "json", - models.PutV1CompaniesCompanyIDPayrollsRequestBody, + Optional[ + models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody + ], ), timeout_ms=timeout_ms, ) @@ -1120,84 +1564,64 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-v1-companies-company_id-payrolls", - oauth2_scopes=[], + operation_id="put-v1-companies-company_id-payrolls-payroll_id-prepare", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) - response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollPrepared) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData - ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + return unmarshal_json_response(models.PayrollPrepared, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def update_async( + async def prepare_async( self, *, company_id: str, payroll_id: str, - employee_compensations: Union[ - List[models.PutV1CompaniesCompanyIDPayrollsEmployeeCompensations], - List[models.PutV1CompaniesCompanyIDPayrollsEmployeeCompensationsTypedDict], - ], + page: Optional[int] = None, + per: Optional[int] = None, + sort_by: Optional[models.PayrollPrepareSortBy] = None, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - withholding_pay_period: Optional[ - models.PutV1CompaniesCompanyIDPayrollsWithholdingPayPeriod - ] = None, - skip_regular_deductions: Optional[bool] = None, - fixed_withholding_rate: Optional[bool] = None, + employee_uuids: Optional[List[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.PayrollPrepared: - r"""Update a payroll by ID + r"""Prepare a payroll for update - This endpoint allows you to update information for one or more employees for a specific **unprocessed** payroll. You can think of the **unprocessed** - payroll object as a template of fields that you can update. You cannot modify the structure of the payroll object through this endpoint, only values - of the fields included in the payroll. If you do not include specific employee compensations or fixed/hourly compensations in your request body, they - will not be removed from the payroll. + This endpoint will build the payroll and get it ready for making updates. This includes adding/removing eligible employees from the Payroll and updating the check_date, payroll_deadline, and payroll_status_meta dates & times. + + Notes: + * Will null out calculated_at & totals if a payroll has already been calculated. + * Will return the version param used for updating the payroll scope: `payrolls:write` :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll - :param employee_compensations: + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param sort_by: Sort employee compenstations by name. Options: first_name, last_name :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param withholding_pay_period: The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls. - :param skip_regular_deductions: Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls. - :param fixed_withholding_rate: Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls. + :param employee_uuids: An array of employee UUIDs. If passed, only those employees payroll items will be prepared. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1213,28 +1637,25 @@ async def update_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PutV1CompaniesCompanyIDPayrollsRequest( + request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest( company_id=company_id, payroll_id=payroll_id, + page=page, + per=per, + sort_by=sort_by, x_gusto_api_version=x_gusto_api_version, - request_body=models.PutV1CompaniesCompanyIDPayrollsRequestBody( - employee_compensations=utils.get_pydantic_model( - employee_compensations, - List[models.PutV1CompaniesCompanyIDPayrollsEmployeeCompensations], - ), - withholding_pay_period=withholding_pay_period, - skip_regular_deductions=skip_regular_deductions, - fixed_withholding_rate=fixed_withholding_rate, + request_body=models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody( + employee_uuids=employee_uuids, ), ) req = self._build_request_async( method="PUT", - path="/v1/companies/{company_id}/payrolls/{payroll_id}", + path="/v1/companies/{company_id}/payrolls/{payroll_id}/prepare", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", @@ -1244,9 +1665,11 @@ async def update_async( get_serialized_body=lambda: utils.serialize_request_body( request.request_body, False, - False, + True, "json", - models.PutV1CompaniesCompanyIDPayrollsRequestBody, + Optional[ + models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequestBody + ], ), timeout_ms=timeout_ms, ) @@ -1261,71 +1684,55 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-v1-companies-company_id-payrolls", - oauth2_scopes=[], + operation_id="put-v1-companies-company_id-payrolls-payroll_id-prepare", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) - response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollPrepared) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData - ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + return unmarshal_json_response(models.PayrollPrepared, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def delete( + def get_receipt( self, *, - company_id: str, - payroll_id: str, - async_: Optional[bool] = None, + payroll_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion + ] = models.GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Delete a payroll + ) -> models.PayrollReceipt: + r"""Get a single payroll receipt - This endpoint allows you to delete an **unprocessed** payroll. + Returns a payroll receipt. - By default the payroll and associated data is deleted synchronously. To request an asynchronous delete, use the `async=true` query parameter. In both cases validation of ability to delete will be performed and an Unprocessable Entity error will be returned if the payroll is not able to be deleted. A successful synchronous delete will return `204/No Content`. When a payroll has been enqueued for asynchronous deletion, `202/Accepted` will be returned. + Notes: + * Hour and dollar amounts are returned as string representations of numeric decimals. + * Dollar amounts are represented to the cent. + * If no data has yet be inserted for a given field, it defaults to “0.00” (for fixed amounts). - scope: `payrolls:run` + scope: `payrolls:read` - :param company_id: The UUID of the company - :param payroll_id: The UUID of the payroll - :param async_: When true, request an asynchronous delete of the payroll. + + :param payroll_uuid: The UUID of the payroll :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1342,16 +1749,14 @@ def delete( else: base_url = self._get_url(base_url, url_variables) - request = models.DeleteV1CompaniesCompanyIDPayrollsRequest( - company_id=company_id, - payroll_id=payroll_id, - async_=async_, + request = models.GetV1PaymentReceiptsPayrollsPayrollUUIDRequest( + payroll_uuid=payroll_uuid, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request( - method="DELETE", - path="/v1/companies/{company_id}/payrolls/{payroll_id}", + method="GET", + path="/v1/payrolls/{payroll_uuid}/receipt", base_url=base_url, url_variables=url_variables, request=request, @@ -1359,7 +1764,7 @@ def delete( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="*/*", + accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, @@ -1375,65 +1780,61 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="delete-v1-companies-company_id-payrolls", - oauth2_scopes=[], + operation_id="get-v1-payment-receipts-payrolls-payroll_uuid", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) - if utils.match_response(http_res, ["202", "204"], "*"): - return - if utils.match_response(http_res, ["404", "422", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PayrollReceipt, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def delete_async( + async def get_receipt_async( self, *, - company_id: str, - payroll_id: str, - async_: Optional[bool] = None, + payroll_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion + ] = models.GetV1PaymentReceiptsPayrollsPayrollUUIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Delete a payroll + ) -> models.PayrollReceipt: + r"""Get a single payroll receipt - This endpoint allows you to delete an **unprocessed** payroll. + Returns a payroll receipt. - By default the payroll and associated data is deleted synchronously. To request an asynchronous delete, use the `async=true` query parameter. In both cases validation of ability to delete will be performed and an Unprocessable Entity error will be returned if the payroll is not able to be deleted. A successful synchronous delete will return `204/No Content`. When a payroll has been enqueued for asynchronous deletion, `202/Accepted` will be returned. + Notes: + * Hour and dollar amounts are returned as string representations of numeric decimals. + * Dollar amounts are represented to the cent. + * If no data has yet be inserted for a given field, it defaults to “0.00” (for fixed amounts). - scope: `payrolls:run` + scope: `payrolls:read` - :param company_id: The UUID of the company - :param payroll_id: The UUID of the payroll - :param async_: When true, request an asynchronous delete of the payroll. + + :param payroll_uuid: The UUID of the payroll :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1450,16 +1851,14 @@ async def delete_async( else: base_url = self._get_url(base_url, url_variables) - request = models.DeleteV1CompaniesCompanyIDPayrollsRequest( - company_id=company_id, - payroll_id=payroll_id, - async_=async_, + request = models.GetV1PaymentReceiptsPayrollsPayrollUUIDRequest( + payroll_uuid=payroll_uuid, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request_async( - method="DELETE", - path="/v1/companies/{company_id}/payrolls/{payroll_id}", + method="GET", + path="/v1/payrolls/{payroll_uuid}/receipt", base_url=base_url, url_variables=url_variables, request=request, @@ -1467,7 +1866,7 @@ async def delete_async( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="*/*", + accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, @@ -1483,45 +1882,40 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="delete-v1-companies-company_id-payrolls", - oauth2_scopes=[], + operation_id="get-v1-payment-receipts-payrolls-payroll_uuid", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) - if utils.match_response(http_res, ["202", "204"], "*"): - return - if utils.match_response(http_res, ["404", "422", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PayrollReceipt, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def prepare( + def get_blockers( self, *, - company_id: str, - payroll_id: str, + company_uuid: str, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -1529,19 +1923,16 @@ def prepare( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PayrollPrepared: - r"""Prepare a payroll for update + ) -> List[models.PayrollBlocker]: + r"""Get all payroll blockers for a company - This endpoint will build the payroll and get it ready for making updates. This includes adding/removing eligible employees from the Payroll and updating the check_date, payroll_deadline, and payroll_status_meta dates & times. + Returns a list of reasons that prevent the company from running payrolls. See the [payroll blockers guide](https://docs.gusto.com/embedded-payroll/docs/payroll-blockers) for a complete list of reasons. - Notes: - * Will null out calculated_at & totals if a payroll has already been calculated. - * Will return the version param used for updating the payroll + The list is empty if there are no payroll blockers. - scope: `payrolls:write` + scope: `payrolls:run` - :param company_id: The UUID of the company - :param payroll_id: The UUID of the payroll + :param company_uuid: The UUID of the company :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1558,15 +1949,14 @@ def prepare( else: base_url = self._get_url(base_url, url_variables) - request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest( - company_id=company_id, - payroll_id=payroll_id, + request = models.GetV1CompaniesPayrollBlockersCompanyUUIDRequest( + company_uuid=company_uuid, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request( - method="PUT", - path="/v1/companies/{company_id}/payrolls/{payroll_id}/prepare", + method="GET", + path="/v1/companies/{company_uuid}/payrolls/blockers", base_url=base_url, url_variables=url_variables, request=request, @@ -1590,9 +1980,10 @@ def prepare( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-v1-companies-company_id-payrolls-payroll_id-prepare", - oauth2_scopes=[], + operation_id="get-v1-companies-payroll-blockers-company_uuid", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1603,32 +1994,20 @@ def prepare( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollPrepared) + return unmarshal_json_response(List[models.PayrollBlocker], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def prepare_async( + async def get_blockers_async( self, *, - company_id: str, - payroll_id: str, + company_uuid: str, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -1636,19 +2015,16 @@ async def prepare_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PayrollPrepared: - r"""Prepare a payroll for update + ) -> List[models.PayrollBlocker]: + r"""Get all payroll blockers for a company - This endpoint will build the payroll and get it ready for making updates. This includes adding/removing eligible employees from the Payroll and updating the check_date, payroll_deadline, and payroll_status_meta dates & times. + Returns a list of reasons that prevent the company from running payrolls. See the [payroll blockers guide](https://docs.gusto.com/embedded-payroll/docs/payroll-blockers) for a complete list of reasons. - Notes: - * Will null out calculated_at & totals if a payroll has already been calculated. - * Will return the version param used for updating the payroll + The list is empty if there are no payroll blockers. - scope: `payrolls:write` + scope: `payrolls:run` - :param company_id: The UUID of the company - :param payroll_id: The UUID of the payroll + :param company_uuid: The UUID of the company :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1665,15 +2041,14 @@ async def prepare_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDPrepareRequest( - company_id=company_id, - payroll_id=payroll_id, + request = models.GetV1CompaniesPayrollBlockersCompanyUUIDRequest( + company_uuid=company_uuid, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request_async( - method="PUT", - path="/v1/companies/{company_id}/payrolls/{payroll_id}/prepare", + method="GET", + path="/v1/companies/{company_uuid}/payrolls/blockers", base_url=base_url, url_variables=url_variables, request=request, @@ -1697,9 +2072,10 @@ async def prepare_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-v1-companies-company_id-payrolls-payroll_id-prepare", - oauth2_scopes=[], + operation_id="get-v1-companies-payroll-blockers-company_uuid", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1710,52 +2086,48 @@ async def prepare_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollPrepared) + return unmarshal_json_response(List[models.PayrollBlocker], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def get_receipt( + def skip( self, *, - payroll_uuid: str, + company_uuid: str, + payroll_type: models.PostCompaniesPayrollSkipCompanyUUIDPayrollType, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + pay_schedule_uuid: Optional[str] = None, + employee_uuids: Optional[List[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PayrollReceipt: - r"""Get a single payroll receipt + ): + r"""Skip a payroll - Returns a payroll receipt. + Submits a $0 payroll for employees associated with the pay schedule to skip payroll. This submission is asynchronous and a successful request responds with a 202 HTTP status. Upon success, the payroll is transitioned to the `processed` state. - Notes: - * Hour and dollar amounts are returned as string representations of numeric decimals. - * Dollar amounts are represented to the cent. - * If no data has yet be inserted for a given field, it defaults to “0.00” (for fixed amounts). + If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. - scope: `payrolls:read` + scope: `payrolls:run` - :param payroll_uuid: The UUID of the payroll + :param company_uuid: The UUID of the company + :param payroll_type: Payroll type :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param start_date: Pay period start date + :param end_date: Pay period end date. If left empty, defaults to today's date. + :param pay_schedule_uuid: The UUID of the pay schedule + :param employee_uuids: An array of employees. This field is only applicable to new hire payroll and termination payroll :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1771,24 +2143,38 @@ def get_receipt( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1PaymentReceiptsPayrollsPayrollUUIDRequest( - payroll_uuid=payroll_uuid, + request = models.PostCompaniesPayrollSkipCompanyUUIDRequest( + company_uuid=company_uuid, x_gusto_api_version=x_gusto_api_version, + request_body=models.PostCompaniesPayrollSkipCompanyUUIDRequestBody( + payroll_type=payroll_type, + start_date=start_date, + end_date=end_date, + pay_schedule_uuid=pay_schedule_uuid, + employee_uuids=employee_uuids, + ), ) req = self._build_request( - method="GET", - path="/v1/payrolls/{payroll_uuid}/receipt", + method="POST", + path="/v1/companies/{company_uuid}/payrolls/skip", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostCompaniesPayrollSkipCompanyUUIDRequestBody, + ), timeout_ms=timeout_ms, ) @@ -1802,65 +2188,70 @@ def get_receipt( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-payment-receipts-payrolls-payroll_uuid", - oauth2_scopes=[], + operation_id="post-companies-payroll-skip-company_uuid", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollReceipt) + response_data: Any = None + if utils.match_response(http_res, "202", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion, http_res + ) + raise models.PostCompaniesPayrollSkipCompanyUUIDResponseBody( + response_data, http_res + ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def get_receipt_async( + async def skip_async( self, *, - payroll_uuid: str, + company_uuid: str, + payroll_type: models.PostCompaniesPayrollSkipCompanyUUIDPayrollType, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + pay_schedule_uuid: Optional[str] = None, + employee_uuids: Optional[List[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PayrollReceipt: - r"""Get a single payroll receipt + ): + r"""Skip a payroll - Returns a payroll receipt. + Submits a $0 payroll for employees associated with the pay schedule to skip payroll. This submission is asynchronous and a successful request responds with a 202 HTTP status. Upon success, the payroll is transitioned to the `processed` state. - Notes: - * Hour and dollar amounts are returned as string representations of numeric decimals. - * Dollar amounts are represented to the cent. - * If no data has yet be inserted for a given field, it defaults to “0.00” (for fixed amounts). + If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. - scope: `payrolls:read` + scope: `payrolls:run` - :param payroll_uuid: The UUID of the payroll + :param company_uuid: The UUID of the company + :param payroll_type: Payroll type :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param start_date: Pay period start date + :param end_date: Pay period end date. If left empty, defaults to today's date. + :param pay_schedule_uuid: The UUID of the pay schedule + :param employee_uuids: An array of employees. This field is only applicable to new hire payroll and termination payroll :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1876,24 +2267,38 @@ async def get_receipt_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1PaymentReceiptsPayrollsPayrollUUIDRequest( - payroll_uuid=payroll_uuid, + request = models.PostCompaniesPayrollSkipCompanyUUIDRequest( + company_uuid=company_uuid, x_gusto_api_version=x_gusto_api_version, + request_body=models.PostCompaniesPayrollSkipCompanyUUIDRequestBody( + payroll_type=payroll_type, + start_date=start_date, + end_date=end_date, + pay_schedule_uuid=pay_schedule_uuid, + employee_uuids=employee_uuids, + ), ) req = self._build_request_async( - method="GET", - path="/v1/payrolls/{payroll_uuid}/receipt", + method="POST", + path="/v1/companies/{company_uuid}/payrolls/skip", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostCompaniesPayrollSkipCompanyUUIDRequestBody, + ), timeout_ms=timeout_ms, ) @@ -1907,44 +2312,44 @@ async def get_receipt_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-payment-receipts-payrolls-payroll_uuid", - oauth2_scopes=[], + operation_id="post-companies-payroll-skip-company_uuid", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollReceipt) + response_data: Any = None + if utils.match_response(http_res, "202", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion, http_res + ) + raise models.PostCompaniesPayrollSkipCompanyUUIDResponseBody( + response_data, http_res + ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def get_blockers( + def calculate_gross_up( self, *, - company_uuid: str, + payroll_uuid: str, + employee_uuid: str, + net_pay: str, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -1952,16 +2357,18 @@ def get_blockers( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.PayrollBlocker]: - r"""Get all payroll blockers for a company + ) -> models.GrossUpPay: + r"""Calculate gross up - Returns a list of reasons that prevent the company from running payrolls. See the [payroll blockers guide](https://docs.gusto.com/embedded-payroll/docs/payroll-blockers) for a complete list of reasons. + Calculates gross up earnings for an employee's payroll, given net earnings. This endpoint is only applicable to off-cycle unprocessed payrolls. - The list is empty if there are no payroll blockers. + The gross up amount must then be mapped to the corresponding fixed compensation earning type to get the correct payroll amount. For example, for bonus off-cycles, the gross up amount should be set with the Bonus earning type in the payroll `fixed_compensations` field. scope: `payrolls:run` - :param company_uuid: The UUID of the company + :param payroll_uuid: The UUID of the payroll + :param employee_uuid: Employee UUID + :param net_pay: Employee net earnings :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1978,24 +2385,35 @@ def get_blockers( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesPayrollBlockersCompanyUUIDRequest( - company_uuid=company_uuid, + request = models.PostPayrollsGrossUpPayrollUUIDRequest( + payroll_uuid=payroll_uuid, x_gusto_api_version=x_gusto_api_version, + request_body=models.PostPayrollsGrossUpPayrollUUIDRequestBody( + employee_uuid=employee_uuid, + net_pay=net_pay, + ), ) req = self._build_request( - method="GET", - path="/v1/companies/{company_uuid}/payrolls/blockers", + method="POST", + path="/v1/payrolls/{payroll_uuid}/gross_up", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostPayrollsGrossUpPayrollUUIDRequestBody, + ), timeout_ms=timeout_ms, ) @@ -2009,44 +2427,44 @@ def get_blockers( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-payroll-blockers-company_uuid", - oauth2_scopes=[], + operation_id="post-payrolls-gross-up-payroll_uuid", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayrollBlocker]) + return unmarshal_json_response(models.GrossUpPay, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.PostPayrollsGrossUpPayrollUUIDResponseBodyUnion, http_res + ) + raise models.PostPayrollsGrossUpPayrollUUIDResponseBody( + response_data, http_res + ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def get_blockers_async( + async def calculate_gross_up_async( self, *, - company_uuid: str, + payroll_uuid: str, + employee_uuid: str, + net_pay: str, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -2054,16 +2472,18 @@ async def get_blockers_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.PayrollBlocker]: - r"""Get all payroll blockers for a company + ) -> models.GrossUpPay: + r"""Calculate gross up - Returns a list of reasons that prevent the company from running payrolls. See the [payroll blockers guide](https://docs.gusto.com/embedded-payroll/docs/payroll-blockers) for a complete list of reasons. + Calculates gross up earnings for an employee's payroll, given net earnings. This endpoint is only applicable to off-cycle unprocessed payrolls. - The list is empty if there are no payroll blockers. + The gross up amount must then be mapped to the corresponding fixed compensation earning type to get the correct payroll amount. For example, for bonus off-cycles, the gross up amount should be set with the Bonus earning type in the payroll `fixed_compensations` field. scope: `payrolls:run` - :param company_uuid: The UUID of the company + :param payroll_uuid: The UUID of the payroll + :param employee_uuid: Employee UUID + :param net_pay: Employee net earnings :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -2080,24 +2500,35 @@ async def get_blockers_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1CompaniesPayrollBlockersCompanyUUIDRequest( - company_uuid=company_uuid, + request = models.PostPayrollsGrossUpPayrollUUIDRequest( + payroll_uuid=payroll_uuid, x_gusto_api_version=x_gusto_api_version, + request_body=models.PostPayrollsGrossUpPayrollUUIDRequestBody( + employee_uuid=employee_uuid, + net_pay=net_pay, + ), ) req = self._build_request_async( - method="GET", - path="/v1/companies/{company_uuid}/payrolls/blockers", + method="POST", + path="/v1/payrolls/{payroll_uuid}/gross_up", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostPayrollsGrossUpPayrollUUIDRequestBody, + ), timeout_ms=timeout_ms, ) @@ -2111,72 +2542,63 @@ async def get_blockers_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-companies-payroll-blockers-company_uuid", - oauth2_scopes=[], + operation_id="post-payrolls-gross-up-payroll_uuid", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayrollBlocker]) + return unmarshal_json_response(models.GrossUpPay, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.PostPayrollsGrossUpPayrollUUIDResponseBodyUnion, http_res + ) + raise models.PostPayrollsGrossUpPayrollUUIDResponseBody( + response_data, http_res + ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def skip( + def calculate( self, *, - company_uuid: str, - payroll_type: models.PostCompaniesPayrollSkipCompanyUUIDPayrollType, - x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - start_date: Optional[str] = None, - end_date: Optional[str] = None, - pay_schedule_uuid: Optional[str] = None, - employee_uuids: Optional[List[str]] = None, + company_id: str, + payroll_id: str, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ): - r"""Skip a payroll + r"""Calculate a payroll - Submits a $0 payroll for employees associated with the pay schedule to skip payroll. This submission is asynchronous and a successful request responds with a 202 HTTP status. Upon success, the payroll is transitioned to the `processed` state. + Performs calculations for taxes, benefits, and deductions for an unprocessed payroll. The calculated payroll details provide a preview of the actual values that will be used when the payroll is run. - If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. + This calculation is asynchronous and a successful request responds with a 202 HTTP status. To view the details of the calculated payroll, use the GET /v1/companies/{company_id}/payrolls/{payroll_id} endpoint with *include=taxes,benefits,deductions* params. + In v2023-04-01, *show_calculation=true* is no longer required. - scope: `payrolls:run` + If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. - :param company_uuid: The UUID of the company - :param payroll_type: Payroll type + :param company_id: The UUID of the company + :param payroll_id: The UUID of the payroll :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param start_date: Pay period start date - :param end_date: Pay period end date. If left empty, defaults to today's date. - :param pay_schedule_uuid: The UUID of the pay schedule - :param employee_uuids: An array of employees. This field is only applicable to new hire payroll and termination payroll :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -2192,38 +2614,25 @@ def skip( else: base_url = self._get_url(base_url, url_variables) - request = models.PostCompaniesPayrollSkipCompanyUUIDRequest( - company_uuid=company_uuid, + request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequest( + company_id=company_id, + payroll_id=payroll_id, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostCompaniesPayrollSkipCompanyUUIDRequestBody( - payroll_type=payroll_type, - start_date=start_date, - end_date=end_date, - pay_schedule_uuid=pay_schedule_uuid, - employee_uuids=employee_uuids, - ), ) req = self._build_request( - method="POST", - path="/v1/companies/{company_uuid}/payrolls/skip", + method="PUT", + path="/v1/companies/{company_id}/payrolls/{payroll_id}/calculate", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PostCompaniesPayrollSkipCompanyUUIDRequestBody, - ), timeout_ms=timeout_ms, ) @@ -2237,9 +2646,10 @@ def skip( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-companies-payroll-skip-company_uuid", - oauth2_scopes=[], + operation_id="put-v1-companies-company_id-payrolls-payroll_id-calculate", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2253,65 +2663,47 @@ def skip( if utils.match_response(http_res, "202", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, - models.PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion, + response_data = unmarshal_json_response( + models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion, + http_res, ) - raise models.PostCompaniesPayrollSkipCompanyUUIDResponseBody( - data=response_data + raise models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBody( + response_data, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def skip_async( + async def calculate_async( self, *, - company_uuid: str, - payroll_type: models.PostCompaniesPayrollSkipCompanyUUIDPayrollType, + company_id: str, + payroll_id: str, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - start_date: Optional[str] = None, - end_date: Optional[str] = None, - pay_schedule_uuid: Optional[str] = None, - employee_uuids: Optional[List[str]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ): - r"""Skip a payroll + r"""Calculate a payroll - Submits a $0 payroll for employees associated with the pay schedule to skip payroll. This submission is asynchronous and a successful request responds with a 202 HTTP status. Upon success, the payroll is transitioned to the `processed` state. + Performs calculations for taxes, benefits, and deductions for an unprocessed payroll. The calculated payroll details provide a preview of the actual values that will be used when the payroll is run. - If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. + This calculation is asynchronous and a successful request responds with a 202 HTTP status. To view the details of the calculated payroll, use the GET /v1/companies/{company_id}/payrolls/{payroll_id} endpoint with *include=taxes,benefits,deductions* params. + In v2023-04-01, *show_calculation=true* is no longer required. - scope: `payrolls:run` + If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. - :param company_uuid: The UUID of the company - :param payroll_type: Payroll type + :param company_id: The UUID of the company + :param payroll_id: The UUID of the payroll :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param start_date: Pay period start date - :param end_date: Pay period end date. If left empty, defaults to today's date. - :param pay_schedule_uuid: The UUID of the pay schedule - :param employee_uuids: An array of employees. This field is only applicable to new hire payroll and termination payroll :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -2327,38 +2719,25 @@ async def skip_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PostCompaniesPayrollSkipCompanyUUIDRequest( - company_uuid=company_uuid, + request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequest( + company_id=company_id, + payroll_id=payroll_id, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostCompaniesPayrollSkipCompanyUUIDRequestBody( - payroll_type=payroll_type, - start_date=start_date, - end_date=end_date, - pay_schedule_uuid=pay_schedule_uuid, - employee_uuids=employee_uuids, - ), ) req = self._build_request_async( - method="POST", - path="/v1/companies/{company_uuid}/payrolls/skip", + method="PUT", + path="/v1/companies/{company_id}/payrolls/{payroll_id}/calculate", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PostCompaniesPayrollSkipCompanyUUIDRequestBody, - ), timeout_ms=timeout_ms, ) @@ -2372,9 +2751,10 @@ async def skip_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-companies-payroll-skip-company_uuid", - oauth2_scopes=[], + operation_id="put-v1-companies-company_id-payrolls-payroll_id-calculate", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2388,59 +2768,55 @@ async def skip_async( if utils.match_response(http_res, "202", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, - models.PostCompaniesPayrollSkipCompanyUUIDResponseBodyUnion, + response_data = unmarshal_json_response( + models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion, + http_res, ) - raise models.PostCompaniesPayrollSkipCompanyUUIDResponseBody( - data=response_data + raise models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBody( + response_data, http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def calculate_gross_up( + def submit( self, *, - payroll_uuid: str, - employee_uuid: str, - net_pay: str, + company_id: str, + payroll_id: str, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + submission_blockers: Optional[ + Union[ + List[models.SubmissionBlockers], + List[models.SubmissionBlockersTypedDict], + ] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.GrossUpPay: - r"""Calculate gross up + ): + r"""Submit payroll - Calculates gross up earnings for an employee's payroll, given net earnings. This endpoint is only applicable to off-cycle unprocessed payrolls. + Submits an unprocessed payroll to be calculated and run. This submission is asynchronous and a successful request responds with a 202 HTTP status. Upon success, transitions the payroll to the `processed` state. - The gross up amount must then be mapped to the corresponding fixed compensation earning type to get the correct payroll amount. For example, for bonus off-cycles, the gross up amount should be set with the Bonus earning type in the payroll `fixed_compensations` field. + You should poll to ensure that payroll is processed successfully, as async errors only occur after async processing is complete. + + If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. scope: `payrolls:run` - :param payroll_uuid: The UUID of the payroll - :param employee_uuid: Employee UUID - :param net_pay: Employee net earnings + :param company_id: The UUID of the company + :param payroll_id: The UUID of the payroll :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param submission_blockers: An array of submission_blockers, each with a selected unblock option. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -2456,18 +2832,20 @@ def calculate_gross_up( else: base_url = self._get_url(base_url, url_variables) - request = models.PostPayrollsGrossUpPayrollUUIDRequest( - payroll_uuid=payroll_uuid, + request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequest( + company_id=company_id, + payroll_id=payroll_id, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostPayrollsGrossUpPayrollUUIDRequestBody( - employee_uuid=employee_uuid, - net_pay=net_pay, + request_body=models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody( + submission_blockers=utils.get_pydantic_model( + submission_blockers, Optional[List[models.SubmissionBlockers]] + ), ), ) req = self._build_request( - method="POST", - path="/v1/payrolls/{payroll_uuid}/gross_up", + method="PUT", + path="/v1/companies/{company_id}/payrolls/{payroll_id}/submit", base_url=base_url, url_variables=url_variables, request=request, @@ -2483,7 +2861,7 @@ def calculate_gross_up( False, False, "json", - models.PostPayrollsGrossUpPayrollUUIDRequestBody, + models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody, ), timeout_ms=timeout_ms, ) @@ -2498,9 +2876,10 @@ def calculate_gross_up( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-payrolls-gross-up-payroll_uuid", - oauth2_scopes=[], + operation_id="put-v1-companies-company_id-payrolls-payroll_id-submit", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2511,59 +2890,58 @@ def calculate_gross_up( ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.GrossUpPay) + if utils.match_response(http_res, "202", "*"): + return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.PostPayrollsGrossUpPayrollUUIDResponseBodyUnion + response_data = unmarshal_json_response( + models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion, + http_res, + ) + raise models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBody( + response_data, http_res ) - raise models.PostPayrollsGrossUpPayrollUUIDResponseBody(data=response_data) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def calculate_gross_up_async( + async def submit_async( self, *, - payroll_uuid: str, - employee_uuid: str, - net_pay: str, + company_id: str, + payroll_id: str, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + submission_blockers: Optional[ + Union[ + List[models.SubmissionBlockers], + List[models.SubmissionBlockersTypedDict], + ] + ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.GrossUpPay: - r"""Calculate gross up + ): + r"""Submit payroll - Calculates gross up earnings for an employee's payroll, given net earnings. This endpoint is only applicable to off-cycle unprocessed payrolls. + Submits an unprocessed payroll to be calculated and run. This submission is asynchronous and a successful request responds with a 202 HTTP status. Upon success, transitions the payroll to the `processed` state. - The gross up amount must then be mapped to the corresponding fixed compensation earning type to get the correct payroll amount. For example, for bonus off-cycles, the gross up amount should be set with the Bonus earning type in the payroll `fixed_compensations` field. + You should poll to ensure that payroll is processed successfully, as async errors only occur after async processing is complete. + + If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. scope: `payrolls:run` - :param payroll_uuid: The UUID of the payroll - :param employee_uuid: Employee UUID - :param net_pay: Employee net earnings + :param company_id: The UUID of the company + :param payroll_id: The UUID of the payroll :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param submission_blockers: An array of submission_blockers, each with a selected unblock option. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -2579,18 +2957,20 @@ async def calculate_gross_up_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PostPayrollsGrossUpPayrollUUIDRequest( - payroll_uuid=payroll_uuid, + request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequest( + company_id=company_id, + payroll_id=payroll_id, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostPayrollsGrossUpPayrollUUIDRequestBody( - employee_uuid=employee_uuid, - net_pay=net_pay, + request_body=models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody( + submission_blockers=utils.get_pydantic_model( + submission_blockers, Optional[List[models.SubmissionBlockers]] + ), ), ) req = self._build_request_async( - method="POST", - path="/v1/payrolls/{payroll_uuid}/gross_up", + method="PUT", + path="/v1/companies/{company_id}/payrolls/{payroll_id}/submit", base_url=base_url, url_variables=url_variables, request=request, @@ -2606,7 +2986,7 @@ async def calculate_gross_up_async( False, False, "json", - models.PostPayrollsGrossUpPayrollUUIDRequestBody, + models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody, ), timeout_ms=timeout_ms, ) @@ -2621,9 +3001,10 @@ async def calculate_gross_up_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-payrolls-gross-up-payroll_uuid", - oauth2_scopes=[], + operation_id="put-v1-companies-company_id-payrolls-payroll_id-submit", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2634,34 +3015,26 @@ async def calculate_gross_up_async( ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.GrossUpPay) + if utils.match_response(http_res, "202", "*"): + return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.PostPayrollsGrossUpPayrollUUIDResponseBodyUnion + response_data = unmarshal_json_response( + models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion, + http_res, + ) + raise models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBody( + response_data, http_res ) - raise models.PostPayrollsGrossUpPayrollUUIDResponseBody(data=response_data) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def calculate( + def cancel( self, *, company_id: str, @@ -2673,15 +3046,15 @@ def calculate( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Calculate a payroll + ) -> models.Payroll: + r"""Cancel a payroll - Performs calculations for taxes, benefits, and deductions for an unprocessed payroll. The calculated payroll details provide a preview of the actual values that will be used when the payroll is run. + Transitions a `processed` payroll back to the `unprocessed` state. A payroll can be canceled if it meets both criteria: + - `processed` is true + - Current time is earlier than 3:30pm PT on the payroll_deadline - This calculation is asynchronous and a successful request responds with a 202 HTTP status. To view the details of the calculated payroll, use the GET /v1/companies/{company_id}/payrolls/{payroll_id} endpoint with *include=taxes,benefits,deductions* params. - In v2023-04-01, *show_calculation=true* is no longer required. + scope: `payrolls:run` - If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll @@ -2701,7 +3074,7 @@ def calculate( else: base_url = self._get_url(base_url, url_variables) - request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequest( + request = models.PutAPIV1CompaniesCompanyIDPayrollsPayrollIDCancelRequest( company_id=company_id, payroll_id=payroll_id, x_gusto_api_version=x_gusto_api_version, @@ -2709,7 +3082,7 @@ def calculate( req = self._build_request( method="PUT", - path="/v1/companies/{company_id}/payrolls/{payroll_id}/calculate", + path="/v1/companies/{company_id}/payrolls/{payroll_id}/cancel", base_url=base_url, url_variables=url_variables, request=request, @@ -2733,9 +3106,10 @@ def calculate( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-v1-companies-company_id-payrolls-payroll_id-calculate", - oauth2_scopes=[], + operation_id="put-api-v1-companies-company_id-payrolls-payroll_id-cancel", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2745,38 +3119,24 @@ def calculate( retry_config=retry_config, ) - response_data: Any = None - if utils.match_response(http_res, "202", "*"): - return + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Payroll, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, - models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion, - ) - raise models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBody( - data=response_data + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def calculate_async( + async def cancel_async( self, *, company_id: str, @@ -2788,15 +3148,15 @@ async def calculate_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Calculate a payroll + ) -> models.Payroll: + r"""Cancel a payroll - Performs calculations for taxes, benefits, and deductions for an unprocessed payroll. The calculated payroll details provide a preview of the actual values that will be used when the payroll is run. + Transitions a `processed` payroll back to the `unprocessed` state. A payroll can be canceled if it meets both criteria: + - `processed` is true + - Current time is earlier than 3:30pm PT on the payroll_deadline - This calculation is asynchronous and a successful request responds with a 202 HTTP status. To view the details of the calculated payroll, use the GET /v1/companies/{company_id}/payrolls/{payroll_id} endpoint with *include=taxes,benefits,deductions* params. - In v2023-04-01, *show_calculation=true* is no longer required. + scope: `payrolls:run` - If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll @@ -2816,7 +3176,7 @@ async def calculate_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateRequest( + request = models.PutAPIV1CompaniesCompanyIDPayrollsPayrollIDCancelRequest( company_id=company_id, payroll_id=payroll_id, x_gusto_api_version=x_gusto_api_version, @@ -2824,7 +3184,7 @@ async def calculate_async( req = self._build_request_async( method="PUT", - path="/v1/companies/{company_id}/payrolls/{payroll_id}/calculate", + path="/v1/companies/{company_id}/payrolls/{payroll_id}/cancel", base_url=base_url, url_variables=url_variables, request=request, @@ -2848,9 +3208,10 @@ async def calculate_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-v1-companies-company_id-payrolls-payroll_id-calculate", - oauth2_scopes=[], + operation_id="put-api-v1-companies-company_id-payrolls-payroll_id-cancel", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2861,69 +3222,45 @@ async def calculate_async( ) response_data: Any = None - if utils.match_response(http_res, "202", "*"): - return + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Payroll, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, - models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBodyUnion, - ) - raise models.PutV1CompaniesCompanyIDPayrollsPayrollIDCalculateResponseBody( - data=response_data + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def submit( + def get_pay_stub( self, *, - company_id: str, payroll_id: str, + employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - submission_blockers: Optional[ - Union[ - List[models.SubmissionBlockers], - List[models.SubmissionBlockersTypedDict], - ] - ] = None, + models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion + ] = models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Submit payroll - - Submits an unprocessed payroll to be calculated and run. This submission is asynchronous and a successful request responds with a 202 HTTP status. Upon success, transitions the payroll to the `processed` state. + ) -> httpx.Response: + r"""Get an employee pay stub (pdf) - You should poll to ensure that payroll is processed successfully, as errors only occur after processing is complete. + Get an employee's pay stub for the specified payroll. By default, an application/pdf response will be returned. No other content types are currently supported, but may be supported in the future. - If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. + scope: `pay_stubs:read` - scope: `payrolls:run` - :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param submission_blockers: An array of submission_blockers, each with a selected unblock option. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -2939,37 +3276,25 @@ def submit( else: base_url = self._get_url(base_url, url_variables) - request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequest( - company_id=company_id, - payroll_id=payroll_id, + request = models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequest( x_gusto_api_version=x_gusto_api_version, - request_body=models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody( - submission_blockers=utils.get_pydantic_model( - submission_blockers, Optional[List[models.SubmissionBlockers]] - ), - ), + payroll_id=payroll_id, + employee_id=employee_id, ) req = self._build_request( - method="PUT", - path="/v1/companies/{company_id}/payrolls/{payroll_id}/submit", + method="GET", + path="/v1/payrolls/{payroll_id}/employees/{employee_id}/pay_stub", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value="application/pdf", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody, - ), timeout_ms=timeout_ms, ) @@ -2983,82 +3308,64 @@ def submit( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-v1-companies-company_id-payrolls-payroll_id-submit", - oauth2_scopes=[], + operation_id="get-v1-payrolls-payroll_uuid-employees-employee_uuid-pay_stub", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], + stream=True, retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "202", "*"): - return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, - models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion, + if utils.match_response(http_res, "200", "application/pdf"): + return http_res + if utils.match_response(http_res, "404", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res, http_res_text ) - raise models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBody( - data=response_data + raise models.UnprocessableEntityErrorObject( + response_data, http_res, http_res_text ) - if utils.match_response(http_res, ["404", "4XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res, http_res_text) - async def submit_async( + async def get_pay_stub_async( self, *, - company_id: str, payroll_id: str, + employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - submission_blockers: Optional[ - Union[ - List[models.SubmissionBlockers], - List[models.SubmissionBlockersTypedDict], - ] - ] = None, + models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion + ] = models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Submit payroll - - Submits an unprocessed payroll to be calculated and run. This submission is asynchronous and a successful request responds with a 202 HTTP status. Upon success, transitions the payroll to the `processed` state. + ) -> httpx.Response: + r"""Get an employee pay stub (pdf) - You should poll to ensure that payroll is processed successfully, as async errors only occur after async processing is complete. + Get an employee's pay stub for the specified payroll. By default, an application/pdf response will be returned. No other content types are currently supported, but may be supported in the future. - If the company is blocked from running payroll due to issues like incomplete setup, missing information or other compliance issues, the response will be 422 Unprocessable Entity with a categorization of the blockers as described in the error responses. + scope: `pay_stubs:read` - scope: `payrolls:run` - :param company_id: The UUID of the company :param payroll_id: The UUID of the payroll + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param submission_blockers: An array of submission_blockers, each with a selected unblock option. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -3074,37 +3381,25 @@ async def submit_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequest( - company_id=company_id, - payroll_id=payroll_id, + request = models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequest( x_gusto_api_version=x_gusto_api_version, - request_body=models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody( - submission_blockers=utils.get_pydantic_model( - submission_blockers, Optional[List[models.SubmissionBlockers]] - ), - ), + payroll_id=payroll_id, + employee_id=employee_id, ) req = self._build_request_async( - method="PUT", - path="/v1/companies/{company_id}/payrolls/{payroll_id}/submit", + method="GET", + path="/v1/payrolls/{payroll_id}/employees/{employee_id}/pay_stub", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value="application/pdf", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, - False, - False, - "json", - models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitRequestBody, - ), timeout_ms=timeout_ms, ) @@ -3118,74 +3413,66 @@ async def submit_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-v1-companies-company_id-payrolls-payroll_id-submit", - oauth2_scopes=[], + operation_id="get-v1-payrolls-payroll_uuid-employees-employee_uuid-pay_stub", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], + stream=True, retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "202", "*"): - return - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, - models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBodyUnion, + if utils.match_response(http_res, "200", "application/pdf"): + return http_res + if utils.match_response(http_res, "404", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res, http_res_text ) - raise models.PutV1CompaniesCompanyIDPayrollsPayrollIDSubmitResponseBody( - data=response_data + raise models.UnprocessableEntityErrorObject( + response_data, http_res, http_res_text ) - if utils.match_response(http_res, ["404", "4XX"], "*"): + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res, http_res_text) - def cancel( + def get_pay_stubs( self, *, - company_id: str, - payroll_id: str, + employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + page: Optional[int] = None, + per: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Payroll: - r"""Cancel a payroll + ) -> List[models.EmployeePayStubsList]: + r"""Get an employee's pay stubs - Transitions a `processed` payroll back to the `unprocessed` state. A payroll can be canceled if it meets both criteria: - - `processed` is true - - Current time is earlier than 3:30pm PT on the payroll_deadline + Get an employee's pay stubs - scope: `payrolls:run` + scope: `pay_stubs:read` - :param company_id: The UUID of the company - :param payroll_id: The UUID of the payroll + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -3201,15 +3488,16 @@ def cancel( else: base_url = self._get_url(base_url, url_variables) - request = models.PutAPIV1CompaniesCompanyIDPayrollsPayrollIDCancelRequest( - company_id=company_id, - payroll_id=payroll_id, + request = models.GetV1EmployeesEmployeeUUIDPayStubsRequest( x_gusto_api_version=x_gusto_api_version, + employee_id=employee_id, + page=page, + per=per, ) req = self._build_request( - method="PUT", - path="/v1/companies/{company_id}/payrolls/{payroll_id}/cancel", + method="GET", + path="/v1/employees/{employee_id}/pay_stubs", base_url=base_url, url_variables=url_variables, request=request, @@ -3233,71 +3521,61 @@ def cancel( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-api-v1-companies-company_id-payrolls-payroll_id-cancel", - oauth2_scopes=[], + operation_id="get-v1-employees-employee_uuid-pay_stubs", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Payroll) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(List[models.EmployeePayStubsList], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def cancel_async( + async def get_pay_stubs_async( self, *, - company_id: str, - payroll_id: str, + employee_id: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + page: Optional[int] = None, + per: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.Payroll: - r"""Cancel a payroll + ) -> List[models.EmployeePayStubsList]: + r"""Get an employee's pay stubs - Transitions a `processed` payroll back to the `unprocessed` state. A payroll can be canceled if it meets both criteria: - - `processed` is true - - Current time is earlier than 3:30pm PT on the payroll_deadline + Get an employee's pay stubs - scope: `payrolls:run` + scope: `pay_stubs:read` - :param company_id: The UUID of the company - :param payroll_id: The UUID of the payroll + :param employee_id: The UUID of the employee :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -3313,15 +3591,16 @@ async def cancel_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PutAPIV1CompaniesCompanyIDPayrollsPayrollIDCancelRequest( - company_id=company_id, - payroll_id=payroll_id, + request = models.GetV1EmployeesEmployeeUUIDPayStubsRequest( x_gusto_api_version=x_gusto_api_version, + employee_id=employee_id, + page=page, + per=per, ) req = self._build_request_async( - method="PUT", - path="/v1/companies/{company_id}/payrolls/{payroll_id}/cancel", + method="GET", + path="/v1/employees/{employee_id}/pay_stubs", base_url=base_url, url_variables=url_variables, request=request, @@ -3345,69 +3624,60 @@ async def cancel_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="put-api-v1-companies-company_id-payrolls-payroll_id-cancel", - oauth2_scopes=[], + operation_id="get-v1-employees-employee_uuid-pay_stubs", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "422", "4XX", "5XX"], + error_status_codes=["404", "4XX", "5XX"], retry_config=retry_config, ) response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Payroll) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(List[models.EmployeePayStubsList], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def get_pay_stub( + def generate_printable_checks( self, *, - payroll_id: str, - employee_id: str, + payroll_uuid: str, + printing_format: models.PrintingFormat, x_gusto_api_version: Optional[ - models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion - ] = models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + starting_check_number: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Get an employee pay stub (pdf) - - Get an employee's pay stub for the specified payroll. By default, an application/pdf response will be returned. No other content types are currently supported, but may be supported in the future. + ) -> models.PayrollCheck: + r"""Generate printable payroll checks (pdf) - scope: `pay_stubs:read` + This endpoint initiates the generation of employee checks for the payroll specified by payroll_uuid. A generation status and corresponding request_uuid will be returned. Use the generated document GET endpoint with document_type: `printable_payroll_checks` and request_uuid to poll the check generation process and retrieve the generated check URL upon completion. + scope: `generated_documents:write` - :param payroll_id: The UUID of the payroll - :param employee_id: The UUID of the employee + :param payroll_uuid: The UUID of the payroll + :param printing_format: The type of check stock being printed. Check the \"Types of check stock\" section in this [link](https://support.gusto.com/article/999877761000000/Pay-your-team-by-check) for more info on check types :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param starting_check_number: The starting check number we will start generating checks from. Use to override the sequence that will be used to generate check numbers. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -3423,25 +3693,35 @@ def get_pay_stub( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequest( + request = models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequest( + payroll_uuid=payroll_uuid, x_gusto_api_version=x_gusto_api_version, - payroll_id=payroll_id, - employee_id=employee_id, + request_body=models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBody( + printing_format=printing_format, + starting_check_number=starting_check_number, + ), ) req = self._build_request( - method="GET", - path="/v1/payrolls/{payroll_id}/employees/{employee_id}/pay_stub", + method="POST", + path="/v1/payrolls/{payroll_uuid}/generated_documents/printable_payroll_checks", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="*/*", + accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBody, + ), timeout_ms=timeout_ms, ) @@ -3455,63 +3735,60 @@ def get_pay_stub( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-payrolls-payroll_uuid-employees-employee_uuid-pay_stub", - oauth2_scopes=[], + operation_id="post-v1-payrolls-payroll_uuid-generated_documents-printable_payroll_checks", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) - if utils.match_response(http_res, "200", "*"): - return + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PayrollCheck, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def get_pay_stub_async( + async def generate_printable_checks_async( self, *, - payroll_id: str, - employee_id: str, + payroll_uuid: str, + printing_format: models.PrintingFormat, x_gusto_api_version: Optional[ - models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion - ] = models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + starting_check_number: Optional[int] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Get an employee pay stub (pdf) - - Get an employee's pay stub for the specified payroll. By default, an application/pdf response will be returned. No other content types are currently supported, but may be supported in the future. + ) -> models.PayrollCheck: + r"""Generate printable payroll checks (pdf) - scope: `pay_stubs:read` + This endpoint initiates the generation of employee checks for the payroll specified by payroll_uuid. A generation status and corresponding request_uuid will be returned. Use the generated document GET endpoint with document_type: `printable_payroll_checks` and request_uuid to poll the check generation process and retrieve the generated check URL upon completion. + scope: `generated_documents:write` - :param payroll_id: The UUID of the payroll - :param employee_id: The UUID of the employee + :param payroll_uuid: The UUID of the payroll + :param printing_format: The type of check stock being printed. Check the \"Types of check stock\" section in this [link](https://support.gusto.com/article/999877761000000/Pay-your-team-by-check) for more info on check types :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param starting_check_number: The starting check number we will start generating checks from. Use to override the sequence that will be used to generate check numbers. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -3527,25 +3804,35 @@ async def get_pay_stub_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1PayrollsPayrollUUIDEmployeesEmployeeUUIDPayStubRequest( + request = models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequest( + payroll_uuid=payroll_uuid, x_gusto_api_version=x_gusto_api_version, - payroll_id=payroll_id, - employee_id=employee_id, + request_body=models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBody( + printing_format=printing_format, + starting_check_number=starting_check_number, + ), ) req = self._build_request_async( - method="GET", - path="/v1/payrolls/{payroll_id}/employees/{employee_id}/pay_stub", + method="POST", + path="/v1/payrolls/{payroll_uuid}/generated_documents/printable_payroll_checks", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=False, + request_body_required=True, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="*/*", + accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBody, + ), timeout_ms=timeout_ms, ) @@ -3559,60 +3846,58 @@ async def get_pay_stub_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-payrolls-payroll_uuid-employees-employee_uuid-pay_stub", - oauth2_scopes=[], + operation_id="post-v1-payrolls-payroll_uuid-generated_documents-printable_payroll_checks", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + error_status_codes=["404", "422", "4XX", "5XX"], retry_config=retry_config, ) - if utils.match_response(http_res, "200", "*"): - return + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PayrollCheck, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def get_pay_stubs( + def get_v1_companies_company_id_payrolls_id_partner_disbursements( self, *, - employee_id: str, + company_id: str, + id: str, x_gusto_api_version: Optional[ - models.GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion - ] = models.GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.EmployeePayStubsList]: - r"""Get an employee's pay stubs + ) -> models.PayrollPartnerDisbursements: + r"""Get partner disbursements for a payroll - Get an employee's pay stubs + Get partner disbursements for a specific payroll. - scope: `pay_stubs:read` + scope: `partner_disbursements:read` - :param employee_id: The UUID of the employee + :param company_id: The UUID of the company + :param id: The UUID of the payroll :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -3629,14 +3914,15 @@ def get_pay_stubs( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1EmployeesEmployeeUUIDPayStubsRequest( + request = models.GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest( + company_id=company_id, + id=id, x_gusto_api_version=x_gusto_api_version, - employee_id=employee_id, ) req = self._build_request( method="GET", - path="/v1/employees/{employee_id}/pay_stubs", + path="/v1/companies/{company_id}/payrolls/{id}/partner_disbursements", base_url=base_url, url_variables=url_variables, request=request, @@ -3660,9 +3946,10 @@ def get_pay_stubs( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-employees-employee_uuid-pay_stubs", - oauth2_scopes=[], + operation_id="get-v1-companies-company_id-payrolls-id-partner_disbursements", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -3674,54 +3961,43 @@ def get_pay_stubs( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.EmployeePayStubsList] - ) + return unmarshal_json_response(models.PayrollPartnerDisbursements, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def get_pay_stubs_async( + async def get_v1_companies_company_id_payrolls_id_partner_disbursements_async( self, *, - employee_id: str, + company_id: str, + id: str, x_gusto_api_version: Optional[ - models.GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion - ] = models.GetV1EmployeesEmployeeUUIDPayStubsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] = models.GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> List[models.EmployeePayStubsList]: - r"""Get an employee's pay stubs + ) -> models.PayrollPartnerDisbursements: + r"""Get partner disbursements for a payroll - Get an employee's pay stubs + Get partner disbursements for a specific payroll. - scope: `pay_stubs:read` + scope: `partner_disbursements:read` - :param employee_id: The UUID of the employee + :param company_id: The UUID of the company + :param id: The UUID of the payroll :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -3738,14 +4014,15 @@ async def get_pay_stubs_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetV1EmployeesEmployeeUUIDPayStubsRequest( + request = models.GetV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest( + company_id=company_id, + id=id, x_gusto_api_version=x_gusto_api_version, - employee_id=employee_id, ) req = self._build_request_async( method="GET", - path="/v1/employees/{employee_id}/pay_stubs", + path="/v1/companies/{company_id}/payrolls/{id}/partner_disbursements", base_url=base_url, url_variables=url_variables, request=request, @@ -3769,9 +4046,10 @@ async def get_pay_stubs_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-v1-employees-employee_uuid-pay_stubs", - oauth2_scopes=[], + operation_id="get-v1-companies-company_id-payrolls-id-partner_disbursements", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -3783,58 +4061,53 @@ async def get_pay_stubs_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.EmployeePayStubsList] - ) + return unmarshal_json_response(models.PayrollPartnerDisbursements, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - def generate_printable_checks( + def patch_v1_companies_company_id_payrolls_id_partner_disbursements( self, *, - payroll_uuid: str, - printing_format: models.PrintingFormat, + company_id: str, + id: str, + disbursements: Union[ + List[ + models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements + ], + List[ + models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursementsTypedDict + ], + ], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - starting_check_number: Optional[int] = None, + models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] = models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PayrollCheck: - r"""Generate printable payroll checks (pdf) + ) -> models.PayrollPartnerDisbursements: + r"""Update partner disbursements for a payroll - This endpoint initiates the generation of employee checks for the payroll specified by payroll_uuid. A generation status and corresponding request_uuid will be returned. Use the generated document GET endpoint with document_type: `printable_payroll_checks` and request_uuid to poll the check generation process and retrieve the generated check URL upon completion. + Update partner disbursements for a specific payroll. - scope: `generated_documents:write` + scope: `partner_disbursements:write` - :param payroll_uuid: The UUID of the payroll - :param printing_format: The type of check stock being printed. Check the \"Types of check stock\" section in this [link](https://support.gusto.com/article/999877761000000/Pay-your-team-by-check) for more info on check types + + :param company_id: The UUID of the company + :param id: The UUID of the payroll + :param disbursements: :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param starting_check_number: The starting check number we will start generating checks from. Use to override the sequence that will be used to generate check numbers. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -3850,22 +4123,27 @@ def generate_printable_checks( else: base_url = self._get_url(base_url, url_variables) - request = models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequest( - payroll_uuid=payroll_uuid, + request = models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest( + company_id=company_id, + id=id, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBody( - printing_format=printing_format, - starting_check_number=starting_check_number, + request_body=models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBody( + disbursements=utils.get_pydantic_model( + disbursements, + List[ + models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements + ], + ), ), ) req = self._build_request( - method="POST", - path="/v1/payrolls/{payroll_uuid}/generated_documents/printable_payroll_checks", + method="PATCH", + path="/v1/companies/{company_id}/payrolls/{id}/partner_disbursements", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", @@ -3875,9 +4153,11 @@ def generate_printable_checks( get_serialized_body=lambda: utils.serialize_request_body( request.request_body, False, - False, + True, "json", - models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBody, + Optional[ + models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBody + ], ), timeout_ms=timeout_ms, ) @@ -3892,9 +4172,10 @@ def generate_printable_checks( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-v1-payrolls-payroll_uuid-generated_documents-printable_payroll_checks", - oauth2_scopes=[], + operation_id="patch-v1-companies-company_id-payrolls-id-partner_disbursements", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -3906,56 +4187,53 @@ def generate_printable_checks( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollCheck) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(models.PayrollPartnerDisbursements, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def generate_printable_checks_async( + async def patch_v1_companies_company_id_payrolls_id_partner_disbursements_async( self, *, - payroll_uuid: str, - printing_format: models.PrintingFormat, + company_id: str, + id: str, + disbursements: Union[ + List[ + models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements + ], + List[ + models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursementsTypedDict + ], + ], x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, - starting_check_number: Optional[int] = None, + models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion + ] = models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PayrollCheck: - r"""Generate printable payroll checks (pdf) + ) -> models.PayrollPartnerDisbursements: + r"""Update partner disbursements for a payroll - This endpoint initiates the generation of employee checks for the payroll specified by payroll_uuid. A generation status and corresponding request_uuid will be returned. Use the generated document GET endpoint with document_type: `printable_payroll_checks` and request_uuid to poll the check generation process and retrieve the generated check URL upon completion. + Update partner disbursements for a specific payroll. - scope: `generated_documents:write` + scope: `partner_disbursements:write` - :param payroll_uuid: The UUID of the payroll - :param printing_format: The type of check stock being printed. Check the \"Types of check stock\" section in this [link](https://support.gusto.com/article/999877761000000/Pay-your-team-by-check) for more info on check types + + :param company_id: The UUID of the company + :param id: The UUID of the payroll + :param disbursements: :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param starting_check_number: The starting check number we will start generating checks from. Use to override the sequence that will be used to generate check numbers. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -3971,22 +4249,27 @@ async def generate_printable_checks_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequest( - payroll_uuid=payroll_uuid, + request = models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequest( + company_id=company_id, + id=id, x_gusto_api_version=x_gusto_api_version, - request_body=models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBody( - printing_format=printing_format, - starting_check_number=starting_check_number, + request_body=models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBody( + disbursements=utils.get_pydantic_model( + disbursements, + List[ + models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsDisbursements + ], + ), ), ) req = self._build_request_async( - method="POST", - path="/v1/payrolls/{payroll_uuid}/generated_documents/printable_payroll_checks", + method="PATCH", + path="/v1/companies/{company_id}/payrolls/{id}/partner_disbursements", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, + request_body_required=False, request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", @@ -3996,9 +4279,11 @@ async def generate_printable_checks_async( get_serialized_body=lambda: utils.serialize_request_body( request.request_body, False, - False, + True, "json", - models.PostV1PayrollsPayrollUUIDGeneratedDocumentsPrintablePayrollChecksRequestBody, + Optional[ + models.PatchV1CompaniesCompanyIDPayrollsIDPartnerDisbursementsRequestBody + ], ), timeout_ms=timeout_ms, ) @@ -4013,9 +4298,10 @@ async def generate_printable_checks_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="post-v1-payrolls-payroll_uuid-generated_documents-printable_payroll_checks", - oauth2_scopes=[], + operation_id="patch-v1-companies-company_id-payrolls-id-partner_disbursements", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -4027,28 +4313,17 @@ async def generate_printable_checks_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayrollCheck) - if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + return unmarshal_json_response(models.PayrollPartnerDisbursements, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) - if utils.match_response(http_res, ["404", "4XX"], "*"): + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/payschedules.py b/gusto_embedded/src/gusto_embedded/payschedules.py index 337ca8ad..89744b08 100644 --- a/gusto_embedded/src/gusto_embedded/payschedules.py +++ b/gusto_embedded/src/gusto_embedded/payschedules.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import Nullable, OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -106,9 +107,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-pay_schedules", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -120,31 +122,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleCreateUpdate) + return unmarshal_json_response(models.PayScheduleCreateUpdate, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -243,9 +234,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-pay_schedules", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -257,31 +249,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleCreateUpdate) + return unmarshal_json_response(models.PayScheduleCreateUpdate, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_all( self, @@ -355,9 +336,10 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -368,26 +350,15 @@ def get_all( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayScheduleList]) + return unmarshal_json_response(List[models.PayScheduleList], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_all_async( self, @@ -461,9 +432,10 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -474,26 +446,15 @@ async def get_all_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayScheduleList]) + return unmarshal_json_response(List[models.PayScheduleList], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_preview( self, @@ -576,9 +537,10 @@ def get_preview( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules-preview", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -589,29 +551,17 @@ def get_preview( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, - models.GetV1CompaniesCompanyIDPaySchedulesPreviewResponseBody, + return unmarshal_json_response( + models.GetV1CompaniesCompanyIDPaySchedulesPreviewResponseBody, http_res ) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_preview_async( self, @@ -694,9 +644,10 @@ async def get_preview_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules-preview", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -707,29 +658,17 @@ async def get_preview_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, - models.GetV1CompaniesCompanyIDPaySchedulesPreviewResponseBody, + return unmarshal_json_response( + models.GetV1CompaniesCompanyIDPaySchedulesPreviewResponseBody, http_res ) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -800,9 +739,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules-pay_schedule_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -813,26 +753,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleObject) + return unmarshal_json_response(models.PayScheduleObject, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -903,9 +832,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules-pay_schedule_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -916,26 +846,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleObject) + return unmarshal_json_response(models.PayScheduleObject, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -1041,9 +960,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-pay_schedules-pay_schedule_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1055,31 +975,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleCreateUpdate) + return unmarshal_json_response(models.PayScheduleCreateUpdate, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -1185,9 +1094,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_id-pay_schedules-pay_schedule_id", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1199,31 +1109,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleCreateUpdate) + return unmarshal_json_response(models.PayScheduleCreateUpdate, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_pay_periods( self, @@ -1304,9 +1203,10 @@ def get_pay_periods( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_periods", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1317,26 +1217,15 @@ def get_pay_periods( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayPeriod]) + return unmarshal_json_response(List[models.PayPeriod], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_pay_periods_async( self, @@ -1417,9 +1306,10 @@ async def get_pay_periods_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_periods", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1430,26 +1320,15 @@ async def get_pay_periods_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.PayPeriod]) + return unmarshal_json_response(List[models.PayPeriod], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_unprocessed_termination_periods( self, @@ -1519,9 +1398,10 @@ def get_unprocessed_termination_periods( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-unprocessed_termination_pay_periods", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1532,28 +1412,17 @@ def get_unprocessed_termination_periods( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.UnprocessedTerminationPayPeriod] + return unmarshal_json_response( + List[models.UnprocessedTerminationPayPeriod], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_unprocessed_termination_periods_async( self, @@ -1623,9 +1492,10 @@ async def get_unprocessed_termination_periods_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-unprocessed_termination_pay_periods", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1636,28 +1506,17 @@ async def get_unprocessed_termination_periods_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, List[models.UnprocessedTerminationPayPeriod] + return unmarshal_json_response( + List[models.UnprocessedTerminationPayPeriod], http_res ) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_assignments( self, @@ -1725,9 +1584,10 @@ def get_assignments( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules-assignments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1738,26 +1598,15 @@ def get_assignments( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleAssignment) + return unmarshal_json_response(models.PayScheduleAssignment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_assignments_async( self, @@ -1825,9 +1674,10 @@ async def get_assignments_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_id-pay_schedules-assignments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1838,26 +1688,15 @@ async def get_assignments_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.PayScheduleAssignment) + return unmarshal_json_response(models.PayScheduleAssignment, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def preview_assignment( self, @@ -1963,9 +1802,10 @@ def preview_assignment( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-pay_schedules-assignment_preview", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1977,33 +1817,22 @@ def preview_assignment( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.PayScheduleAssignmentPreview + return unmarshal_json_response( + models.PayScheduleAssignmentPreview, http_res ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def preview_assignment_async( self, @@ -2109,9 +1938,10 @@ async def preview_assignment_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-pay_schedules-assignment_preview", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2123,33 +1953,22 @@ async def preview_assignment_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, models.PayScheduleAssignmentPreview + return unmarshal_json_response( + models.PayScheduleAssignmentPreview, http_res ) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def assign( self, @@ -2256,9 +2075,10 @@ def assign( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-pay_schedules-assign", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2272,29 +2092,18 @@ def assign( if utils.match_response(http_res, "200", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def assign_async( self, @@ -2401,9 +2210,10 @@ async def assign_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_id-pay_schedules-assign", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2417,26 +2227,15 @@ async def assign_async( if utils.match_response(http_res, "200", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/recoverycases.py b/gusto_embedded/src/gusto_embedded/recoverycases.py index bb92ff61..b9809c14 100644 --- a/gusto_embedded/src/gusto_embedded/recoverycases.py +++ b/gusto_embedded/src/gusto_embedded/recoverycases.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -75,9 +76,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-recovery-cases", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,26 +90,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.RecoveryCase]) + return unmarshal_json_response(List[models.RecoveryCase], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -175,9 +166,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-recovery-cases", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -188,26 +180,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.RecoveryCase]) + return unmarshal_json_response(List[models.RecoveryCase], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def redebit( self, @@ -279,9 +260,10 @@ def redebit( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="redebit-recovery-case", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -295,29 +277,18 @@ def redebit( if utils.match_response(http_res, "202", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def redebit_async( self, @@ -389,9 +360,10 @@ async def redebit_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="redebit-recovery-case", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -405,26 +377,15 @@ async def redebit_async( if utils.match_response(http_res, "202", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/reimbursements.py b/gusto_embedded/src/gusto_embedded/reimbursements.py new file mode 100644 index 00000000..ea3459cd --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/reimbursements.py @@ -0,0 +1,1071 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from gusto_embedded import models, utils +from gusto_embedded._hooks import HookContext +from gusto_embedded.types import OptionalNullable, UNSET +from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, List, Mapping, Optional + + +class Reimbursements(BaseSDK): + def get_v1_employees_employee_id_recurring_reimbursements( + self, + *, + employee_id: str, + x_gusto_api_version: Optional[ + models.GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + page: Optional[int] = None, + per: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBody]: + r"""Get recurring reimbursements for an employee + + Get all active recurring reimbursements for an employee. + + scope: `reimbursements:read` + + + :param employee_id: The UUID of the employee + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1EmployeesEmployeeIDRecurringReimbursementsRequest( + x_gusto_api_version=x_gusto_api_version, + employee_id=employee_id, + page=page, + per=per, + ) + + req = self._build_request( + method="GET", + path="/v1/employees/{employee_id}/recurring_reimbursements", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-employees-employee_id-recurring_reimbursements", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[ + models.GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBody + ], + http_res, + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_employees_employee_id_recurring_reimbursements_async( + self, + *, + employee_id: str, + x_gusto_api_version: Optional[ + models.GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion + ] = models.GetV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + page: Optional[int] = None, + per: Optional[int] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBody]: + r"""Get recurring reimbursements for an employee + + Get all active recurring reimbursements for an employee. + + scope: `reimbursements:read` + + + :param employee_id: The UUID of the employee + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param page: The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. + :param per: Number of objects per page. For majority of endpoints will default to 25 + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1EmployeesEmployeeIDRecurringReimbursementsRequest( + x_gusto_api_version=x_gusto_api_version, + employee_id=employee_id, + page=page, + per=per, + ) + + req = self._build_request_async( + method="GET", + path="/v1/employees/{employee_id}/recurring_reimbursements", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-employees-employee_id-recurring_reimbursements", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[ + models.GetV1EmployeesEmployeeIDRecurringReimbursementsResponseBody + ], + http_res, + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def post_v1_employees_employee_id_recurring_reimbursements( + self, + *, + employee_id: str, + description: str, + amount: float, + x_gusto_api_version: Optional[ + models.PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBody: + r"""Create a recurring reimbursement + + Create a recurring reimbursement for an employee. + + scope: `reimbursements:write` + + + :param employee_id: The UUID of the employee + :param description: The description of the reimbursement + :param amount: The dollar amount of the reimbursement + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostV1EmployeesEmployeeIDRecurringReimbursementsRequest( + x_gusto_api_version=x_gusto_api_version, + employee_id=employee_id, + request_body=models.PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBody( + description=description, + amount=amount, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/employees/{employee_id}/recurring_reimbursements", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-v1-employees-employee_id-recurring_reimbursements", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBody, + http_res, + ) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def post_v1_employees_employee_id_recurring_reimbursements_async( + self, + *, + employee_id: str, + description: str, + amount: float, + x_gusto_api_version: Optional[ + models.PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDRecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBody: + r"""Create a recurring reimbursement + + Create a recurring reimbursement for an employee. + + scope: `reimbursements:write` + + + :param employee_id: The UUID of the employee + :param description: The description of the reimbursement + :param amount: The dollar amount of the reimbursement + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostV1EmployeesEmployeeIDRecurringReimbursementsRequest( + x_gusto_api_version=x_gusto_api_version, + employee_id=employee_id, + request_body=models.PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBody( + description=description, + amount=amount, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/employees/{employee_id}/recurring_reimbursements", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostV1EmployeesEmployeeIDRecurringReimbursementsRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-v1-employees-employee_id-recurring_reimbursements", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.PostV1EmployeesEmployeeIDRecurringReimbursementsResponseBody, + http_res, + ) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_v1_recurring_reimbursements( + self, + *, + id: str, + x_gusto_api_version: Optional[ + models.GetV1RecurringReimbursementsHeaderXGustoAPIVersion + ] = models.GetV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetV1RecurringReimbursementsResponseBody: + r"""Get a recurring reimbursement + + Get a specific recurring reimbursement. + + scope: `reimbursements:read` + + + :param id: The UUID of the reimbursement + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1RecurringReimbursementsRequest( + x_gusto_api_version=x_gusto_api_version, + id=id, + ) + + req = self._build_request( + method="GET", + path="/v1/recurring_reimbursements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-recurring_reimbursements", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.GetV1RecurringReimbursementsResponseBody, http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_recurring_reimbursements_async( + self, + *, + id: str, + x_gusto_api_version: Optional[ + models.GetV1RecurringReimbursementsHeaderXGustoAPIVersion + ] = models.GetV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GetV1RecurringReimbursementsResponseBody: + r"""Get a recurring reimbursement + + Get a specific recurring reimbursement. + + scope: `reimbursements:read` + + + :param id: The UUID of the reimbursement + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1RecurringReimbursementsRequest( + x_gusto_api_version=x_gusto_api_version, + id=id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/recurring_reimbursements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-recurring_reimbursements", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.GetV1RecurringReimbursementsResponseBody, http_res + ) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def put_v1_recurring_reimbursements( + self, + *, + id: str, + version: str, + x_gusto_api_version: Optional[ + models.PutV1RecurringReimbursementsHeaderXGustoAPIVersion + ] = models.PutV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + description: Optional[str] = None, + amount: Optional[float] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PutV1RecurringReimbursementsResponseBody: + r"""Update a recurring reimbursement + + Update a recurring reimbursement. + + scope: `reimbursements:write` + + + :param id: The UUID of the reimbursement + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param description: The description of the reimbursement + :param amount: The dollar amount of the reimbursement + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PutV1RecurringReimbursementsRequest( + x_gusto_api_version=x_gusto_api_version, + id=id, + request_body=models.PutV1RecurringReimbursementsRequestBody( + version=version, + description=description, + amount=amount, + ), + ) + + req = self._build_request( + method="PUT", + path="/v1/recurring_reimbursements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PutV1RecurringReimbursementsRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="put-v1-recurring_reimbursements", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PutV1RecurringReimbursementsResponseBody, http_res + ) + if utils.match_response(http_res, ["404", "409", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def put_v1_recurring_reimbursements_async( + self, + *, + id: str, + version: str, + x_gusto_api_version: Optional[ + models.PutV1RecurringReimbursementsHeaderXGustoAPIVersion + ] = models.PutV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + description: Optional[str] = None, + amount: Optional[float] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PutV1RecurringReimbursementsResponseBody: + r"""Update a recurring reimbursement + + Update a recurring reimbursement. + + scope: `reimbursements:write` + + + :param id: The UUID of the reimbursement + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param description: The description of the reimbursement + :param amount: The dollar amount of the reimbursement + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PutV1RecurringReimbursementsRequest( + x_gusto_api_version=x_gusto_api_version, + id=id, + request_body=models.PutV1RecurringReimbursementsRequestBody( + version=version, + description=description, + amount=amount, + ), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/recurring_reimbursements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PutV1RecurringReimbursementsRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="put-v1-recurring_reimbursements", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PutV1RecurringReimbursementsResponseBody, http_res + ) + if utils.match_response(http_res, ["404", "409", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def delete_v1_recurring_reimbursements( + self, + *, + id: str, + x_gusto_api_version: Optional[ + models.DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion + ] = models.DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a recurring reimbursement + + Delete (soft delete) a recurring reimbursement for an employee. + + scope: `reimbursements:write` + + + :param id: The UUID of the reimbursement + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteV1RecurringReimbursementsRequest( + x_gusto_api_version=x_gusto_api_version, + id=id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/recurring_reimbursements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="*/*", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete-v1-recurring_reimbursements", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def delete_v1_recurring_reimbursements_async( + self, + *, + id: str, + x_gusto_api_version: Optional[ + models.DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion + ] = models.DeleteV1RecurringReimbursementsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a recurring reimbursement + + Delete (soft delete) a recurring reimbursement for an employee. + + scope: `reimbursements:write` + + + :param id: The UUID of the reimbursement + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteV1RecurringReimbursementsRequest( + x_gusto_api_version=x_gusto_api_version, + id=id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/recurring_reimbursements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="*/*", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete-v1-recurring_reimbursements", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/reports.py b/gusto_embedded/src/gusto_embedded/reports.py index af13f445..3f01ed2c 100644 --- a/gusto_embedded/src/gusto_embedded/reports.py +++ b/gusto_embedded/src/gusto_embedded/reports.py @@ -6,6 +6,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -43,7 +44,7 @@ def create_custom( ) -> models.CreateReport: r"""Create a custom report - Create a custom report for a company. This endpoint initiates creating a custom report with custom columns, groupings, and filters. The `request_uuid` in the response can then be used to poll for the status and report URL upon completion using the report GET endpoint. This URL is valid for 10 minutes. + Create a custom report for a company. This endpoint initiates creating a custom report with custom columns, groupings, and filters. The `request_uuid` in the response can then be used to poll for the status and report URL upon completion using the [report GET endpoint](https://docs.gusto.com/embedded-payroll/reference/get-reports-request_uuid). This URL is valid for 10 minutes. scope: `company_reports:write` @@ -134,9 +135,10 @@ def create_custom( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-companies-company_uuid-reports", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -148,31 +150,20 @@ def create_custom( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CreateReport) + return unmarshal_json_response(models.CreateReport, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_custom_async( self, @@ -207,7 +198,7 @@ async def create_custom_async( ) -> models.CreateReport: r"""Create a custom report - Create a custom report for a company. This endpoint initiates creating a custom report with custom columns, groupings, and filters. The `request_uuid` in the response can then be used to poll for the status and report URL upon completion using the report GET endpoint. This URL is valid for 10 minutes. + Create a custom report for a company. This endpoint initiates creating a custom report with custom columns, groupings, and filters. The `request_uuid` in the response can then be used to poll for the status and report URL upon completion using the [report GET endpoint](https://docs.gusto.com/embedded-payroll/reference/get-reports-request_uuid). This URL is valid for 10 minutes. scope: `company_reports:write` @@ -298,9 +289,10 @@ async def create_custom_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-companies-company_uuid-reports", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -312,36 +304,255 @@ async def create_custom_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CreateReport) + return unmarshal_json_response(models.CreateReport, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def post_payrolls_payroll_uuid_reports_general_ledger( + self, + *, + payroll_uuid: str, + aggregation: models.PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + integration_type: OptionalNullable[ + models.PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GeneralLedgerReport: + r"""Create a general ledger report + + Create a general ledger report for a payroll. The report can be aggregated by different dimensions such as job or department. + + Use the `request_uuid` in the response with the [report GET endpoint](../reference/get-reports-request_uuid) to poll for the status and report URL upon completion. The retrieved report will be generated in a JSON format. + + scope: `company_reports:write` OR `company_reports:write:general_ledger` + + :param payroll_uuid: The UUID of the payroll + :param aggregation: The breakdown of the report. Use 'default' for no split. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param integration_type: The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequest( + payroll_uuid=payroll_uuid, + x_gusto_api_version=x_gusto_api_version, + request_body=models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody( + aggregation=aggregation, + integration_type=integration_type, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/payrolls/{payroll_uuid}/reports/general_ledger", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-payrolls-payroll_uuid-reports-general_ledger", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GeneralLedgerReport, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def post_payrolls_payroll_uuid_reports_general_ledger_async( + self, + *, + payroll_uuid: str, + aggregation: models.PostPayrollsPayrollUUIDReportsGeneralLedgerAggregation, + x_gusto_api_version: Optional[ + models.VersionHeader + ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + integration_type: OptionalNullable[ + models.PostPayrollsPayrollUUIDReportsGeneralLedgerIntegrationType + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.GeneralLedgerReport: + r"""Create a general ledger report + + Create a general ledger report for a payroll. The report can be aggregated by different dimensions such as job or department. + + Use the `request_uuid` in the response with the [report GET endpoint](../reference/get-reports-request_uuid) to poll for the status and report URL upon completion. The retrieved report will be generated in a JSON format. + + scope: `company_reports:write` OR `company_reports:write:general_ledger` + + :param payroll_uuid: The UUID of the payroll + :param aggregation: The breakdown of the report. Use 'default' for no split. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param integration_type: The kind of integration set up for the company. Required when `aggregation` is 'integration'. Must be null if `aggregation` is not 'integration'. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequest( + payroll_uuid=payroll_uuid, + x_gusto_api_version=x_gusto_api_version, + request_body=models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody( + aggregation=aggregation, + integration_type=integration_type, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/payrolls/{payroll_uuid}/reports/general_ledger", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostPayrollsPayrollUUIDReportsGeneralLedgerRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-payrolls-payroll_uuid-reports-general_ledger", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, ) - def get( + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.GeneralLedgerReport, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, ["404", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_reports_request_uuid( self, *, - report_uuid: str, + request_uuid: str, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -354,9 +565,11 @@ def get( Get a company's report given the `request_uuid`. The response will include the report request's status and, if complete, the report URL. + Reports containing PHI are inaccessible with `company_reports:read:tier_2_only` data scope + scope: `company_reports:read` - :param report_uuid: The UUID of the report request + :param request_uuid: The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -373,14 +586,14 @@ def get( else: base_url = self._get_url(base_url, url_variables) - request = models.GetReportsReportUUIDRequest( - report_uuid=report_uuid, + request = models.GetReportsRequestUUIDRequest( + request_uuid=request_uuid, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request( method="GET", - path="/v1/reports/{report_uuid}", + path="/v1/reports/{request_uuid}", base_url=base_url, url_variables=url_variables, request=request, @@ -404,9 +617,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-reports-report_uuid", - oauth2_scopes=[], + operation_id="get-reports-request_uuid", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -417,31 +631,20 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Report) + return unmarshal_json_response(models.Report, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) - async def get_async( + async def get_reports_request_uuid_async( self, *, - report_uuid: str, + request_uuid: str, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -454,9 +657,11 @@ async def get_async( Get a company's report given the `request_uuid`. The response will include the report request's status and, if complete, the report URL. + Reports containing PHI are inaccessible with `company_reports:read:tier_2_only` data scope + scope: `company_reports:read` - :param report_uuid: The UUID of the report request + :param request_uuid: The UUID of the request to generate a document. Generate document endpoints return request_uuids to be used with the GET generated document endpoint. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -473,14 +678,14 @@ async def get_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetReportsReportUUIDRequest( - report_uuid=report_uuid, + request = models.GetReportsRequestUUIDRequest( + request_uuid=request_uuid, x_gusto_api_version=x_gusto_api_version, ) req = self._build_request_async( method="GET", - path="/v1/reports/{report_uuid}", + path="/v1/reports/{request_uuid}", base_url=base_url, url_variables=url_variables, request=request, @@ -504,9 +709,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", - operation_id="get-reports-report_uuid", - oauth2_scopes=[], + operation_id="get-reports-request_uuid", + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -517,26 +723,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Report) + return unmarshal_json_response(models.Report, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_template( self, @@ -607,9 +802,10 @@ def get_template( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-report-templates-report_type", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -620,26 +816,15 @@ def get_template( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ReportTemplate) + return unmarshal_json_response(models.ReportTemplate, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_template_async( self, @@ -710,9 +895,10 @@ async def get_template_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-report-templates-report_type", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -723,23 +909,12 @@ async def get_template_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.ReportTemplate) + return unmarshal_json_response(models.ReportTemplate, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/salary_estimates.py b/gusto_embedded/src/gusto_embedded/salary_estimates.py new file mode 100644 index 00000000..415ffa25 --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/salary_estimates.py @@ -0,0 +1,1143 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from gusto_embedded import models, utils +from gusto_embedded._hooks import HookContext +from gusto_embedded.types import OptionalNullable, UNSET +from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, List, Mapping, Optional, Union + + +class SalaryEstimates(BaseSDK): + def post_v1_employees_employee_id_salary_estimates( + self, + *, + employee_id: str, + zip_code: str, + occupations: Union[ + List[models.PostV1EmployeesEmployeeIDSalaryEstimatesOccupations], + List[models.PostV1EmployeesEmployeeIDSalaryEstimatesOccupationsTypedDict], + ], + x_gusto_api_version: Optional[ + models.PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + annual_net_revenue: OptionalNullable[float] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SalaryEstimate: + r"""Create a salary estimate for an employee + + Create a salary estimate for an employee. This endpoint helps calculate a reasonable salary for S Corp owners based on their occupation, experience level, location, and business revenue. + + A salary estimate must include: + - Annual net revenue of the business + - ZIP code for location-based salary data + - One or more occupations with experience levels and time percentages (must sum to 100%) + + Only one in-progress salary estimate can exist per employee at a time. If an in-progress estimate already exists, you must either accept it or use the update endpoint. + + scope: `salary_estimates:write` + + + :param employee_id: The UUID of the employee + :param zip_code: The ZIP code for location-based salary calculations + :param occupations: Array of occupations. Time percentages must sum to 100%. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param annual_net_revenue: The annual net revenue of the business (must be greater than 0) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostV1EmployeesEmployeeIDSalaryEstimatesRequest( + x_gusto_api_version=x_gusto_api_version, + employee_id=employee_id, + request_body=models.PostV1EmployeesEmployeeIDSalaryEstimatesRequestBody( + annual_net_revenue=annual_net_revenue, + zip_code=zip_code, + occupations=utils.get_pydantic_model( + occupations, + List[models.PostV1EmployeesEmployeeIDSalaryEstimatesOccupations], + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/employees/{employee_id}/salary_estimates", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostV1EmployeesEmployeeIDSalaryEstimatesRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-v1-employees-employee_id-salary_estimates", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.SalaryEstimate, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def post_v1_employees_employee_id_salary_estimates_async( + self, + *, + employee_id: str, + zip_code: str, + occupations: Union[ + List[models.PostV1EmployeesEmployeeIDSalaryEstimatesOccupations], + List[models.PostV1EmployeesEmployeeIDSalaryEstimatesOccupationsTypedDict], + ], + x_gusto_api_version: Optional[ + models.PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion + ] = models.PostV1EmployeesEmployeeIDSalaryEstimatesHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + annual_net_revenue: OptionalNullable[float] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SalaryEstimate: + r"""Create a salary estimate for an employee + + Create a salary estimate for an employee. This endpoint helps calculate a reasonable salary for S Corp owners based on their occupation, experience level, location, and business revenue. + + A salary estimate must include: + - Annual net revenue of the business + - ZIP code for location-based salary data + - One or more occupations with experience levels and time percentages (must sum to 100%) + + Only one in-progress salary estimate can exist per employee at a time. If an in-progress estimate already exists, you must either accept it or use the update endpoint. + + scope: `salary_estimates:write` + + + :param employee_id: The UUID of the employee + :param zip_code: The ZIP code for location-based salary calculations + :param occupations: Array of occupations. Time percentages must sum to 100%. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param annual_net_revenue: The annual net revenue of the business (must be greater than 0) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostV1EmployeesEmployeeIDSalaryEstimatesRequest( + x_gusto_api_version=x_gusto_api_version, + employee_id=employee_id, + request_body=models.PostV1EmployeesEmployeeIDSalaryEstimatesRequestBody( + annual_net_revenue=annual_net_revenue, + zip_code=zip_code, + occupations=utils.get_pydantic_model( + occupations, + List[models.PostV1EmployeesEmployeeIDSalaryEstimatesOccupations], + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/employees/{employee_id}/salary_estimates", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostV1EmployeesEmployeeIDSalaryEstimatesRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-v1-employees-employee_id-salary_estimates", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.SalaryEstimate, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_v1_salary_estimates_id( + self, + *, + uuid: str, + x_gusto_api_version: Optional[ + models.GetV1SalaryEstimatesIDHeaderXGustoAPIVersion + ] = models.GetV1SalaryEstimatesIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SalaryEstimate: + r"""Get a salary estimate + + Retrieve a salary estimate by its UUID. Returns the estimated salary calculation along with all occupation details, revenue, and location information. + + scope: `salary_estimates:read` + + + :param uuid: The UUID of the salary estimate + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1SalaryEstimatesIDRequest( + x_gusto_api_version=x_gusto_api_version, + uuid=uuid, + ) + + req = self._build_request( + method="GET", + path="/v1/salary_estimates/{uuid}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-salary_estimates-id", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.SalaryEstimate, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_salary_estimates_id_async( + self, + *, + uuid: str, + x_gusto_api_version: Optional[ + models.GetV1SalaryEstimatesIDHeaderXGustoAPIVersion + ] = models.GetV1SalaryEstimatesIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SalaryEstimate: + r"""Get a salary estimate + + Retrieve a salary estimate by its UUID. Returns the estimated salary calculation along with all occupation details, revenue, and location information. + + scope: `salary_estimates:read` + + + :param uuid: The UUID of the salary estimate + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1SalaryEstimatesIDRequest( + x_gusto_api_version=x_gusto_api_version, + uuid=uuid, + ) + + req = self._build_request_async( + method="GET", + path="/v1/salary_estimates/{uuid}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-salary_estimates-id", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.SalaryEstimate, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def put_v1_salary_estimates_id( + self, + *, + uuid: str, + zip_code: str, + occupations: Union[ + List[models.PutV1SalaryEstimatesIDOccupations], + List[models.PutV1SalaryEstimatesIDOccupationsTypedDict], + ], + x_gusto_api_version: Optional[ + models.PutV1SalaryEstimatesIDHeaderXGustoAPIVersion + ] = models.PutV1SalaryEstimatesIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + annual_net_revenue: OptionalNullable[float] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SalaryEstimate: + r"""Update a salary estimate + + Update an existing salary estimate. You can modify the annual net revenue, ZIP code, and occupations. + + The salary estimate must not be finalized (accepted). Once accepted, salary estimates become read-only for record-keeping purposes. + + scope: `salary_estimates:write` + + + :param uuid: The UUID of the salary estimate + :param zip_code: The ZIP code for location-based salary calculations + :param occupations: Array of occupations. Time percentages must sum to 100%. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param annual_net_revenue: The annual net revenue of the business (must be greater than 0) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PutV1SalaryEstimatesIDRequest( + x_gusto_api_version=x_gusto_api_version, + uuid=uuid, + request_body=models.PutV1SalaryEstimatesIDRequestBody( + annual_net_revenue=annual_net_revenue, + zip_code=zip_code, + occupations=utils.get_pydantic_model( + occupations, List[models.PutV1SalaryEstimatesIDOccupations] + ), + ), + ) + + req = self._build_request( + method="PUT", + path="/v1/salary_estimates/{uuid}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PutV1SalaryEstimatesIDRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="put-v1-salary_estimates-id", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.SalaryEstimate, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def put_v1_salary_estimates_id_async( + self, + *, + uuid: str, + zip_code: str, + occupations: Union[ + List[models.PutV1SalaryEstimatesIDOccupations], + List[models.PutV1SalaryEstimatesIDOccupationsTypedDict], + ], + x_gusto_api_version: Optional[ + models.PutV1SalaryEstimatesIDHeaderXGustoAPIVersion + ] = models.PutV1SalaryEstimatesIDHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + annual_net_revenue: OptionalNullable[float] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SalaryEstimate: + r"""Update a salary estimate + + Update an existing salary estimate. You can modify the annual net revenue, ZIP code, and occupations. + + The salary estimate must not be finalized (accepted). Once accepted, salary estimates become read-only for record-keeping purposes. + + scope: `salary_estimates:write` + + + :param uuid: The UUID of the salary estimate + :param zip_code: The ZIP code for location-based salary calculations + :param occupations: Array of occupations. Time percentages must sum to 100%. + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param annual_net_revenue: The annual net revenue of the business (must be greater than 0) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PutV1SalaryEstimatesIDRequest( + x_gusto_api_version=x_gusto_api_version, + uuid=uuid, + request_body=models.PutV1SalaryEstimatesIDRequestBody( + annual_net_revenue=annual_net_revenue, + zip_code=zip_code, + occupations=utils.get_pydantic_model( + occupations, List[models.PutV1SalaryEstimatesIDOccupations] + ), + ), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/salary_estimates/{uuid}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PutV1SalaryEstimatesIDRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="put-v1-salary_estimates-id", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.SalaryEstimate, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def post_v1_salary_estimates_uuid_accept( + self, + *, + uuid: str, + employee_job_uuid: str, + x_gusto_api_version: Optional[ + models.PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion + ] = models.PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SalaryEstimate: + r"""Accept a salary estimate + + Accept and finalize a salary estimate. This associates the estimate with an employee job and marks it as accepted. + + Once accepted, the salary estimate becomes read-only for record-keeping purposes. The accepted salary can then be used to set up compensation for the employee. + + scope: `salary_estimates:write` + + + :param uuid: The UUID of the salary estimate + :param employee_job_uuid: The UUID of the employee job to associate with this salary estimate + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostV1SalaryEstimatesUUIDAcceptRequest( + x_gusto_api_version=x_gusto_api_version, + uuid=uuid, + request_body=models.PostV1SalaryEstimatesUUIDAcceptRequestBody( + employee_job_uuid=employee_job_uuid, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/salary_estimates/{uuid}/accept", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostV1SalaryEstimatesUUIDAcceptRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-v1-salary_estimates-uuid-accept", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.SalaryEstimate, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def post_v1_salary_estimates_uuid_accept_async( + self, + *, + uuid: str, + employee_job_uuid: str, + x_gusto_api_version: Optional[ + models.PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion + ] = models.PostV1SalaryEstimatesUUIDAcceptHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SalaryEstimate: + r"""Accept a salary estimate + + Accept and finalize a salary estimate. This associates the estimate with an employee job and marks it as accepted. + + Once accepted, the salary estimate becomes read-only for record-keeping purposes. The accepted salary can then be used to set up compensation for the employee. + + scope: `salary_estimates:write` + + + :param uuid: The UUID of the salary estimate + :param employee_job_uuid: The UUID of the employee job to associate with this salary estimate + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostV1SalaryEstimatesUUIDAcceptRequest( + x_gusto_api_version=x_gusto_api_version, + uuid=uuid, + request_body=models.PostV1SalaryEstimatesUUIDAcceptRequestBody( + employee_job_uuid=employee_job_uuid, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/salary_estimates/{uuid}/accept", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.request_body, + False, + False, + "json", + models.PostV1SalaryEstimatesUUIDAcceptRequestBody, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post-v1-salary_estimates-uuid-accept", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.SalaryEstimate, http_res) + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_v1_salary_estimates_occupations( + self, + *, + security: Union[ + models.GetV1SalaryEstimatesOccupationsSecurity, + models.GetV1SalaryEstimatesOccupationsSecurityTypedDict, + ], + search: str, + x_gusto_api_version: Optional[ + models.GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion + ] = models.GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.BLSOccupation]: + r"""Search for BLS occupations + + Search for Bureau of Labor Statistics (BLS) occupations by name or keyword. This endpoint helps users find the appropriate occupation codes to use when creating or updating salary estimates. + + Returns a list of matching occupations with their codes, titles, and descriptions. + + U0001F4D8 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: `salary_estimates:read` + + + :param security: + :param search: Search term for occupation (minimum 3 characters) + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1SalaryEstimatesOccupationsRequest( + x_gusto_api_version=x_gusto_api_version, + search=search, + ) + + req = self._build_request( + method="GET", + path="/v1/salary_estimates/occupations", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=utils.get_pydantic_model( + security, models.GetV1SalaryEstimatesOccupationsSecurity + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-salary_estimates-occupations", + oauth2_scopes=None, + security_source=get_security_from_env(security, models.Security), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.BLSOccupation], http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_salary_estimates_occupations_async( + self, + *, + security: Union[ + models.GetV1SalaryEstimatesOccupationsSecurity, + models.GetV1SalaryEstimatesOccupationsSecurityTypedDict, + ], + search: str, + x_gusto_api_version: Optional[ + models.GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion + ] = models.GetV1SalaryEstimatesOccupationsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.BLSOccupation]: + r"""Search for BLS occupations + + Search for Bureau of Labor Statistics (BLS) occupations by name or keyword. This endpoint helps users find the appropriate occupation codes to use when creating or updating salary estimates. + + Returns a list of matching occupations with their codes, titles, and descriptions. + + U0001F4D8 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: `salary_estimates:read` + + + :param security: + :param search: Search term for occupation (minimum 3 characters) + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1SalaryEstimatesOccupationsRequest( + x_gusto_api_version=x_gusto_api_version, + search=search, + ) + + req = self._build_request_async( + method="GET", + path="/v1/salary_estimates/occupations", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=utils.get_pydantic_model( + security, models.GetV1SalaryEstimatesOccupationsSecurity + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-salary_estimates-occupations", + oauth2_scopes=None, + security_source=get_security_from_env(security, models.Security), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.BLSOccupation], http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res + ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/sdk.py b/gusto_embedded/src/gusto_embedded/sdk.py index b7c89b1c..a5b4fe22 100644 --- a/gusto_embedded/src/gusto_embedded/sdk.py +++ b/gusto_embedded/src/gusto_embedded/sdk.py @@ -7,115 +7,225 @@ from .utils.retries import RetryConfig from gusto_embedded import models, utils from gusto_embedded._hooks import SDKHooks -from gusto_embedded.achtransactions import AchTransactions -from gusto_embedded.bankaccounts import BankAccounts -from gusto_embedded.companies import Companies -from gusto_embedded.companyattachment_sdk import CompanyAttachmentSDK -from gusto_embedded.companyattachments import CompanyAttachments -from gusto_embedded.companybenefits import CompanyBenefits -from gusto_embedded.companyforms import CompanyForms -from gusto_embedded.contractordocuments import ContractorDocuments -from gusto_embedded.contractorforms import ContractorForms -from gusto_embedded.contractorpaymentgroups import ContractorPaymentGroups -from gusto_embedded.contractorpaymentmethod_sdk import ContractorPaymentMethodSDK -from gusto_embedded.contractorpaymentmethods import ContractorPaymentMethods -from gusto_embedded.contractorpayments import ContractorPayments -from gusto_embedded.contractors import Contractors -from gusto_embedded.departments import Departments -from gusto_embedded.earningtypes import EarningTypes -from gusto_embedded.employeeaddresses import EmployeeAddresses -from gusto_embedded.employeebenefits import EmployeeBenefits -from gusto_embedded.employeeemployments import EmployeeEmployments -from gusto_embedded.employeeforms import EmployeeForms -from gusto_embedded.employeepaymentmethod_sdk import EmployeePaymentMethodSDK -from gusto_embedded.employeepaymentmethods import EmployeePaymentMethods -from gusto_embedded.employees import Employees -from gusto_embedded.employeetaxsetup import EmployeeTaxSetup -from gusto_embedded.events import Events -from gusto_embedded.externalpayrolls import ExternalPayrolls -from gusto_embedded.federaltaxdetails_sdk import FederalTaxDetailsSDK -from gusto_embedded.flows import Flows -from gusto_embedded.garnishments import Garnishments -from gusto_embedded.generateddocuments import GeneratedDocuments -from gusto_embedded.historicalemployees import HistoricalEmployees -from gusto_embedded.holidaypaypolicies import HolidayPayPolicies -from gusto_embedded.i9verification import I9Verification -from gusto_embedded.industryselection import IndustrySelection -from gusto_embedded.information_requests import InformationRequests -from gusto_embedded.introspection import Introspection -from gusto_embedded.invoices import Invoices -from gusto_embedded.jobsandcompensations import JobsAndCompensations -from gusto_embedded.locations import Locations -from gusto_embedded.notifications import Notifications -from gusto_embedded.paymentconfigs_sdk import PaymentConfigsSDK -from gusto_embedded.payrolls import Payrolls -from gusto_embedded.payschedules import PaySchedules -from gusto_embedded.recoverycases import RecoveryCases -from gusto_embedded.reports import Reports -from gusto_embedded.signatories import Signatories -from gusto_embedded.taxrequirements import TaxRequirements -from gusto_embedded.timeoffpolicies import TimeOffPolicies from gusto_embedded.types import OptionalNullable, UNSET -from gusto_embedded.webhooks import Webhooks -from gusto_embedded.wireinrequests import WireInRequests import httpx -from typing import Any, Callable, Dict, Optional, Union, cast +import importlib +import sys +from typing import Any, Callable, Dict, Optional, TYPE_CHECKING, Union, cast import weakref +if TYPE_CHECKING: + from gusto_embedded.achtransactions import AchTransactions + from gusto_embedded.bankaccounts import BankAccounts + from gusto_embedded.companies import Companies + from gusto_embedded.companyattachment_sdk import CompanyAttachmentSDK + from gusto_embedded.companyattachments import CompanyAttachments + from gusto_embedded.companybenefits import CompanyBenefits + from gusto_embedded.companyforms import CompanyForms + from gusto_embedded.contractordocuments import ContractorDocuments + from gusto_embedded.contractorforms import ContractorForms + from gusto_embedded.contractorpaymentgroups import ContractorPaymentGroups + from gusto_embedded.contractorpaymentmethod_sdk import ContractorPaymentMethodSDK + from gusto_embedded.contractorpaymentmethods import ContractorPaymentMethods + from gusto_embedded.contractorpayments import ContractorPayments + from gusto_embedded.contractors import Contractors + from gusto_embedded.departments import Departments + from gusto_embedded.earningtypes import EarningTypes + from gusto_embedded.employeeaddresses import EmployeeAddresses + from gusto_embedded.employeebenefits import EmployeeBenefits + from gusto_embedded.employeeemployments import EmployeeEmployments + from gusto_embedded.employeeforms import EmployeeForms + from gusto_embedded.employeepaymentmethod_sdk import EmployeePaymentMethodSDK + from gusto_embedded.employeepaymentmethods import EmployeePaymentMethods + from gusto_embedded.employees import Employees + from gusto_embedded.employeetaxsetup import EmployeeTaxSetup + from gusto_embedded.events import Events + from gusto_embedded.externalpayrolls import ExternalPayrolls + from gusto_embedded.federaltaxdetails_sdk import FederalTaxDetailsSDK + from gusto_embedded.flows import Flows + from gusto_embedded.garnishments import Garnishments + from gusto_embedded.generateddocuments import GeneratedDocuments + from gusto_embedded.historicalemployees import HistoricalEmployees + from gusto_embedded.holidaypaypolicies import HolidayPayPolicies + from gusto_embedded.i9verification import I9Verification + from gusto_embedded.industryselection import IndustrySelection + from gusto_embedded.information_requests import InformationRequests + from gusto_embedded.introspection import Introspection + from gusto_embedded.invoices import Invoices + from gusto_embedded.jobsandcompensations import JobsAndCompensations + from gusto_embedded.locations import Locations + from gusto_embedded.notifications import Notifications + from gusto_embedded.paymentconfigs_sdk import PaymentConfigsSDK + from gusto_embedded.payrolls import Payrolls + from gusto_embedded.payschedules import PaySchedules + from gusto_embedded.recoverycases import RecoveryCases + from gusto_embedded.reimbursements import Reimbursements + from gusto_embedded.reports import Reports + from gusto_embedded.salary_estimates import SalaryEstimates + from gusto_embedded.signatories import Signatories + from gusto_embedded.taxrequirements import TaxRequirements + from gusto_embedded.timeoffpolicies import TimeOffPolicies + from gusto_embedded.webhooks import Webhooks + from gusto_embedded.wireinrequests import WireInRequests + class Gusto(BaseSDK): r"""Gusto API: Welcome to Gusto's Embedded Payroll API documentation!""" - introspection: Introspection - companies: Companies - invoices: Invoices - company_attachments: CompanyAttachments - company_attachment: CompanyAttachmentSDK - federal_tax_details: FederalTaxDetailsSDK - industry_selection: IndustrySelection - signatories: Signatories - flows: Flows - locations: Locations - bank_accounts: BankAccounts - external_payrolls: ExternalPayrolls - payment_configs: PaymentConfigsSDK - pay_schedules: PaySchedules - employees: Employees - historical_employees: HistoricalEmployees - departments: Departments - employee_employments: EmployeeEmployments - employee_addresses: EmployeeAddresses - employee_tax_setup: EmployeeTaxSetup - employee_payment_method: EmployeePaymentMethodSDK - employee_payment_methods: EmployeePaymentMethods - jobs_and_compensations: JobsAndCompensations - earning_types: EarningTypes - contractors: Contractors - contractor_payment_methods: ContractorPaymentMethods - contractor_payment_method: ContractorPaymentMethodSDK - webhooks: Webhooks - contractor_forms: ContractorForms - contractor_documents: ContractorDocuments - employee_forms: EmployeeForms - payrolls: Payrolls - time_off_policies: TimeOffPolicies - contractor_payments: ContractorPayments - contractor_payment_groups: ContractorPaymentGroups - company_forms: CompanyForms - generated_documents: GeneratedDocuments - reports: Reports - company_benefits: CompanyBenefits - employee_benefits: EmployeeBenefits - garnishments: Garnishments - i9_verification: I9Verification - tax_requirements: TaxRequirements - holiday_pay_policies: HolidayPayPolicies - notifications: Notifications - events: Events - information_requests: InformationRequests - recovery_cases: RecoveryCases - ach_transactions: AchTransactions - wire_in_requests: WireInRequests + introspection: "Introspection" + companies: "Companies" + invoices: "Invoices" + company_attachments: "CompanyAttachments" + company_attachment: "CompanyAttachmentSDK" + federal_tax_details: "FederalTaxDetailsSDK" + industry_selection: "IndustrySelection" + signatories: "Signatories" + flows: "Flows" + locations: "Locations" + bank_accounts: "BankAccounts" + external_payrolls: "ExternalPayrolls" + payment_configs: "PaymentConfigsSDK" + pay_schedules: "PaySchedules" + employees: "Employees" + historical_employees: "HistoricalEmployees" + departments: "Departments" + employee_employments: "EmployeeEmployments" + employee_addresses: "EmployeeAddresses" + employee_tax_setup: "EmployeeTaxSetup" + employee_payment_method: "EmployeePaymentMethodSDK" + employee_payment_methods: "EmployeePaymentMethods" + jobs_and_compensations: "JobsAndCompensations" + earning_types: "EarningTypes" + contractors: "Contractors" + contractor_payment_methods: "ContractorPaymentMethods" + contractor_payment_method: "ContractorPaymentMethodSDK" + webhooks: "Webhooks" + contractor_forms: "ContractorForms" + contractor_documents: "ContractorDocuments" + employee_forms: "EmployeeForms" + payrolls: "Payrolls" + time_off_policies: "TimeOffPolicies" + contractor_payments: "ContractorPayments" + contractor_payment_groups: "ContractorPaymentGroups" + company_forms: "CompanyForms" + generated_documents: "GeneratedDocuments" + reports: "Reports" + company_benefits: "CompanyBenefits" + employee_benefits: "EmployeeBenefits" + garnishments: "Garnishments" + i9_verification: "I9Verification" + tax_requirements: "TaxRequirements" + holiday_pay_policies: "HolidayPayPolicies" + notifications: "Notifications" + events: "Events" + information_requests: "InformationRequests" + recovery_cases: "RecoveryCases" + ach_transactions: "AchTransactions" + wire_in_requests: "WireInRequests" + salary_estimates: "SalaryEstimates" + reimbursements: "Reimbursements" + _sub_sdk_map = { + "introspection": ("gusto_embedded.introspection", "Introspection"), + "companies": ("gusto_embedded.companies", "Companies"), + "invoices": ("gusto_embedded.invoices", "Invoices"), + "company_attachments": ( + "gusto_embedded.companyattachments", + "CompanyAttachments", + ), + "company_attachment": ( + "gusto_embedded.companyattachment_sdk", + "CompanyAttachmentSDK", + ), + "federal_tax_details": ( + "gusto_embedded.federaltaxdetails_sdk", + "FederalTaxDetailsSDK", + ), + "industry_selection": ("gusto_embedded.industryselection", "IndustrySelection"), + "signatories": ("gusto_embedded.signatories", "Signatories"), + "flows": ("gusto_embedded.flows", "Flows"), + "locations": ("gusto_embedded.locations", "Locations"), + "bank_accounts": ("gusto_embedded.bankaccounts", "BankAccounts"), + "external_payrolls": ("gusto_embedded.externalpayrolls", "ExternalPayrolls"), + "payment_configs": ("gusto_embedded.paymentconfigs_sdk", "PaymentConfigsSDK"), + "pay_schedules": ("gusto_embedded.payschedules", "PaySchedules"), + "employees": ("gusto_embedded.employees", "Employees"), + "historical_employees": ( + "gusto_embedded.historicalemployees", + "HistoricalEmployees", + ), + "departments": ("gusto_embedded.departments", "Departments"), + "employee_employments": ( + "gusto_embedded.employeeemployments", + "EmployeeEmployments", + ), + "employee_addresses": ("gusto_embedded.employeeaddresses", "EmployeeAddresses"), + "employee_tax_setup": ("gusto_embedded.employeetaxsetup", "EmployeeTaxSetup"), + "employee_payment_method": ( + "gusto_embedded.employeepaymentmethod_sdk", + "EmployeePaymentMethodSDK", + ), + "employee_payment_methods": ( + "gusto_embedded.employeepaymentmethods", + "EmployeePaymentMethods", + ), + "jobs_and_compensations": ( + "gusto_embedded.jobsandcompensations", + "JobsAndCompensations", + ), + "earning_types": ("gusto_embedded.earningtypes", "EarningTypes"), + "contractors": ("gusto_embedded.contractors", "Contractors"), + "contractor_payment_methods": ( + "gusto_embedded.contractorpaymentmethods", + "ContractorPaymentMethods", + ), + "contractor_payment_method": ( + "gusto_embedded.contractorpaymentmethod_sdk", + "ContractorPaymentMethodSDK", + ), + "webhooks": ("gusto_embedded.webhooks", "Webhooks"), + "contractor_forms": ("gusto_embedded.contractorforms", "ContractorForms"), + "contractor_documents": ( + "gusto_embedded.contractordocuments", + "ContractorDocuments", + ), + "employee_forms": ("gusto_embedded.employeeforms", "EmployeeForms"), + "payrolls": ("gusto_embedded.payrolls", "Payrolls"), + "time_off_policies": ("gusto_embedded.timeoffpolicies", "TimeOffPolicies"), + "contractor_payments": ( + "gusto_embedded.contractorpayments", + "ContractorPayments", + ), + "contractor_payment_groups": ( + "gusto_embedded.contractorpaymentgroups", + "ContractorPaymentGroups", + ), + "company_forms": ("gusto_embedded.companyforms", "CompanyForms"), + "generated_documents": ( + "gusto_embedded.generateddocuments", + "GeneratedDocuments", + ), + "reports": ("gusto_embedded.reports", "Reports"), + "company_benefits": ("gusto_embedded.companybenefits", "CompanyBenefits"), + "employee_benefits": ("gusto_embedded.employeebenefits", "EmployeeBenefits"), + "garnishments": ("gusto_embedded.garnishments", "Garnishments"), + "i9_verification": ("gusto_embedded.i9verification", "I9Verification"), + "tax_requirements": ("gusto_embedded.taxrequirements", "TaxRequirements"), + "holiday_pay_policies": ( + "gusto_embedded.holidaypaypolicies", + "HolidayPayPolicies", + ), + "notifications": ("gusto_embedded.notifications", "Notifications"), + "events": ("gusto_embedded.events", "Events"), + "information_requests": ( + "gusto_embedded.information_requests", + "InformationRequests", + ), + "recovery_cases": ("gusto_embedded.recoverycases", "RecoveryCases"), + "ach_transactions": ("gusto_embedded.achtransactions", "AchTransactions"), + "wire_in_requests": ("gusto_embedded.wireinrequests", "WireInRequests"), + "salary_estimates": ("gusto_embedded.salary_estimates", "SalaryEstimates"), + "reimbursements": ("gusto_embedded.reimbursements", "Reimbursements"), + } def __init__( self, @@ -144,7 +254,7 @@ def __init__( """ client_supplied = True if client is None: - client = httpx.Client() + client = httpx.Client(follow_redirects=True) client_supplied = False assert issubclass( @@ -153,7 +263,7 @@ def __init__( async_client_supplied = True if async_client is None: - async_client = httpx.AsyncClient() + async_client = httpx.AsyncClient(follow_redirects=True) async_client_supplied = False if debug_logger is None: @@ -190,10 +300,14 @@ def __init__( timeout_ms=timeout_ms, debug_logger=debug_logger, ), + parent_ref=self, ) hooks = SDKHooks() + # pylint: disable=protected-access + self.sdk_configuration.__dict__["_hooks"] = hooks + current_server_url, *_ = self.sdk_configuration.get_server_details() server_url, self.sdk_configuration.client = hooks.sdk_init( current_server_url, client @@ -201,9 +315,6 @@ def __init__( if current_server_url != server_url: self.sdk_configuration.server_url = server_url - # pylint: disable=protected-access - self.sdk_configuration.__dict__["_hooks"] = hooks - weakref.finalize( self, close_clients, @@ -214,63 +325,43 @@ def __init__( self.sdk_configuration.async_client_supplied, ) - self._init_sdks() + def dynamic_import(self, modname, retries=3): + for attempt in range(retries): + try: + return importlib.import_module(modname) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") - def _init_sdks(self): - self.introspection = Introspection(self.sdk_configuration) - self.companies = Companies(self.sdk_configuration) - self.invoices = Invoices(self.sdk_configuration) - self.company_attachments = CompanyAttachments(self.sdk_configuration) - self.company_attachment = CompanyAttachmentSDK(self.sdk_configuration) - self.federal_tax_details = FederalTaxDetailsSDK(self.sdk_configuration) - self.industry_selection = IndustrySelection(self.sdk_configuration) - self.signatories = Signatories(self.sdk_configuration) - self.flows = Flows(self.sdk_configuration) - self.locations = Locations(self.sdk_configuration) - self.bank_accounts = BankAccounts(self.sdk_configuration) - self.external_payrolls = ExternalPayrolls(self.sdk_configuration) - self.payment_configs = PaymentConfigsSDK(self.sdk_configuration) - self.pay_schedules = PaySchedules(self.sdk_configuration) - self.employees = Employees(self.sdk_configuration) - self.historical_employees = HistoricalEmployees(self.sdk_configuration) - self.departments = Departments(self.sdk_configuration) - self.employee_employments = EmployeeEmployments(self.sdk_configuration) - self.employee_addresses = EmployeeAddresses(self.sdk_configuration) - self.employee_tax_setup = EmployeeTaxSetup(self.sdk_configuration) - self.employee_payment_method = EmployeePaymentMethodSDK(self.sdk_configuration) - self.employee_payment_methods = EmployeePaymentMethods(self.sdk_configuration) - self.jobs_and_compensations = JobsAndCompensations(self.sdk_configuration) - self.earning_types = EarningTypes(self.sdk_configuration) - self.contractors = Contractors(self.sdk_configuration) - self.contractor_payment_methods = ContractorPaymentMethods( - self.sdk_configuration - ) - self.contractor_payment_method = ContractorPaymentMethodSDK( - self.sdk_configuration + def __getattr__(self, name: str): + if name in self._sub_sdk_map: + module_path, class_name = self._sub_sdk_map[name] + try: + module = self.dynamic_import(module_path) + klass = getattr(module, class_name) + instance = klass(self.sdk_configuration, parent_ref=self) + setattr(self, name, instance) + return instance + except ImportError as e: + raise AttributeError( + f"Failed to import module {module_path} for attribute {name}: {e}" + ) from e + except AttributeError as e: + raise AttributeError( + f"Failed to find class {class_name} in module {module_path} for attribute {name}: {e}" + ) from e + + raise AttributeError( + f"'{type(self).__name__}' object has no attribute '{name}'" ) - self.webhooks = Webhooks(self.sdk_configuration) - self.contractor_forms = ContractorForms(self.sdk_configuration) - self.contractor_documents = ContractorDocuments(self.sdk_configuration) - self.employee_forms = EmployeeForms(self.sdk_configuration) - self.payrolls = Payrolls(self.sdk_configuration) - self.time_off_policies = TimeOffPolicies(self.sdk_configuration) - self.contractor_payments = ContractorPayments(self.sdk_configuration) - self.contractor_payment_groups = ContractorPaymentGroups(self.sdk_configuration) - self.company_forms = CompanyForms(self.sdk_configuration) - self.generated_documents = GeneratedDocuments(self.sdk_configuration) - self.reports = Reports(self.sdk_configuration) - self.company_benefits = CompanyBenefits(self.sdk_configuration) - self.employee_benefits = EmployeeBenefits(self.sdk_configuration) - self.garnishments = Garnishments(self.sdk_configuration) - self.i9_verification = I9Verification(self.sdk_configuration) - self.tax_requirements = TaxRequirements(self.sdk_configuration) - self.holiday_pay_policies = HolidayPayPolicies(self.sdk_configuration) - self.notifications = Notifications(self.sdk_configuration) - self.events = Events(self.sdk_configuration) - self.information_requests = InformationRequests(self.sdk_configuration) - self.recovery_cases = RecoveryCases(self.sdk_configuration) - self.ach_transactions = AchTransactions(self.sdk_configuration) - self.wire_in_requests = WireInRequests(self.sdk_configuration) + + def __dir__(self): + default_attrs = list(super().__dir__()) + lazy_attrs = list(self._sub_sdk_map.keys()) + return sorted(list(set(default_attrs + lazy_attrs))) def __enter__(self): return self diff --git a/gusto_embedded/src/gusto_embedded/sdkconfiguration.py b/gusto_embedded/src/gusto_embedded/sdkconfiguration.py index ae0db94f..b38f08e2 100644 --- a/gusto_embedded/src/gusto_embedded/sdkconfiguration.py +++ b/gusto_embedded/src/gusto_embedded/sdkconfiguration.py @@ -1,6 +1,5 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from ._hooks import SDKHooks from ._version import ( __gen_version__, __openapi_doc_version__, @@ -45,9 +44,6 @@ class SDKConfiguration: retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None - def __post_init__(self): - self._hooks = SDKHooks() - def get_server_details(self) -> Tuple[str, Dict[str, str]]: if self.server_url is not None and self.server_url: return remove_suffix(self.server_url, "/"), {} @@ -58,6 +54,3 @@ def get_server_details(self) -> Tuple[str, Dict[str, str]]: raise ValueError(f'Invalid server "{self.server}"') return SERVERS[self.server], {} - - def get_hooks(self) -> SDKHooks: - return self._hooks diff --git a/gusto_embedded/src/gusto_embedded/signatories.py b/gusto_embedded/src/gusto_embedded/signatories.py index bab9b25b..fe282c38 100644 --- a/gusto_embedded/src/gusto_embedded/signatories.py +++ b/gusto_embedded/src/gusto_embedded/signatories.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -118,9 +119,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-company-signatories", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -132,31 +134,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Signatory) + return unmarshal_json_response(models.Signatory, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -267,9 +258,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-company-signatories", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -281,31 +273,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Signatory) + return unmarshal_json_response(models.Signatory, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list( self, @@ -373,9 +354,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_uuid-signatories", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -386,26 +368,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Signatory]) + return unmarshal_json_response(List[models.Signatory], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -473,9 +444,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_uuid-signatories", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -486,26 +458,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.Signatory]) + return unmarshal_json_response(List[models.Signatory], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def invite( self, @@ -592,9 +553,10 @@ def invite( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_uuid-signatories-invite", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -606,31 +568,20 @@ def invite( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Signatory) + return unmarshal_json_response(models.Signatory, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def invite_async( self, @@ -717,9 +668,10 @@ async def invite_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-companies-company_uuid-signatories-invite", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -731,31 +683,20 @@ async def invite_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Signatory) + return unmarshal_json_response(models.Signatory, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, @@ -872,9 +813,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_uuid-signatories-signatory_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -886,31 +828,20 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Signatory) + return unmarshal_json_response(models.Signatory, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, @@ -1027,9 +958,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_uuid-signatories-signatory_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1041,31 +973,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.Signatory) + return unmarshal_json_response(models.Signatory, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete( self, @@ -1136,9 +1057,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-companies-company_uuid-signatories-signatory_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1152,23 +1074,12 @@ def delete( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_async( self, @@ -1239,9 +1150,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-companies-company_uuid-signatories-signatory_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1255,20 +1167,9 @@ async def delete_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/suspensions.py b/gusto_embedded/src/gusto_embedded/suspensions.py index a1779714..841f237e 100644 --- a/gusto_embedded/src/gusto_embedded/suspensions.py +++ b/gusto_embedded/src/gusto_embedded/suspensions.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -14,8 +15,8 @@ def get( *, company_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion + ] = models.GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -25,12 +26,13 @@ def get( Get existing suspension records for this company. A company may have multiple suspension records if they have suspended their Gusto account more than once. - > 📘 To check if company is already suspended + >📘 To check if company is already suspended > > To determine if a company is _currently_ suspended, use the `is_suspended` and `company_status` fields in the [Get a company](https://docs.gusto.com/embedded-payroll/reference/get-v1-companies) endpoint. scope: `company_suspensions:read` + :param company_uuid: The UUID of the company :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -49,8 +51,8 @@ def get( base_url = self._get_url(base_url, url_variables) request = models.GetCompaniesCompanyUUIDSuspensionsRequest( - company_uuid=company_uuid, x_gusto_api_version=x_gusto_api_version, + company_uuid=company_uuid, ) req = self._build_request( @@ -79,9 +81,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-suspensions", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -91,35 +94,30 @@ def get( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.CompanySuspension]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.CompanySuspension], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, *, company_uuid: str, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion + ] = models.GetCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -129,12 +127,13 @@ async def get_async( Get existing suspension records for this company. A company may have multiple suspension records if they have suspended their Gusto account more than once. - > 📘 To check if company is already suspended + >📘 To check if company is already suspended > > To determine if a company is _currently_ suspended, use the `is_suspended` and `company_status` fields in the [Get a company](https://docs.gusto.com/embedded-payroll/reference/get-v1-companies) endpoint. scope: `company_suspensions:read` + :param company_uuid: The UUID of the company :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param retries: Override the default retry configuration for this method @@ -153,8 +152,8 @@ async def get_async( base_url = self._get_url(base_url, url_variables) request = models.GetCompaniesCompanyUUIDSuspensionsRequest( - company_uuid=company_uuid, x_gusto_api_version=x_gusto_api_version, + company_uuid=company_uuid, ) req = self._build_request_async( @@ -183,9 +182,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-suspensions", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -195,27 +195,22 @@ async def get_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.CompanySuspension]) - if utils.match_response(http_res, ["404", "4XX"], "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res + return unmarshal_json_response(List[models.CompanySuspension], http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) + raise models.UnprocessableEntityErrorObject(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def suspend( self, @@ -226,8 +221,8 @@ def suspend( reconcile_tax_method: models.PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod, reason: models.Reason, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion + ] = models.PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, comments: Optional[str] = None, leaving_for: Optional[models.LeavingFor] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -241,14 +236,15 @@ def suspend( scope: `company_suspensions:write` + :param company_uuid: The UUID of the company :param file_quarterly_forms: Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. :param file_yearly_forms: Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. :param reconcile_tax_method: How Gusto will handle taxes already collected. - :param reason: Explanation for why the company is suspending their account. > 🚧 FEIN or entity type changes require Customer Support > > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time. + :param reason: Explanation for why the company is suspending their account. > 🚧 FEIN or entity type changes require Customer Support > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param comments: User-supplied comments describing why they are suspending their account. - :param leaving_for: Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`. + :param comments: User-supplied comments describing why they are suspending their account. Required if the user is leaving for another provider and selects \"other\" instead of a defined provider. + :param leaving_for: The competitor the company is switching to. Required if `reason` is `'switching_provider'`. > 🚧 Switching to Gusto requires Customer Support > If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -265,8 +261,8 @@ def suspend( base_url = self._get_url(base_url, url_variables) request = models.PostCompaniesCompanyUUIDSuspensionsRequest( - company_uuid=company_uuid, x_gusto_api_version=x_gusto_api_version, + company_uuid=company_uuid, request_body=models.PostCompaniesCompanyUUIDSuspensionsRequestBody( file_quarterly_forms=file_quarterly_forms, file_yearly_forms=file_yearly_forms, @@ -310,9 +306,10 @@ def suspend( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-companies-company_uuid-suspensions", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -324,31 +321,20 @@ def suspend( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanySuspension) + return unmarshal_json_response(models.CompanySuspension, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.CompanySuspensionCreationErrorsErrorData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.CompanySuspensionCreationErrorsError(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def suspend_async( self, @@ -359,8 +345,8 @@ async def suspend_async( reconcile_tax_method: models.PostCompaniesCompanyUUIDSuspensionsReconcileTaxMethod, reason: models.Reason, x_gusto_api_version: Optional[ - models.VersionHeader - ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + models.PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion + ] = models.PostCompaniesCompanyUUIDSuspensionsHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, comments: Optional[str] = None, leaving_for: Optional[models.LeavingFor] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -374,14 +360,15 @@ async def suspend_async( scope: `company_suspensions:write` + :param company_uuid: The UUID of the company :param file_quarterly_forms: Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. :param file_yearly_forms: Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled. :param reconcile_tax_method: How Gusto will handle taxes already collected. - :param reason: Explanation for why the company is suspending their account. > 🚧 FEIN or entity type changes require Customer Support > > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time. + :param reason: Explanation for why the company is suspending their account. > 🚧 FEIN or entity type changes require Customer Support > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. - :param comments: User-supplied comments describing why they are suspending their account. - :param leaving_for: Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`. + :param comments: User-supplied comments describing why they are suspending their account. Required if the user is leaving for another provider and selects \"other\" instead of a defined provider. + :param leaving_for: The competitor the company is switching to. Required if `reason` is `'switching_provider'`. > 🚧 Switching to Gusto requires Customer Support > If `'gusto_com'` is selected, this change must be completed by Gusto Customer Support and cannot be performed via the API. This endpoint will return a 422 error in that case. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -398,8 +385,8 @@ async def suspend_async( base_url = self._get_url(base_url, url_variables) request = models.PostCompaniesCompanyUUIDSuspensionsRequest( - company_uuid=company_uuid, x_gusto_api_version=x_gusto_api_version, + company_uuid=company_uuid, request_body=models.PostCompaniesCompanyUUIDSuspensionsRequestBody( file_quarterly_forms=file_quarterly_forms, file_yearly_forms=file_yearly_forms, @@ -443,9 +430,10 @@ async def suspend_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-companies-company_uuid-suspensions", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -457,28 +445,17 @@ async def suspend_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.CompanySuspension) + return unmarshal_json_response(models.CompanySuspension, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.CompanySuspensionCreationErrorsErrorData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.CompanySuspensionCreationErrorsError(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/taxrequirements.py b/gusto_embedded/src/gusto_embedded/taxrequirements.py index 062345fb..b62c5d02 100644 --- a/gusto_embedded/src/gusto_embedded/taxrequirements.py +++ b/gusto_embedded/src/gusto_embedded/taxrequirements.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -121,9 +122,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_uuid-tax_requirements-state", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -134,26 +136,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TaxRequirementsState) + return unmarshal_json_response(models.TaxRequirementsState, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -267,9 +258,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_uuid-tax_requirements-state", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -280,26 +272,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TaxRequirementsState) + return unmarshal_json_response(models.TaxRequirementsState, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_state( self, @@ -386,9 +367,10 @@ def update_state( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_uuid-tax_requirements-state", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -402,29 +384,18 @@ def update_state( if utils.match_response(http_res, "200", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_state_async( self, @@ -511,9 +482,10 @@ async def update_state_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-companies-company_uuid-tax_requirements-state", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -527,29 +499,18 @@ async def update_state_async( if utils.match_response(http_res, "200", "*"): return if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_all( self, @@ -617,9 +578,10 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_uuid-tax_requirements", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -630,26 +592,15 @@ def get_all( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.ResponseBody]) + return unmarshal_json_response(List[models.ResponseBody], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_all_async( self, @@ -717,9 +668,10 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-companies-company_uuid-tax_requirements", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -730,23 +682,12 @@ async def get_all_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.ResponseBody]) + return unmarshal_json_response(List[models.ResponseBody], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/timeoffpolicies.py b/gusto_embedded/src/gusto_embedded/timeoffpolicies.py index ef70ed7f..880ea2c1 100644 --- a/gusto_embedded/src/gusto_embedded/timeoffpolicies.py +++ b/gusto_embedded/src/gusto_embedded/timeoffpolicies.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -110,9 +111,10 @@ def calculate_accruing_time_off_hours( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-payrolls-payroll_id-calculate_accruing_time_off_hours", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -124,31 +126,20 @@ def calculate_accruing_time_off_hours( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.AccruingTimeOffHourObject) + return unmarshal_json_response(models.AccruingTimeOffHourObject, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def calculate_accruing_time_off_hours_async( self, @@ -251,9 +242,10 @@ async def calculate_accruing_time_off_hours_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-payrolls-payroll_id-calculate_accruing_time_off_hours", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -265,31 +257,20 @@ async def calculate_accruing_time_off_hours_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.AccruingTimeOffHourObject) + return unmarshal_json_response(models.AccruingTimeOffHourObject, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get( self, @@ -357,9 +338,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-time_off_policies-time_off_policy_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -370,26 +352,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -457,9 +428,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-time_off_policies-time_off_policy_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -470,31 +442,21 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update( self, *, time_off_policy_uuid: str, + version: str, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -519,6 +481,7 @@ def update( scope: `time_off_policies:write` :param time_off_policy_uuid: The UUID of the company time off policy + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/api-fundamentals#optimistic-version-control) for information on how to use this field. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param name: Name of the time off policy :param accrual_method: Accrual method of the time off policy @@ -557,6 +520,7 @@ def update( carryover_limit_hours=carryover_limit_hours, max_accrual_hours_per_year=max_accrual_hours_per_year, max_hours=max_hours, + version=version, ), ) @@ -593,9 +557,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-time_off_policies-time_off_policy_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -607,36 +572,26 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_async( self, *, time_off_policy_uuid: str, + version: str, x_gusto_api_version: Optional[ models.VersionHeader ] = models.VersionHeader.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, @@ -661,6 +616,7 @@ async def update_async( scope: `time_off_policies:write` :param time_off_policy_uuid: The UUID of the company time off policy + :param version: The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/api-fundamentals#optimistic-version-control) for information on how to use this field. :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. :param name: Name of the time off policy :param accrual_method: Accrual method of the time off policy @@ -699,6 +655,7 @@ async def update_async( carryover_limit_hours=carryover_limit_hours, max_accrual_hours_per_year=max_accrual_hours_per_year, max_hours=max_hours, + version=version, ), ) @@ -735,9 +692,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-time_off_policies-time_off_policy_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -749,31 +707,20 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_all( self, @@ -841,9 +788,10 @@ def get_all( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-time_off_policies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -854,26 +802,15 @@ def get_all( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.TimeOffPolicy]) + return unmarshal_json_response(List[models.TimeOffPolicy], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_all_async( self, @@ -941,9 +878,10 @@ async def get_all_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-time_off_policies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -954,26 +892,15 @@ async def get_all_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.TimeOffPolicy]) + return unmarshal_json_response(List[models.TimeOffPolicy], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def create( self, @@ -1080,9 +1007,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-companies-company_uuid-time_off_policies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1094,31 +1022,20 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_async( self, @@ -1225,9 +1142,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-companies-company_uuid-time_off_policies", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1239,31 +1157,20 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def add_employees( self, @@ -1359,9 +1266,10 @@ def add_employees( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-version-time_off_policies-time_off_policy_uuid-add_employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1373,31 +1281,20 @@ def add_employees( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def add_employees_async( self, @@ -1493,9 +1390,10 @@ async def add_employees_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-version-time_off_policies-time_off_policy_uuid-add_employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1507,31 +1405,20 @@ async def add_employees_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def remove_employees( self, @@ -1627,9 +1514,10 @@ def remove_employees( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-time_off_policies-time_off_policy_uuid-remove_employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1641,31 +1529,20 @@ def remove_employees( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def remove_employees_async( self, @@ -1761,9 +1638,10 @@ async def remove_employees_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-time_off_policies-time_off_policy_uuid-remove_employees", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1775,31 +1653,20 @@ async def remove_employees_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_balance( self, @@ -1893,9 +1760,10 @@ def update_balance( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-version-time_off_policies-time_off_policy_uuid-balance", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -1907,31 +1775,20 @@ def update_balance( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_balance_async( self, @@ -2025,9 +1882,10 @@ async def update_balance_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-version-time_off_policies-time_off_policy_uuid-balance", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2039,31 +1897,20 @@ async def update_balance_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def deactivate( self, @@ -2131,9 +1978,10 @@ def deactivate( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-time_off_policies-time_off_policy_uuid-deactivate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2145,31 +1993,20 @@ def deactivate( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def deactivate_async( self, @@ -2237,9 +2074,10 @@ async def deactivate_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-time_off_policies-time_off_policy_uuid-deactivate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -2251,28 +2089,17 @@ async def deactivate_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.TimeOffPolicy) + return unmarshal_json_response(models.TimeOffPolicy, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/utils/__init__.py b/gusto_embedded/src/gusto_embedded/utils/__init__.py index 94dd31a9..87192dde 100644 --- a/gusto_embedded/src/gusto_embedded/utils/__init__.py +++ b/gusto_embedded/src/gusto_embedded/utils/__init__.py @@ -1,52 +1,58 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from .annotations import get_discriminator -from .datetimes import parse_datetime -from .enums import OpenEnumMeta -from .headers import get_headers, get_response_headers -from .metadata import ( - FieldMetadata, - find_metadata, - FormMetadata, - HeaderMetadata, - MultipartFormMetadata, - PathParamMetadata, - QueryParamMetadata, - RequestMetadata, - SecurityMetadata, -) -from .queryparams import get_query_params -from .retries import BackoffStrategy, Retries, retry, retry_async, RetryConfig -from .requestbodies import serialize_request_body, SerializedRequestBody -from .security import get_security, get_security_from_env +from typing import TYPE_CHECKING +from importlib import import_module +import builtins +import sys -from .serializers import ( - get_pydantic_model, - marshal_json, - unmarshal, - unmarshal_json, - serialize_decimal, - serialize_float, - serialize_int, - stream_to_text, - stream_to_text_async, - stream_to_bytes, - stream_to_bytes_async, - validate_const, - validate_decimal, - validate_float, - validate_int, - validate_open_enum, -) -from .url import generate_url, template_url, remove_suffix -from .values import ( - get_global_from_env, - match_content_type, - match_status_codes, - match_response, - cast_partial, -) -from .logger import Logger, get_body_content, get_default_logger +if TYPE_CHECKING: + from .annotations import get_discriminator + from .datetimes import parse_datetime + from .enums import OpenEnumMeta + from .headers import get_headers, get_response_headers + from .metadata import ( + FieldMetadata, + find_metadata, + FormMetadata, + HeaderMetadata, + MultipartFormMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, + SecurityMetadata, + ) + from .queryparams import get_query_params + from .retries import BackoffStrategy, Retries, retry, retry_async, RetryConfig + from .requestbodies import serialize_request_body, SerializedRequestBody + from .security import get_security, get_security_from_env + + from .serializers import ( + get_pydantic_model, + marshal_json, + unmarshal, + unmarshal_json, + serialize_decimal, + serialize_float, + serialize_int, + stream_to_text, + stream_to_text_async, + stream_to_bytes, + stream_to_bytes_async, + validate_const, + validate_decimal, + validate_float, + validate_int, + validate_open_enum, + ) + from .url import generate_url, template_url, remove_suffix + from .values import ( + get_global_from_env, + match_content_type, + match_status_codes, + match_response, + cast_partial, + ) + from .logger import Logger, get_body_content, get_default_logger __all__ = [ "BackoffStrategy", @@ -57,6 +63,7 @@ "get_body_content", "get_default_logger", "get_discriminator", + "parse_datetime", "get_global_from_env", "get_headers", "get_pydantic_model", @@ -100,3 +107,94 @@ "validate_open_enum", "cast_partial", ] + +_dynamic_imports: dict[str, str] = { + "BackoffStrategy": ".retries", + "FieldMetadata": ".metadata", + "find_metadata": ".metadata", + "FormMetadata": ".metadata", + "generate_url": ".url", + "get_body_content": ".logger", + "get_default_logger": ".logger", + "get_discriminator": ".annotations", + "parse_datetime": ".datetimes", + "get_global_from_env": ".values", + "get_headers": ".headers", + "get_pydantic_model": ".serializers", + "get_query_params": ".queryparams", + "get_response_headers": ".headers", + "get_security": ".security", + "get_security_from_env": ".security", + "HeaderMetadata": ".metadata", + "Logger": ".logger", + "marshal_json": ".serializers", + "match_content_type": ".values", + "match_status_codes": ".values", + "match_response": ".values", + "MultipartFormMetadata": ".metadata", + "OpenEnumMeta": ".enums", + "PathParamMetadata": ".metadata", + "QueryParamMetadata": ".metadata", + "remove_suffix": ".url", + "Retries": ".retries", + "retry": ".retries", + "retry_async": ".retries", + "RetryConfig": ".retries", + "RequestMetadata": ".metadata", + "SecurityMetadata": ".metadata", + "serialize_decimal": ".serializers", + "serialize_float": ".serializers", + "serialize_int": ".serializers", + "serialize_request_body": ".requestbodies", + "SerializedRequestBody": ".requestbodies", + "stream_to_text": ".serializers", + "stream_to_text_async": ".serializers", + "stream_to_bytes": ".serializers", + "stream_to_bytes_async": ".serializers", + "template_url": ".url", + "unmarshal": ".serializers", + "unmarshal_json": ".serializers", + "validate_decimal": ".serializers", + "validate_const": ".serializers", + "validate_float": ".serializers", + "validate_int": ".serializers", + "validate_open_enum": ".serializers", + "cast_partial": ".values", +} + + +def dynamic_import(modname, retries=3): + for attempt in range(retries): + try: + return import_module(modname, __package__) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + +def __getattr__(attr_name: str) -> object: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError( + f"no {attr_name} found in _dynamic_imports, module name -> {__name__} " + ) + + try: + module = dynamic_import(module_name) + return getattr(module, attr_name) + except ImportError as e: + raise ImportError( + f"Failed to import {attr_name} from {module_name}: {e}" + ) from e + except AttributeError as e: + raise AttributeError( + f"Failed to get {attr_name} from {module_name}: {e}" + ) from e + + +def __dir__(): + lazy_attrs = builtins.list(_dynamic_imports.keys()) + return builtins.sorted(lazy_attrs) diff --git a/gusto_embedded/src/gusto_embedded/utils/annotations.py b/gusto_embedded/src/gusto_embedded/utils/annotations.py index 387874ed..12e0aa4f 100644 --- a/gusto_embedded/src/gusto_embedded/utils/annotations.py +++ b/gusto_embedded/src/gusto_embedded/utils/annotations.py @@ -3,6 +3,7 @@ from enum import Enum from typing import Any, Optional + def get_discriminator(model: Any, fieldname: str, key: str) -> str: """ Recursively search for the discriminator attribute in a model. @@ -25,31 +26,54 @@ def get_field_discriminator(field: Any) -> Optional[str]: if isinstance(field, dict): if key in field: - return f'{field[key]}' + return f"{field[key]}" if hasattr(field, fieldname): attr = getattr(field, fieldname) if isinstance(attr, Enum): - return f'{attr.value}' - return f'{attr}' + return f"{attr.value}" + return f"{attr}" if hasattr(field, upper_fieldname): attr = getattr(field, upper_fieldname) if isinstance(attr, Enum): - return f'{attr.value}' - return f'{attr}' + return f"{attr.value}" + return f"{attr}" return None + def search_nested_discriminator(obj: Any) -> Optional[str]: + """Recursively search for discriminator in nested structures.""" + # First try direct field lookup + discriminator = get_field_discriminator(obj) + if discriminator is not None: + return discriminator + + # If it's a dict, search in nested values + if isinstance(obj, dict): + for value in obj.values(): + if isinstance(value, list): + # Search in list items + for item in value: + nested_discriminator = search_nested_discriminator(item) + if nested_discriminator is not None: + return nested_discriminator + elif isinstance(value, dict): + # Search in nested dict + nested_discriminator = search_nested_discriminator(value) + if nested_discriminator is not None: + return nested_discriminator + + return None if isinstance(model, list): for field in model: - discriminator = get_field_discriminator(field) + discriminator = search_nested_discriminator(field) if discriminator is not None: return discriminator - discriminator = get_field_discriminator(model) + discriminator = search_nested_discriminator(model) if discriminator is not None: return discriminator - raise ValueError(f'Could not find discriminator field {fieldname} in {model}') + raise ValueError(f"Could not find discriminator field {fieldname} in {model}") diff --git a/gusto_embedded/src/gusto_embedded/utils/eventstreaming.py b/gusto_embedded/src/gusto_embedded/utils/eventstreaming.py index 74a63f75..0969899b 100644 --- a/gusto_embedded/src/gusto_embedded/utils/eventstreaming.py +++ b/gusto_embedded/src/gusto_embedded/utils/eventstreaming.py @@ -17,6 +17,9 @@ class EventStream(Generic[T]): + # Holds a reference to the SDK client to avoid it being garbage collected + # and cause termination of the underlying httpx client. + client_ref: Optional[object] response: httpx.Response generator: Generator[T, None, None] @@ -25,9 +28,11 @@ def __init__( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + client_ref: Optional[object] = None, ): self.response = response self.generator = stream_events(response, decoder, sentinel) + self.client_ref = client_ref def __iter__(self): return self @@ -43,6 +48,9 @@ def __exit__(self, exc_type, exc_val, exc_tb): class EventStreamAsync(Generic[T]): + # Holds a reference to the SDK client to avoid it being garbage collected + # and cause termination of the underlying httpx client. + client_ref: Optional[object] response: httpx.Response generator: AsyncGenerator[T, None] @@ -51,9 +59,11 @@ def __init__( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + client_ref: Optional[object] = None, ): self.response = response self.generator = stream_events_async(response, decoder, sentinel) + self.client_ref = client_ref def __aiter__(self): return self diff --git a/gusto_embedded/src/gusto_embedded/utils/forms.py b/gusto_embedded/src/gusto_embedded/utils/forms.py index 0472aba8..e873495f 100644 --- a/gusto_embedded/src/gusto_embedded/utils/forms.py +++ b/gusto_embedded/src/gusto_embedded/utils/forms.py @@ -86,11 +86,39 @@ def _populate_form( return form +def _extract_file_properties(file_obj: Any) -> Tuple[str, Any, Any]: + """Extract file name, content, and content type from a file object.""" + file_fields: Dict[str, FieldInfo] = file_obj.__class__.model_fields + + file_name = "" + content = None + content_type = None + + for file_field_name in file_fields: + file_field = file_fields[file_field_name] + + file_metadata = find_field_metadata(file_field, MultipartFormMetadata) + if file_metadata is None: + continue + + if file_metadata.content: + content = getattr(file_obj, file_field_name, None) + elif file_field_name == "content_type": + content_type = getattr(file_obj, file_field_name, None) + else: + file_name = getattr(file_obj, file_field_name) + + if file_name == "" or content is None: + raise ValueError("invalid multipart/form-data file") + + return file_name, content, content_type + + def serialize_multipart_form( media_type: str, request: Any -) -> Tuple[str, Dict[str, Any], Dict[str, Any]]: +) -> Tuple[str, Dict[str, Any], List[Tuple[str, Any]]]: form: Dict[str, Any] = {} - files: Dict[str, Any] = {} + files: List[Tuple[str, Any]] = [] if not isinstance(request, BaseModel): raise TypeError("invalid request body type") @@ -112,39 +140,32 @@ def serialize_multipart_form( f_name = field.alias if field.alias else name if field_metadata.file: - file_fields: Dict[str, FieldInfo] = val.__class__.model_fields - - file_name = "" - content = None - content_type = None - - for file_field_name in file_fields: - file_field = file_fields[file_field_name] + if isinstance(val, List): + # Handle array of files + for file_obj in val: + if not _is_set(file_obj): + continue + + file_name, content, content_type = _extract_file_properties(file_obj) - file_metadata = find_field_metadata(file_field, MultipartFormMetadata) - if file_metadata is None: - continue + if content_type is not None: + files.append((f_name + "[]", (file_name, content, content_type))) + else: + files.append((f_name + "[]", (file_name, content))) + else: + # Handle single file + file_name, content, content_type = _extract_file_properties(val) - if file_metadata.content: - content = getattr(val, file_field_name, None) - elif file_field_name == "content_type": - content_type = getattr(val, file_field_name, None) + if content_type is not None: + files.append((f_name, (file_name, content, content_type))) else: - file_name = getattr(val, file_field_name) - - if file_name == "" or content is None: - raise ValueError("invalid multipart/form-data file") - - if content_type is not None: - files[f_name] = (file_name, content, content_type) - else: - files[f_name] = (file_name, content) + files.append((f_name, (file_name, content))) elif field_metadata.json: - files[f_name] = ( + files.append((f_name, ( None, marshal_json(val, request_field_types[name]), "application/json", - ) + ))) else: if isinstance(val, List): values = [] diff --git a/gusto_embedded/src/gusto_embedded/utils/serializers.py b/gusto_embedded/src/gusto_embedded/utils/serializers.py index 76e44d71..378a14c0 100644 --- a/gusto_embedded/src/gusto_embedded/utils/serializers.py +++ b/gusto_embedded/src/gusto_embedded/utils/serializers.py @@ -192,7 +192,9 @@ def is_union(obj: object) -> bool: """ Returns True if the given object is a typing.Union or typing_extensions.Union. """ - return any(obj is typing_obj for typing_obj in _get_typing_objects_by_name_of("Union")) + return any( + obj is typing_obj for typing_obj in _get_typing_objects_by_name_of("Union") + ) def stream_to_text(stream: httpx.Response) -> str: @@ -245,4 +247,3 @@ def _get_typing_objects_by_name_of(name: str) -> Tuple[Any, ...]: f"Neither typing nor typing_extensions has an object called {name!r}" ) return result - diff --git a/gusto_embedded/src/gusto_embedded/utils/unmarshal_json_response.py b/gusto_embedded/src/gusto_embedded/utils/unmarshal_json_response.py new file mode 100644 index 00000000..8108160c --- /dev/null +++ b/gusto_embedded/src/gusto_embedded/utils/unmarshal_json_response.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from typing import Any, Optional + +import httpx + +from .serializers import unmarshal_json +from gusto_embedded import models + + +def unmarshal_json_response( + typ: Any, http_res: httpx.Response, body: Optional[str] = None +) -> Any: + if body is None: + body = http_res.text + try: + return unmarshal_json(body, typ) + except Exception as e: + raise models.ResponseValidationError( + "Response validation failed", + http_res, + e, + body, + ) from e diff --git a/gusto_embedded/src/gusto_embedded/webhooks.py b/gusto_embedded/src/gusto_embedded/webhooks.py index 3ceb4ad2..06647fcb 100644 --- a/gusto_embedded/src/gusto_embedded/webhooks.py +++ b/gusto_embedded/src/gusto_embedded/webhooks.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union @@ -98,6 +99,7 @@ def create_subscription( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-webhook-subscription", oauth2_scopes=None, @@ -110,31 +112,20 @@ def create_subscription( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def create_subscription_async( self, @@ -225,6 +216,7 @@ async def create_subscription_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="post-v1-webhook-subscription", oauth2_scopes=None, @@ -237,31 +229,20 @@ async def create_subscription_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list_subscriptions( self, @@ -337,6 +318,7 @@ def list_subscriptions( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscriptions", oauth2_scopes=None, @@ -348,26 +330,15 @@ def list_subscriptions( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.WebhookSubscription]) + return unmarshal_json_response(List[models.WebhookSubscription], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_subscriptions_async( self, @@ -443,6 +414,7 @@ async def list_subscriptions_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscriptions", oauth2_scopes=None, @@ -454,26 +426,15 @@ async def list_subscriptions_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.WebhookSubscription]) + return unmarshal_json_response(List[models.WebhookSubscription], http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def update_subscription( self, @@ -565,6 +526,7 @@ def update_subscription( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -577,31 +539,20 @@ def update_subscription( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def update_subscription_async( self, @@ -693,6 +644,7 @@ async def update_subscription_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -705,31 +657,20 @@ async def update_subscription_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def get_subscription( self, @@ -809,6 +750,7 @@ def get_subscription( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -820,26 +762,15 @@ def get_subscription( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_subscription_async( self, @@ -919,6 +850,7 @@ async def get_subscription_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -930,26 +862,15 @@ async def get_subscription_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def delete_subscription( self, @@ -1029,6 +950,7 @@ def delete_subscription( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -1043,23 +965,12 @@ def delete_subscription( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def delete_subscription_async( self, @@ -1139,6 +1050,7 @@ async def delete_subscription_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="delete-v1-webhook-subscription-uuid", oauth2_scopes=None, @@ -1153,23 +1065,12 @@ async def delete_subscription_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def verify( self, @@ -1263,6 +1164,7 @@ def verify( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-verify-webhook-subscription-uuid", oauth2_scopes=None, @@ -1275,31 +1177,20 @@ def verify( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def verify_async( self, @@ -1393,6 +1284,7 @@ async def verify_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-v1-verify-webhook-subscription-uuid", oauth2_scopes=None, @@ -1405,31 +1297,20 @@ async def verify_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WebhookSubscription) + return unmarshal_json_response(models.WebhookSubscription, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def request_verification_token( self, @@ -1509,6 +1390,7 @@ def request_verification_token( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscription-verification-token-uuid", oauth2_scopes=None, @@ -1523,23 +1405,12 @@ def request_verification_token( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def request_verification_token_async( self, @@ -1619,6 +1490,7 @@ async def request_verification_token_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-v1-webhook-subscription-verification-token-uuid", oauth2_scopes=None, @@ -1633,20 +1505,195 @@ async def request_verification_token_async( return if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def get_v1_webhooks_health_check( + self, + *, + security: Union[ + models.GetV1WebhooksHealthCheckSecurity, + models.GetV1WebhooksHealthCheckSecurityTypedDict, + ], + x_gusto_api_version: Optional[ + models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion + ] = models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WebhooksHealthCheckStatus: + r"""Get the webhooks health status + + Returns the health status (`healthy`, `unhealthy`, or `unknown`) of the webhooks system based on the last ten minutes of activity. + + scope: `webhook_subscriptions:read` + + + :param security: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetV1WebhooksHealthCheckRequest( + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request( + method="GET", + path="/v1/webhooks/health_check", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=utils.get_pydantic_model( + security, models.GetV1WebhooksHealthCheckSecurity + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-webhooks-health_check", + oauth2_scopes=None, + security_source=get_security_from_env(security, models.Security), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WebhooksHealthCheckStatus, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def get_v1_webhooks_health_check_async( + self, + *, + security: Union[ + models.GetV1WebhooksHealthCheckSecurity, + models.GetV1WebhooksHealthCheckSecurityTypedDict, + ], + x_gusto_api_version: Optional[ + models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion + ] = models.GetV1WebhooksHealthCheckHeaderXGustoAPIVersion.TWO_THOUSAND_AND_TWENTY_FOUR_MINUS_04_MINUS_01, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WebhooksHealthCheckStatus: + r"""Get the webhooks health status + + Returns the health status (`healthy`, `unhealthy`, or `unknown`) of the webhooks system based on the last ten minutes of activity. + + scope: `webhook_subscriptions:read` + + + :param security: + :param x_gusto_api_version: Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, + request = models.GetV1WebhooksHealthCheckRequest( + x_gusto_api_version=x_gusto_api_version, + ) + + req = self._build_request_async( + method="GET", + path="/v1/webhooks/health_check", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=utils.get_pydantic_model( + security, models.GetV1WebhooksHealthCheckSecurity + ), + timeout_ms=timeout_ms, ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get-v1-webhooks-health_check", + oauth2_scopes=None, + security_source=get_security_from_env(security, models.Security), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WebhooksHealthCheckStatus, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/gusto_embedded/src/gusto_embedded/wireinrequests.py b/gusto_embedded/src/gusto_embedded/wireinrequests.py index 3c4c044a..b1021847 100644 --- a/gusto_embedded/src/gusto_embedded/wireinrequests.py +++ b/gusto_embedded/src/gusto_embedded/wireinrequests.py @@ -5,6 +5,7 @@ from gusto_embedded._hooks import HookContext from gusto_embedded.types import OptionalNullable, UNSET from gusto_embedded.utils import get_security_from_env +from gusto_embedded.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional @@ -75,9 +76,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-wire_in_requests-wire_in_request_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -88,26 +90,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WireInRequest) + return unmarshal_json_response(models.WireInRequest, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def get_async( self, @@ -175,9 +166,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-wire_in_requests-wire_in_request_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -188,26 +180,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WireInRequest) + return unmarshal_json_response(models.WireInRequest, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def submit( self, @@ -296,9 +277,10 @@ def submit( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-wire_in_requests-wire_in_request_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -310,31 +292,20 @@ def submit( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WireInRequest) + return unmarshal_json_response(models.WireInRequest, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def submit_async( self, @@ -423,9 +394,10 @@ async def submit_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="put-wire_in_requests-wire_in_request_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -437,31 +409,20 @@ async def submit_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, models.WireInRequest) + return unmarshal_json_response(models.WireInRequest, http_res) if utils.match_response(http_res, "422", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, models.UnprocessableEntityErrorObjectErrorData + response_data = unmarshal_json_response( + models.UnprocessableEntityErrorObjectData, http_res ) - raise models.UnprocessableEntityErrorObjectError(data=response_data) + raise models.UnprocessableEntityErrorObject(response_data, http_res) if utils.match_response(http_res, ["404", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) def list( self, @@ -529,9 +490,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-wire_in_request_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -542,26 +504,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.WireInRequest]) + return unmarshal_json_response(List[models.WireInRequest], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res) async def list_async( self, @@ -629,9 +580,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="get-companies-company_uuid-wire_in_request_uuid", - oauth2_scopes=[], + oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), @@ -642,23 +594,12 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, List[models.WireInRequest]) + return unmarshal_json_response(List[models.WireInRequest], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise models.APIError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise models.APIError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise models.APIError("Unexpected response received", http_res)