From 3fb6b54f387b88a9bc68dbe04508586304ebcf96 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 20 Feb 2026 13:58:18 +0000 Subject: [PATCH 1/2] ## Python SDK Changes Detected: * `apideck.accounting.employees.list()`: **Added** * `apideck.accounting.employees.create()`: **Added** * `apideck.accounting.employees.get()`: **Added** * `apideck.accounting.employees.update()`: **Added** * `apideck.accounting.employees.delete()`: **Added** * `apideck.accounting.expense_categories.list()`: **Added** * `apideck.accounting.expense_categories.create()`: **Added** * `apideck.accounting.expense_categories.get()`: **Added** * `apideck.accounting.expense_categories.update()`: **Added** * `apideck.accounting.expense_categories.delete()`: **Added** * `apideck.accounting.expense_reports.list()`: **Added** * `apideck.accounting.expense_reports.create()`: **Added** * `apideck.accounting.expense_reports.get()`: **Added** * `apideck.accounting.expense_reports.update()`: **Added** * `apideck.accounting.expense_reports.delete()`: **Added** --- .speakeasy/gen.lock | 847 +++++- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 14 +- README.md | 38 +- RELEASES.md | 12 +- docs/models/accountingemployee.md | 37 + docs/models/accountingemployeeinput.md | 32 + docs/models/accountingemployeemanager.md | 11 + docs/models/accountingemployeesaddglobals.md | 9 + docs/models/accountingemployeesaddrequest.md | 12 + docs/models/accountingemployeesaddresponse.md | 10 + docs/models/accountingemployeesallglobals.md | 9 + docs/models/accountingemployeesallrequest.md | 15 + docs/models/accountingemployeesallresponse.md | 10 + .../accountingemployeesdeleteglobals.md | 9 + .../accountingemployeesdeleterequest.md | 12 + .../accountingemployeesdeleteresponse.md | 10 + docs/models/accountingemployeesfilter.md | 9 + .../models/accountingemployeesfilterstatus.md | 10 + docs/models/accountingemployeesoneglobals.md | 9 + docs/models/accountingemployeesonerequest.md | 13 + docs/models/accountingemployeesoneresponse.md | 10 + .../accountingemployeesupdateglobals.md | 9 + .../accountingemployeesupdaterequest.md | 13 + .../accountingemployeesupdateresponse.md | 10 + .../accountingexpensecategoriesaddglobals.md | 9 + .../accountingexpensecategoriesaddrequest.md | 12 + .../accountingexpensecategoriesaddresponse.md | 10 + .../accountingexpensecategoriesallglobals.md | 9 + .../accountingexpensecategoriesallrequest.md | 15 + .../accountingexpensecategoriesallresponse.md | 10 + ...ccountingexpensecategoriesdeleteglobals.md | 9 + ...ccountingexpensecategoriesdeleterequest.md | 12 + ...countingexpensecategoriesdeleteresponse.md | 10 + .../accountingexpensecategoriesoneglobals.md | 9 + .../accountingexpensecategoriesonerequest.md | 13 + .../accountingexpensecategoriesoneresponse.md | 10 + ...ccountingexpensecategoriesupdateglobals.md | 9 + ...ccountingexpensecategoriesupdaterequest.md | 13 + ...countingexpensecategoriesupdateresponse.md | 10 + .../accountingexpensereportsaddglobals.md | 9 + .../accountingexpensereportsaddrequest.md | 12 + .../accountingexpensereportsaddresponse.md | 10 + .../accountingexpensereportsallglobals.md | 9 + .../accountingexpensereportsallrequest.md | 15 + .../accountingexpensereportsallresponse.md | 10 + .../accountingexpensereportsdeleteglobals.md | 9 + .../accountingexpensereportsdeleterequest.md | 12 + .../accountingexpensereportsdeleteresponse.md | 10 + .../accountingexpensereportsoneglobals.md | 9 + .../accountingexpensereportsonerequest.md | 13 + .../accountingexpensereportsoneresponse.md | 10 + .../accountingexpensereportsupdateglobals.md | 9 + .../accountingexpensereportsupdaterequest.md | 13 + .../accountingexpensereportsupdateresponse.md | 10 + docs/models/accountingperiod.md | 11 + docs/models/approvedby.md | 11 + .../createaccountingemployeeresponse.md | 16 + docs/models/createexpensecategoryresponse.md | 16 + docs/models/createexpensereportresponse.md | 16 + .../deleteaccountingemployeeresponse.md | 16 + docs/models/deleteexpensecategoryresponse.md | 16 + docs/models/deleteexpensereportresponse.md | 16 + docs/models/employeestatus.md | 12 + docs/models/expensecategoriesfilter.md | 9 + docs/models/expensecategoriesfilterstatus.md | 9 + docs/models/expensecategory.md | 23 + docs/models/expensecategoryinput.md | 19 + docs/models/expensecategorystatus.md | 11 + docs/models/expensereport.md | 38 + docs/models/expensereportemployee.md | 11 + docs/models/expensereportinput.md | 34 + docs/models/expensereportlineitem.md | 26 + .../expensereportlineitemexpensecategory.md | 11 + docs/models/expensereportlineiteminput.md | 25 + docs/models/expensereportsfilter.md | 10 + docs/models/expensereportsfilterstatus.md | 14 + docs/models/expensereportstatus.md | 16 + docs/models/getaccountingemployeeresponse.md | 16 + docs/models/getaccountingemployeesresponse.md | 18 + docs/models/getexpensecategoriesresponse.md | 18 + docs/models/getexpensecategoryresponse.md | 16 + docs/models/getexpensereportresponse.md | 16 + docs/models/getexpensereportsresponse.md | 18 + docs/models/linkedsubsidiary.md | 10 + docs/models/linkedsubsidiaryinput.md | 9 + .../updateaccountingemployeeresponse.md | 16 + docs/models/updateexpensecategoryresponse.md | 16 + docs/models/updateexpensereportresponse.md | 16 + docs/sdks/apideckemployees/README.md | 1030 +++++++ docs/sdks/employees/README.md | 815 +----- docs/sdks/expensecategories/README.md | 375 +++ docs/sdks/expensereports/README.md | 440 +++ pyproject.toml | 2 +- src/apideck_unify/_version.py | 6 +- src/apideck_unify/accounting.py | 13 + src/apideck_unify/apideck_employees.py | 2471 +++++++++++++++++ src/apideck_unify/employees.py | 1330 +++------ src/apideck_unify/expensecategories.py | 1746 ++++++++++++ src/apideck_unify/expensereports.py | 2039 ++++++++++++++ src/apideck_unify/hris.py | 8 +- src/apideck_unify/models/__init__.py | 561 ++++ .../models/accounting_employeesaddop.py | 117 + .../models/accounting_employeesallop.py | 185 ++ .../models/accounting_employeesdeleteop.py | 114 + .../models/accounting_employeesoneop.py | 157 ++ .../models/accounting_employeesupdateop.py | 125 + .../accounting_expensecategoriesaddop.py | 112 + .../accounting_expensecategoriesallop.py | 183 ++ .../accounting_expensecategoriesdeleteop.py | 112 + .../accounting_expensecategoriesoneop.py | 155 ++ .../accounting_expensecategoriesupdateop.py | 120 + .../models/accounting_expensereportsaddop.py | 110 + .../models/accounting_expensereportsallop.py | 180 ++ .../accounting_expensereportsdeleteop.py | 110 + .../models/accounting_expensereportsoneop.py | 155 ++ .../accounting_expensereportsupdateop.py | 118 + .../models/accountingemployee.py | 602 ++++ .../models/accountingemployeesfilter.py | 44 + .../createaccountingemployeeresponse.py | 91 + .../models/createexpensecategoryresponse.py | 91 + .../models/createexpensereportresponse.py | 91 + .../deleteaccountingemployeeresponse.py | 91 + .../models/deleteexpensecategoryresponse.py | 91 + .../models/deleteexpensereportresponse.py | 91 + .../models/expensecategoriesfilter.py | 43 + src/apideck_unify/models/expensecategory.py | 302 ++ src/apideck_unify/models/expensereport.py | 700 +++++ .../models/expensereportlineitem.py | 413 +++ .../models/expensereportsfilter.py | 53 + .../models/getaccountingemployeeresponse.py | 89 + .../models/getaccountingemployeesresponse.py | 101 + .../models/getexpensecategoriesresponse.py | 101 + .../models/getexpensecategoryresponse.py | 89 + .../models/getexpensereportresponse.py | 89 + .../models/getexpensereportsresponse.py | 101 + src/apideck_unify/models/linkedsubsidiary.py | 63 + .../models/linkedsubsidiary_input.py | 57 + .../updateaccountingemployeeresponse.py | 91 + .../models/updateexpensecategoryresponse.py | 91 + .../models/updateexpensereportresponse.py | 91 + 141 files changed, 16998 insertions(+), 1605 deletions(-) create mode 100644 docs/models/accountingemployee.md create mode 100644 docs/models/accountingemployeeinput.md create mode 100644 docs/models/accountingemployeemanager.md create mode 100644 docs/models/accountingemployeesaddglobals.md create mode 100644 docs/models/accountingemployeesaddrequest.md create mode 100644 docs/models/accountingemployeesaddresponse.md create mode 100644 docs/models/accountingemployeesallglobals.md create mode 100644 docs/models/accountingemployeesallrequest.md create mode 100644 docs/models/accountingemployeesallresponse.md create mode 100644 docs/models/accountingemployeesdeleteglobals.md create mode 100644 docs/models/accountingemployeesdeleterequest.md create mode 100644 docs/models/accountingemployeesdeleteresponse.md create mode 100644 docs/models/accountingemployeesfilter.md create mode 100644 docs/models/accountingemployeesfilterstatus.md create mode 100644 docs/models/accountingemployeesoneglobals.md create mode 100644 docs/models/accountingemployeesonerequest.md create mode 100644 docs/models/accountingemployeesoneresponse.md create mode 100644 docs/models/accountingemployeesupdateglobals.md create mode 100644 docs/models/accountingemployeesupdaterequest.md create mode 100644 docs/models/accountingemployeesupdateresponse.md create mode 100644 docs/models/accountingexpensecategoriesaddglobals.md create mode 100644 docs/models/accountingexpensecategoriesaddrequest.md create mode 100644 docs/models/accountingexpensecategoriesaddresponse.md create mode 100644 docs/models/accountingexpensecategoriesallglobals.md create mode 100644 docs/models/accountingexpensecategoriesallrequest.md create mode 100644 docs/models/accountingexpensecategoriesallresponse.md create mode 100644 docs/models/accountingexpensecategoriesdeleteglobals.md create mode 100644 docs/models/accountingexpensecategoriesdeleterequest.md create mode 100644 docs/models/accountingexpensecategoriesdeleteresponse.md create mode 100644 docs/models/accountingexpensecategoriesoneglobals.md create mode 100644 docs/models/accountingexpensecategoriesonerequest.md create mode 100644 docs/models/accountingexpensecategoriesoneresponse.md create mode 100644 docs/models/accountingexpensecategoriesupdateglobals.md create mode 100644 docs/models/accountingexpensecategoriesupdaterequest.md create mode 100644 docs/models/accountingexpensecategoriesupdateresponse.md create mode 100644 docs/models/accountingexpensereportsaddglobals.md create mode 100644 docs/models/accountingexpensereportsaddrequest.md create mode 100644 docs/models/accountingexpensereportsaddresponse.md create mode 100644 docs/models/accountingexpensereportsallglobals.md create mode 100644 docs/models/accountingexpensereportsallrequest.md create mode 100644 docs/models/accountingexpensereportsallresponse.md create mode 100644 docs/models/accountingexpensereportsdeleteglobals.md create mode 100644 docs/models/accountingexpensereportsdeleterequest.md create mode 100644 docs/models/accountingexpensereportsdeleteresponse.md create mode 100644 docs/models/accountingexpensereportsoneglobals.md create mode 100644 docs/models/accountingexpensereportsonerequest.md create mode 100644 docs/models/accountingexpensereportsoneresponse.md create mode 100644 docs/models/accountingexpensereportsupdateglobals.md create mode 100644 docs/models/accountingexpensereportsupdaterequest.md create mode 100644 docs/models/accountingexpensereportsupdateresponse.md create mode 100644 docs/models/accountingperiod.md create mode 100644 docs/models/approvedby.md create mode 100644 docs/models/createaccountingemployeeresponse.md create mode 100644 docs/models/createexpensecategoryresponse.md create mode 100644 docs/models/createexpensereportresponse.md create mode 100644 docs/models/deleteaccountingemployeeresponse.md create mode 100644 docs/models/deleteexpensecategoryresponse.md create mode 100644 docs/models/deleteexpensereportresponse.md create mode 100644 docs/models/employeestatus.md create mode 100644 docs/models/expensecategoriesfilter.md create mode 100644 docs/models/expensecategoriesfilterstatus.md create mode 100644 docs/models/expensecategory.md create mode 100644 docs/models/expensecategoryinput.md create mode 100644 docs/models/expensecategorystatus.md create mode 100644 docs/models/expensereport.md create mode 100644 docs/models/expensereportemployee.md create mode 100644 docs/models/expensereportinput.md create mode 100644 docs/models/expensereportlineitem.md create mode 100644 docs/models/expensereportlineitemexpensecategory.md create mode 100644 docs/models/expensereportlineiteminput.md create mode 100644 docs/models/expensereportsfilter.md create mode 100644 docs/models/expensereportsfilterstatus.md create mode 100644 docs/models/expensereportstatus.md create mode 100644 docs/models/getaccountingemployeeresponse.md create mode 100644 docs/models/getaccountingemployeesresponse.md create mode 100644 docs/models/getexpensecategoriesresponse.md create mode 100644 docs/models/getexpensecategoryresponse.md create mode 100644 docs/models/getexpensereportresponse.md create mode 100644 docs/models/getexpensereportsresponse.md create mode 100644 docs/models/linkedsubsidiary.md create mode 100644 docs/models/linkedsubsidiaryinput.md create mode 100644 docs/models/updateaccountingemployeeresponse.md create mode 100644 docs/models/updateexpensecategoryresponse.md create mode 100644 docs/models/updateexpensereportresponse.md create mode 100644 docs/sdks/apideckemployees/README.md create mode 100644 docs/sdks/expensecategories/README.md create mode 100644 docs/sdks/expensereports/README.md create mode 100644 src/apideck_unify/apideck_employees.py create mode 100644 src/apideck_unify/expensecategories.py create mode 100644 src/apideck_unify/expensereports.py create mode 100644 src/apideck_unify/models/accounting_employeesaddop.py create mode 100644 src/apideck_unify/models/accounting_employeesallop.py create mode 100644 src/apideck_unify/models/accounting_employeesdeleteop.py create mode 100644 src/apideck_unify/models/accounting_employeesoneop.py create mode 100644 src/apideck_unify/models/accounting_employeesupdateop.py create mode 100644 src/apideck_unify/models/accounting_expensecategoriesaddop.py create mode 100644 src/apideck_unify/models/accounting_expensecategoriesallop.py create mode 100644 src/apideck_unify/models/accounting_expensecategoriesdeleteop.py create mode 100644 src/apideck_unify/models/accounting_expensecategoriesoneop.py create mode 100644 src/apideck_unify/models/accounting_expensecategoriesupdateop.py create mode 100644 src/apideck_unify/models/accounting_expensereportsaddop.py create mode 100644 src/apideck_unify/models/accounting_expensereportsallop.py create mode 100644 src/apideck_unify/models/accounting_expensereportsdeleteop.py create mode 100644 src/apideck_unify/models/accounting_expensereportsoneop.py create mode 100644 src/apideck_unify/models/accounting_expensereportsupdateop.py create mode 100644 src/apideck_unify/models/accountingemployee.py create mode 100644 src/apideck_unify/models/accountingemployeesfilter.py create mode 100644 src/apideck_unify/models/createaccountingemployeeresponse.py create mode 100644 src/apideck_unify/models/createexpensecategoryresponse.py create mode 100644 src/apideck_unify/models/createexpensereportresponse.py create mode 100644 src/apideck_unify/models/deleteaccountingemployeeresponse.py create mode 100644 src/apideck_unify/models/deleteexpensecategoryresponse.py create mode 100644 src/apideck_unify/models/deleteexpensereportresponse.py create mode 100644 src/apideck_unify/models/expensecategoriesfilter.py create mode 100644 src/apideck_unify/models/expensecategory.py create mode 100644 src/apideck_unify/models/expensereport.py create mode 100644 src/apideck_unify/models/expensereportlineitem.py create mode 100644 src/apideck_unify/models/expensereportsfilter.py create mode 100644 src/apideck_unify/models/getaccountingemployeeresponse.py create mode 100644 src/apideck_unify/models/getaccountingemployeesresponse.py create mode 100644 src/apideck_unify/models/getexpensecategoriesresponse.py create mode 100644 src/apideck_unify/models/getexpensecategoryresponse.py create mode 100644 src/apideck_unify/models/getexpensereportresponse.py create mode 100644 src/apideck_unify/models/getexpensereportsresponse.py create mode 100644 src/apideck_unify/models/linkedsubsidiary.py create mode 100644 src/apideck_unify/models/linkedsubsidiary_input.py create mode 100644 src/apideck_unify/models/updateaccountingemployeeresponse.py create mode 100644 src/apideck_unify/models/updateexpensecategoryresponse.py create mode 100644 src/apideck_unify/models/updateexpensereportresponse.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5f62f232..b7e3909a 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: fca0ac3a-5f4e-452c-bbc7-2311afa8da40 management: - docChecksum: b0ff27b89b19513e9baeb54c848c2b9d - docVersion: 10.23.19 + docChecksum: 440fbcb52f2bd026ba9fd19df4dda456 + docVersion: 10.23.21 speakeasyVersion: 1.656.1 generationVersion: 2.753.1 - releaseVersion: 0.30.2 - configChecksum: 162293d79bd55e0c35d4b9f879946caa + releaseVersion: 0.30.3 + configChecksum: f7760931a378e30ad95a67392b9ea0bd repoURL: https://github.com/apideck-libraries/sdk-python.git installationURL: https://github.com/apideck-libraries/sdk-python.git published: true @@ -213,6 +213,56 @@ generatedFiles: - docs/models/accountingdepartmentsupdateglobals.md - docs/models/accountingdepartmentsupdaterequest.md - docs/models/accountingdepartmentsupdateresponse.md + - docs/models/accountingemployee.md + - docs/models/accountingemployeeinput.md + - docs/models/accountingemployeemanager.md + - docs/models/accountingemployeesaddglobals.md + - docs/models/accountingemployeesaddrequest.md + - docs/models/accountingemployeesaddresponse.md + - docs/models/accountingemployeesallglobals.md + - docs/models/accountingemployeesallrequest.md + - docs/models/accountingemployeesallresponse.md + - docs/models/accountingemployeesdeleteglobals.md + - docs/models/accountingemployeesdeleterequest.md + - docs/models/accountingemployeesdeleteresponse.md + - docs/models/accountingemployeesfilter.md + - docs/models/accountingemployeesfilterstatus.md + - docs/models/accountingemployeesoneglobals.md + - docs/models/accountingemployeesonerequest.md + - docs/models/accountingemployeesoneresponse.md + - docs/models/accountingemployeesupdateglobals.md + - docs/models/accountingemployeesupdaterequest.md + - docs/models/accountingemployeesupdateresponse.md + - docs/models/accountingexpensecategoriesaddglobals.md + - docs/models/accountingexpensecategoriesaddrequest.md + - docs/models/accountingexpensecategoriesaddresponse.md + - docs/models/accountingexpensecategoriesallglobals.md + - docs/models/accountingexpensecategoriesallrequest.md + - docs/models/accountingexpensecategoriesallresponse.md + - docs/models/accountingexpensecategoriesdeleteglobals.md + - docs/models/accountingexpensecategoriesdeleterequest.md + - docs/models/accountingexpensecategoriesdeleteresponse.md + - docs/models/accountingexpensecategoriesoneglobals.md + - docs/models/accountingexpensecategoriesonerequest.md + - docs/models/accountingexpensecategoriesoneresponse.md + - docs/models/accountingexpensecategoriesupdateglobals.md + - docs/models/accountingexpensecategoriesupdaterequest.md + - docs/models/accountingexpensecategoriesupdateresponse.md + - docs/models/accountingexpensereportsaddglobals.md + - docs/models/accountingexpensereportsaddrequest.md + - docs/models/accountingexpensereportsaddresponse.md + - docs/models/accountingexpensereportsallglobals.md + - docs/models/accountingexpensereportsallrequest.md + - docs/models/accountingexpensereportsallresponse.md + - docs/models/accountingexpensereportsdeleteglobals.md + - docs/models/accountingexpensereportsdeleterequest.md + - docs/models/accountingexpensereportsdeleteresponse.md + - docs/models/accountingexpensereportsoneglobals.md + - docs/models/accountingexpensereportsonerequest.md + - docs/models/accountingexpensereportsoneresponse.md + - docs/models/accountingexpensereportsupdateglobals.md + - docs/models/accountingexpensereportsupdaterequest.md + - docs/models/accountingexpensereportsupdateresponse.md - docs/models/accountingexpensesaddglobals.md - docs/models/accountingexpensesaddrequest.md - docs/models/accountingexpensesaddresponse.md @@ -322,6 +372,7 @@ generatedFiles: - docs/models/accountingpaymentsupdateglobals.md - docs/models/accountingpaymentsupdaterequest.md - docs/models/accountingpaymentsupdateresponse.md + - docs/models/accountingperiod.md - docs/models/accountingprofitandlossoneglobals.md - docs/models/accountingprofitandlossonerequest.md - docs/models/accountingprofitandlossoneresponse.md @@ -466,6 +517,7 @@ generatedFiles: - docs/models/application.md - docs/models/applicationinput.md - docs/models/applicationstatus.md + - docs/models/approvedby.md - docs/models/assignee.md - docs/models/assigneeinput.md - docs/models/atsapplicantsaddglobals.md @@ -646,6 +698,7 @@ generatedFiles: - docs/models/costofgoodssold.md - docs/models/coverage.md - docs/models/createaccountingdepartmentresponse.md + - docs/models/createaccountingemployeeresponse.md - docs/models/createaccountinglocationresponse.md - docs/models/createactivityresponse.md - docs/models/createapplicantresponse.md @@ -673,6 +726,8 @@ generatedFiles: - docs/models/createdrivegroupresponse.md - docs/models/createdriveresponse.md - docs/models/createemployeeresponse.md + - docs/models/createexpensecategoryresponse.md + - docs/models/createexpensereportresponse.md - docs/models/createexpenseresponse.md - docs/models/createfolderrequest.md - docs/models/createfolderresponse.md @@ -900,6 +955,7 @@ generatedFiles: - docs/models/deduction.md - docs/models/defaults.md - docs/models/deleteaccountingdepartmentresponse.md + - docs/models/deleteaccountingemployeeresponse.md - docs/models/deleteaccountinglocationresponse.md - docs/models/deleteactivityresponse.md - docs/models/deleteapplicantresponse.md @@ -923,6 +979,8 @@ generatedFiles: - docs/models/deletedrivegroupresponse.md - docs/models/deletedriveresponse.md - docs/models/deleteemployeeresponse.md + - docs/models/deleteexpensecategoryresponse.md + - docs/models/deleteexpensereportresponse.md - docs/models/deleteexpenseresponse.md - docs/models/deletefileresponse.md - docs/models/deletefolderresponse.md @@ -1025,6 +1083,7 @@ generatedFiles: - docs/models/employeesonefilter.md - docs/models/employeessort.md - docs/models/employeessortby.md + - docs/models/employeestatus.md - docs/models/employmentrole.md - docs/models/employmentstatus.md - docs/models/employmentsubtype.md @@ -1034,10 +1093,24 @@ generatedFiles: - docs/models/eventsource.md - docs/models/evenweeks.md - docs/models/expense.md + - docs/models/expensecategoriesfilter.md + - docs/models/expensecategoriesfilterstatus.md + - docs/models/expensecategory.md + - docs/models/expensecategoryinput.md + - docs/models/expensecategorystatus.md - docs/models/expenseinput.md - docs/models/expenselineitem.md - docs/models/expenselineiteminput.md - docs/models/expensepaymenttype.md + - docs/models/expensereport.md + - docs/models/expensereportemployee.md + - docs/models/expensereportinput.md + - docs/models/expensereportlineitem.md + - docs/models/expensereportlineitemexpensecategory.md + - docs/models/expensereportlineiteminput.md + - docs/models/expensereportsfilter.md + - docs/models/expensereportsfilterstatus.md + - docs/models/expensereportstatus.md - docs/models/expensesfilter.md - docs/models/expensesfilterstatus.md - docs/models/expensesfiltertype.md @@ -1162,6 +1235,8 @@ generatedFiles: - docs/models/gender.md - docs/models/getaccountingdepartmentresponse.md - docs/models/getaccountingdepartmentsresponse.md + - docs/models/getaccountingemployeeresponse.md + - docs/models/getaccountingemployeesresponse.md - docs/models/getaccountinglocationresponse.md - docs/models/getaccountinglocationsresponse.md - docs/models/getactivitiesresponse.md @@ -1236,6 +1311,10 @@ generatedFiles: - docs/models/getemployeeresponse.md - docs/models/getemployeeschedulesresponse.md - docs/models/getemployeesresponse.md + - docs/models/getexpensecategoriesresponse.md + - docs/models/getexpensecategoryresponse.md + - docs/models/getexpensereportresponse.md + - docs/models/getexpensereportsresponse.md - docs/models/getexpenseresponse.md - docs/models/getexpensesresponse.md - docs/models/getfileresponse.md @@ -1499,6 +1578,8 @@ generatedFiles: - docs/models/linkedparentcustomer.md - docs/models/linkedpurchaseorder.md - docs/models/linkedresources.md + - docs/models/linkedsubsidiary.md + - docs/models/linkedsubsidiaryinput.md - docs/models/linkedsupplier.md - docs/models/linkedsupplierinput.md - docs/models/linkedtaxdetail.md @@ -1741,6 +1822,7 @@ generatedFiles: - docs/models/unprocessableresponse.md - docs/models/unprocessableresponsedetail.md - docs/models/updateaccountingdepartmentresponse.md + - docs/models/updateaccountingemployeeresponse.md - docs/models/updateaccountinglocationresponse.md - docs/models/updateactivityresponse.md - docs/models/updateapplicantresponse.md @@ -1767,6 +1849,8 @@ generatedFiles: - docs/models/updatedrivegroupresponse.md - docs/models/updatedriveresponse.md - docs/models/updateemployeeresponse.md + - docs/models/updateexpensecategoryresponse.md + - docs/models/updateexpensereportresponse.md - docs/models/updateexpenseresponse.md - docs/models/updatefilerequest.md - docs/models/updatefileresponse.md @@ -1916,6 +2000,7 @@ generatedFiles: - docs/sdks/apideckcompanies/README.md - docs/sdks/apideckcustomers/README.md - docs/sdks/apideckdepartments/README.md + - docs/sdks/apideckemployees/README.md - docs/sdks/apiresourcecoveragesdk/README.md - docs/sdks/apiresources/README.md - docs/sdks/apis/README.md @@ -1961,6 +2046,8 @@ generatedFiles: - docs/sdks/employees/README.md - docs/sdks/employeeschedulessdk/README.md - docs/sdks/eventlogs/README.md + - docs/sdks/expensecategories/README.md + - docs/sdks/expensereports/README.md - docs/sdks/expenses/README.md - docs/sdks/files/README.md - docs/sdks/folders/README.md @@ -2015,6 +2102,7 @@ generatedFiles: - src/apideck_unify/apideck_companies.py - src/apideck_unify/apideck_customers.py - src/apideck_unify/apideck_departments.py + - src/apideck_unify/apideck_employees.py - src/apideck_unify/apiresourcecoverage_sdk.py - src/apideck_unify/apiresources.py - src/apideck_unify/apis.py @@ -2065,6 +2153,8 @@ generatedFiles: - src/apideck_unify/employees.py - src/apideck_unify/employeeschedules_sdk.py - src/apideck_unify/eventlogs.py + - src/apideck_unify/expensecategories.py + - src/apideck_unify/expensereports.py - src/apideck_unify/expenses.py - src/apideck_unify/files.py - src/apideck_unify/filestorage.py @@ -2133,6 +2223,21 @@ generatedFiles: - src/apideck_unify/models/accounting_departmentsdeleteop.py - src/apideck_unify/models/accounting_departmentsoneop.py - src/apideck_unify/models/accounting_departmentsupdateop.py + - src/apideck_unify/models/accounting_employeesaddop.py + - src/apideck_unify/models/accounting_employeesallop.py + - src/apideck_unify/models/accounting_employeesdeleteop.py + - src/apideck_unify/models/accounting_employeesoneop.py + - src/apideck_unify/models/accounting_employeesupdateop.py + - src/apideck_unify/models/accounting_expensecategoriesaddop.py + - src/apideck_unify/models/accounting_expensecategoriesallop.py + - src/apideck_unify/models/accounting_expensecategoriesdeleteop.py + - src/apideck_unify/models/accounting_expensecategoriesoneop.py + - src/apideck_unify/models/accounting_expensecategoriesupdateop.py + - src/apideck_unify/models/accounting_expensereportsaddop.py + - src/apideck_unify/models/accounting_expensereportsallop.py + - src/apideck_unify/models/accounting_expensereportsdeleteop.py + - src/apideck_unify/models/accounting_expensereportsoneop.py + - src/apideck_unify/models/accounting_expensereportsupdateop.py - src/apideck_unify/models/accounting_expensesaddop.py - src/apideck_unify/models/accounting_expensesallop.py - src/apideck_unify/models/accounting_expensesdeleteop.py @@ -2207,6 +2312,8 @@ generatedFiles: - src/apideck_unify/models/accountingbankaccount.py - src/apideck_unify/models/accountingdepartment.py - src/apideck_unify/models/accountingdepartmentsfilter.py + - src/apideck_unify/models/accountingemployee.py + - src/apideck_unify/models/accountingemployeesfilter.py - src/apideck_unify/models/accountinglocation.py - src/apideck_unify/models/accountinglocationsfilter.py - src/apideck_unify/models/activitiesfilter.py @@ -2311,6 +2418,7 @@ generatedFiles: - src/apideck_unify/models/contactssort.py - src/apideck_unify/models/copyfolderrequest.py - src/apideck_unify/models/createaccountingdepartmentresponse.py + - src/apideck_unify/models/createaccountingemployeeresponse.py - src/apideck_unify/models/createaccountinglocationresponse.py - src/apideck_unify/models/createactivityresponse.py - src/apideck_unify/models/createapplicantresponse.py @@ -2337,6 +2445,8 @@ generatedFiles: - src/apideck_unify/models/createdrivegroupresponse.py - src/apideck_unify/models/createdriveresponse.py - src/apideck_unify/models/createemployeeresponse.py + - src/apideck_unify/models/createexpensecategoryresponse.py + - src/apideck_unify/models/createexpensereportresponse.py - src/apideck_unify/models/createexpenseresponse.py - src/apideck_unify/models/createfolderrequest.py - src/apideck_unify/models/createfolderresponse.py @@ -2436,6 +2546,7 @@ generatedFiles: - src/apideck_unify/models/datascopesresources.py - src/apideck_unify/models/deduction.py - src/apideck_unify/models/deleteaccountingdepartmentresponse.py + - src/apideck_unify/models/deleteaccountingemployeeresponse.py - src/apideck_unify/models/deleteaccountinglocationresponse.py - src/apideck_unify/models/deleteactivityresponse.py - src/apideck_unify/models/deleteapplicantresponse.py @@ -2458,6 +2569,8 @@ generatedFiles: - src/apideck_unify/models/deletedrivegroupresponse.py - src/apideck_unify/models/deletedriveresponse.py - src/apideck_unify/models/deleteemployeeresponse.py + - src/apideck_unify/models/deleteexpensecategoryresponse.py + - src/apideck_unify/models/deleteexpensereportresponse.py - src/apideck_unify/models/deleteexpenseresponse.py - src/apideck_unify/models/deletefileresponse.py - src/apideck_unify/models/deletefolderresponse.py @@ -2525,8 +2638,13 @@ generatedFiles: - src/apideck_unify/models/employeessort.py - src/apideck_unify/models/employmentstatus.py - src/apideck_unify/models/expense.py + - src/apideck_unify/models/expensecategoriesfilter.py + - src/apideck_unify/models/expensecategory.py - src/apideck_unify/models/expenselineitem.py - src/apideck_unify/models/expenselineitem_input.py + - src/apideck_unify/models/expensereport.py + - src/apideck_unify/models/expensereportlineitem.py + - src/apideck_unify/models/expensereportsfilter.py - src/apideck_unify/models/expensesfilter.py - src/apideck_unify/models/filesfilter.py - src/apideck_unify/models/filessearch.py @@ -2571,6 +2689,8 @@ generatedFiles: - src/apideck_unify/models/gender.py - src/apideck_unify/models/getaccountingdepartmentresponse.py - src/apideck_unify/models/getaccountingdepartmentsresponse.py + - src/apideck_unify/models/getaccountingemployeeresponse.py + - src/apideck_unify/models/getaccountingemployeesresponse.py - src/apideck_unify/models/getaccountinglocationresponse.py - src/apideck_unify/models/getaccountinglocationsresponse.py - src/apideck_unify/models/getactivitiesresponse.py @@ -2645,6 +2765,10 @@ generatedFiles: - src/apideck_unify/models/getemployeeresponse.py - src/apideck_unify/models/getemployeeschedulesresponse.py - src/apideck_unify/models/getemployeesresponse.py + - src/apideck_unify/models/getexpensecategoriesresponse.py + - src/apideck_unify/models/getexpensecategoryresponse.py + - src/apideck_unify/models/getexpensereportresponse.py + - src/apideck_unify/models/getexpensereportsresponse.py - src/apideck_unify/models/getexpenseresponse.py - src/apideck_unify/models/getexpensesresponse.py - src/apideck_unify/models/getfileresponse.py @@ -2792,6 +2916,8 @@ generatedFiles: - src/apideck_unify/models/linkedlocation_input.py - src/apideck_unify/models/linkedparentcustomer.py - src/apideck_unify/models/linkedpurchaseorder.py + - src/apideck_unify/models/linkedsubsidiary.py + - src/apideck_unify/models/linkedsubsidiary_input.py - src/apideck_unify/models/linkedsupplier.py - src/apideck_unify/models/linkedsupplier_input.py - src/apideck_unify/models/linkedtaxdetail.py @@ -2900,6 +3026,7 @@ generatedFiles: - src/apideck_unify/models/unifiedid.py - src/apideck_unify/models/unprocessableresponse.py - src/apideck_unify/models/updateaccountingdepartmentresponse.py + - src/apideck_unify/models/updateaccountingemployeeresponse.py - src/apideck_unify/models/updateaccountinglocationresponse.py - src/apideck_unify/models/updateactivityresponse.py - src/apideck_unify/models/updateapplicantresponse.py @@ -2925,6 +3052,8 @@ generatedFiles: - src/apideck_unify/models/updatedrivegroupresponse.py - src/apideck_unify/models/updatedriveresponse.py - src/apideck_unify/models/updateemployeeresponse.py + - src/apideck_unify/models/updateexpensecategoryresponse.py + - src/apideck_unify/models/updateexpensereportresponse.py - src/apideck_unify/models/updateexpenseresponse.py - src/apideck_unify/models/updatefilerequest.py - src/apideck_unify/models/updatefileresponse.py @@ -18686,9 +18815,427 @@ examples: application/xml: "" text/html: "" text/plain: "" + accounting.employeesAll: + speakeasy-default-accounting-employees-all: + parameters: + query: + raw: false + limit: 20 + fields: "id,updated_at" + filter: {"updated_since": "2020-09-30T07:43:32.000Z", "status": "active"} + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "Employees", "operation": "all", "data": [], "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}}, "links": {"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D", "current": "https://unify.apideck.com/crm/companies", "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.employeesAdd: + speakeasy-default-accounting-employees-add: + parameters: + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"display_id": "123456", "first_name": "John", "last_name": "Doe", "display_name": "John Doe", "emails": [{"id": "123", "email": "elon@musk.com", "type": "primary"}], "employee_number": "EMP-001", "job_title": "Senior Accountant", "status": "active", "is_contractor": false, "department": {"display_id": "123456", "name": "Acme Inc."}, "location": {"id": "123456", "display_id": "123456", "name": "New York Office"}, "manager": {"id": "12345", "name": "Jane Smith"}, "hire_date": "2020-01-15", "termination_date": "2025-12-31", "gender": "male", "birth_date": "1990-05-20", "subsidiary": {"display_id": "123456", "name": "Acme Inc."}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "currency": "USD", "notes": "Some notes about this employee", "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "phone_numbers": [{"id": "12345", "country_code": "1", "area_code": "323", "number": "111-111-1111", "extension": "105", "type": "primary"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + responses: + "201": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "Employees", "operation": "add", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.employeesOne: + speakeasy-default-accounting-employees-one: + parameters: + path: + id: "" + query: + raw: false + fields: "id,updated_at" + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "Employees", "operation": "one", "data": {"id": "12345", "downstream_id": "12345", "display_id": "123456", "first_name": "John", "last_name": "Doe", "display_name": "John Doe", "emails": [{"id": "123", "email": "elon@musk.com", "type": "primary"}], "employee_number": "EMP-001", "job_title": "Senior Accountant", "status": "active", "is_contractor": false, "department": {"id": "12345", "display_id": "123456", "name": "Acme Inc.", "downstream_id": "12345"}, "location": {"id": "123456", "display_id": "123456", "name": "New York Office", "downstream_id": "12345"}, "manager": {"id": "12345", "name": "Jane Smith"}, "hire_date": "2020-01-15", "termination_date": "2025-12-31", "gender": "male", "birth_date": "1990-05-20", "subsidiary": {"id": "12345", "display_id": "123456", "name": "Acme Inc."}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "currency": "USD", "notes": "Some notes about this employee", "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "phone_numbers": [{"id": "12345", "country_code": "1", "area_code": "323", "number": "111-111-1111", "extension": "105", "type": "primary"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.employeesUpdate: + speakeasy-default-accounting-employees-update: + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"display_id": "123456", "first_name": "John", "last_name": "Doe", "display_name": "John Doe", "emails": [{"id": "123", "email": "elon@musk.com", "type": "primary"}], "employee_number": "EMP-001", "job_title": "Senior Accountant", "status": "active", "is_contractor": false, "department": {"display_id": "123456", "name": "Acme Inc."}, "location": {"id": "123456", "display_id": "123456", "name": "New York Office"}, "manager": {"id": "12345", "name": "Jane Smith"}, "hire_date": "2020-01-15", "termination_date": "2025-12-31", "gender": "male", "birth_date": "1990-05-20", "subsidiary": {"display_id": "123456", "name": "Acme Inc."}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "currency": "USD", "notes": "Some notes about this employee", "addresses": [{"id": "123", "type": "primary", "string": "25 Spring Street, Blackburn, VIC 3130", "name": "HQ US", "line1": "Main street", "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", "postal_code": "94104", "country": "US", "latitude": "40.759211", "longitude": "-73.984638", "county": "Santa Clara", "contact_name": "Elon Musk", "salutation": "Mr", "phone_number": "111-111-1111", "fax": "122-111-1111", "email": "elon@musk.com", "website": "https://elonmusk.com", "notes": "Address notes or delivery instructions.", "row_version": "1-12345"}], "phone_numbers": [{"id": "12345", "country_code": "1", "area_code": "323", "number": "111-111-1111", "extension": "105", "type": "primary"}], "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "Employees", "operation": "update", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.employeesDelete: + speakeasy-default-accounting-employees-delete: + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "Employees", "operation": "delete", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.expenseCategoriesAll: + speakeasy-default-accounting-expense-categories-all: + parameters: + query: + raw: false + limit: 20 + fields: "id,updated_at" + filter: {"updated_since": "2020-09-30T07:43:32.000Z", "status": "active"} + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "netsuite", "resource": "ExpenseCategories", "operation": "all", "data": [], "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}}, "links": {"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D", "current": "https://unify.apideck.com/crm/companies", "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.expenseCategoriesAdd: + speakeasy-default-accounting-expense-categories-add: + parameters: + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"display_id": "123456", "name": "Travel", "code": "TRAVEL-001", "description": "Travel-related expenses including flights, hotels, and ground transportation.", "status": "active", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "offset_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "rate_required": false, "default_rate": 0.67, "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + responses: + "201": + application/json: {"status_code": 200, "status": "OK", "service": "netsuite", "resource": "ExpenseCategories", "operation": "add", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.expenseCategoriesOne: + speakeasy-default-accounting-expense-categories-one: + parameters: + path: + id: "" + query: + raw: false + fields: "id,updated_at" + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "netsuite", "resource": "ExpenseCategories", "operation": "one", "data": {"id": "12345", "display_id": "123456", "name": "Travel", "code": "TRAVEL-001", "description": "Travel-related expenses including flights, hotels, and ground transportation.", "status": "active", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "offset_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "tax_rate": {"id": "123456", "code": "N-T", "name": "GST on Purchases", "rate": 10}, "rate_required": false, "default_rate": 0.67, "row_version": "1-12345", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.expenseCategoriesUpdate: + speakeasy-default-accounting-expense-categories-update: + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"display_id": "123456", "name": "Travel", "code": "TRAVEL-001", "description": "Travel-related expenses including flights, hotels, and ground transportation.", "status": "active", "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "offset_account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "tax_rate": {"id": "123456", "code": "N-T", "rate": 10}, "rate_required": false, "default_rate": 0.67, "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "netsuite", "resource": "ExpenseCategories", "operation": "update", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.expenseCategoriesDelete: + speakeasy-default-accounting-expense-categories-delete: + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "netsuite", "resource": "ExpenseCategories", "operation": "delete", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.expenseReportsAll: + speakeasy-default-accounting-expense-reports-all: + parameters: + query: + raw: false + limit: 20 + fields: "id,updated_at" + filter: {"updated_since": "2020-09-30T07:43:32.000Z", "status": "submitted"} + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "netsuite", "resource": "ExpenseReports", "operation": "all", "data": [{"id": "12345", "display_id": "123456", "number": "ER-001", "title": "Q1 Business Travel", "employee": {"id": "12345", "display_name": "John Doe"}, "status": "submitted", "transaction_date": "2021-05-01T12:00:00.000Z", "posting_date": "2024-06-01", "due_date": "2024-06-15", "currency": "USD", "currency_rate": 0.69, "sub_total": 250, "total_tax": 25, "total_amount": 1250.75, "reimbursable_amount": 1100, "memo": "Business travel expenses for Q1 client meetings", "department": {"id": "12345", "display_id": "123456", "name": "Acme Inc.", "downstream_id": "12345"}, "location": {"id": "123456", "display_id": "123456", "name": "New York Office", "downstream_id": "12345"}, "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "accounting_period": {"id": "12345", "name": "Q1 2024"}, "line_items": [{"id": "12345", "expense_category": {"id": "12345", "name": "Travel"}, "account": null, "description": "Flight to New York", "quantity": 1, "unit_price": 27500.5, "amount": 275, "tax_rate": {"id": "123456", "code": "N-T", "name": "GST on Purchases", "rate": 10}, "tax_amount": 27.5, "total_amount": 302.5, "transaction_date": "2024-05-15", "billable": true, "reimbursable": true, "customer": {"id": "12345", "display_id": "CUST00101", "display_name": "Windsurf Shop", "company_name": "The boring company", "email": "boring@boring.com"}, "department": {"id": "12345", "display_id": "123456", "name": "Acme Inc.", "downstream_id": "12345"}, "location": {"id": "123456", "display_id": "123456", "name": "New York Office", "downstream_id": "12345"}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "receipt_url": "https://example.com/receipts/123.pdf", "currency": "USD"}], "subsidiary": {"id": "12345", "display_id": "123456", "name": "Acme Inc."}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "tax_inclusive": true, "approved_by": {"id": "12345", "display_name": "Jane Smith"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]}], "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}}, "links": {"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D", "current": "https://unify.apideck.com/crm/companies", "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.expenseReportsAdd: + speakeasy-default-accounting-expense-reports-add: + parameters: + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"display_id": "123456", "number": "ER-001", "title": "Q1 Business Travel", "employee": {"id": "12345", "display_name": "John Doe"}, "status": "submitted", "transaction_date": "2021-05-01T12:00:00.000Z", "posting_date": "2024-06-01", "due_date": "2024-06-15", "currency": "USD", "currency_rate": 0.69, "sub_total": 250, "total_tax": 25, "total_amount": 1250.75, "reimbursable_amount": 1100, "memo": "Business travel expenses for Q1 client meetings", "department": {"display_id": "123456", "name": "Acme Inc."}, "location": {"id": "123456", "display_id": "123456", "name": "New York Office"}, "account": null, "accounting_period": {"id": "12345", "name": "Q1 2024"}, "line_items": [], "subsidiary": {"display_id": "123456", "name": "Acme Inc."}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "tax_inclusive": true, "approved_by": {"id": "12345", "display_name": "Jane Smith"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + responses: + "201": + application/json: {"status_code": 200, "status": "OK", "service": "netsuite", "resource": "ExpenseReports", "operation": "add", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.expenseReportsOne: + speakeasy-default-accounting-expense-reports-one: + parameters: + path: + id: "" + query: + raw: false + fields: "id,updated_at" + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "netsuite", "resource": "ExpenseReports", "operation": "one", "data": {"id": "12345", "display_id": "123456", "number": "ER-001", "title": "Q1 Business Travel", "employee": {"id": "12345", "display_name": "John Doe"}, "status": "submitted", "transaction_date": "2021-05-01T12:00:00.000Z", "posting_date": "2024-06-01", "due_date": "2024-06-15", "currency": "USD", "currency_rate": 0.69, "sub_total": 250, "total_tax": 25, "total_amount": 1250.75, "reimbursable_amount": 1100, "memo": "Business travel expenses for Q1 client meetings", "department": {"id": "12345", "display_id": "123456", "name": "Acme Inc.", "downstream_id": "12345"}, "location": {"id": "123456", "display_id": "123456", "name": "New York Office", "downstream_id": "12345"}, "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "accounting_period": {"id": "12345", "name": "Q1 2024"}, "line_items": [{"id": "12345", "expense_category": {"id": "12345", "name": "Travel"}, "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "description": "Flight to New York", "quantity": 1, "unit_price": 27500.5, "amount": 275, "tax_rate": {"id": "123456", "code": "N-T", "name": "GST on Purchases", "rate": 10}, "tax_amount": 27.5, "total_amount": 302.5, "transaction_date": "2024-05-15", "billable": true, "reimbursable": true, "customer": {"id": "12345", "display_id": "CUST00101", "display_name": "Windsurf Shop", "company_name": "The boring company", "email": "boring@boring.com"}, "department": {"id": "12345", "display_id": "123456", "name": "Acme Inc.", "downstream_id": "12345"}, "location": null, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "receipt_url": "https://example.com/receipts/123.pdf", "currency": "USD"}], "subsidiary": {"id": "12345", "display_id": "123456", "name": "Acme Inc."}, "tracking_categories": [{"id": "123456", "code": "100", "name": "New York", "parent_id": "123456", "parent_name": "New York"}], "tax_inclusive": true, "approved_by": {"id": "12345", "display_name": "Jane Smith"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "updated_at": "2020-09-30T07:43:32.000Z", "created_at": "2020-09-30T07:43:32.000Z", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.expenseReportsUpdate: + speakeasy-default-accounting-expense-reports-update: + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"display_id": "123456", "number": "ER-001", "title": "Q1 Business Travel", "employee": {"id": "12345", "display_name": "John Doe"}, "status": "submitted", "transaction_date": "2021-05-01T12:00:00.000Z", "posting_date": "2024-06-01", "due_date": "2024-06-15", "currency": "USD", "currency_rate": 0.69, "sub_total": 250, "total_tax": 25, "total_amount": 1250.75, "reimbursable_amount": 1100, "memo": "Business travel expenses for Q1 client meetings", "department": {"display_id": "123456", "name": "Acme Inc."}, "location": {"id": "123456", "display_id": "123456", "name": "New York Office"}, "account": {"id": "123456", "name": "Bank account", "nominal_code": "N091", "code": "453", "parent_id": "123456", "display_id": "123456"}, "accounting_period": {"id": "12345", "name": "Q1 2024"}, "line_items": [], "subsidiary": {"display_id": "123456", "name": "Acme Inc."}, "tracking_categories": null, "tax_inclusive": true, "approved_by": {"id": "12345", "display_name": "Jane Smith"}, "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "row_version": "1-12345", "pass_through": [{"service_id": "", "extend_paths": [{"path": "$.nested.property", "value": {"TaxClassificationRef": {"value": "EUC-99990201-V1-00020000"}}}]}]} + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "netsuite", "resource": "ExpenseReports", "operation": "update", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.expenseReportsDelete: + speakeasy-default-accounting-expense-reports-delete: + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "netsuite", "resource": "ExpenseReports", "operation": "delete", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror", "downstream_errors": [{"message": "Account code '100' has been archived or deleted", "detail": "Each line item must reference a valid account", "code": "VALIDATION_ERROR"}]} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes Detected:\n* `apideck.ecommerce.customers.list()`: \n * `request.filter` **Changed** **Breaking** :warning:\n * `error.downstream_errors` **Added**\n* `apideck.proxy.get()`: **Added**\n* `apideck.proxy.options()`: **Added**\n* `apideck.proxy.post()`: **Added**\n* `apideck.proxy.put()`: **Added**\n* `apideck.proxy.patch()`: **Added**\n* `apideck.proxy.delete()`: **Added**\n* `apideck.accounting.tax_rates.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.tax_rates.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.tax_rates.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.tax_rates.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.tax_rates.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bills.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bills.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bills.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bills.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bills.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.invoices.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.invoices.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.invoices.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.invoices.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.invoices.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.ledger_accounts.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.ledger_accounts.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.ledger_accounts.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.ledger_accounts.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.ledger_accounts.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.invoice_items.list()`: \n * `request.filter` **Changed**\n * `error.downstream_errors` **Added**\n* `apideck.accounting.invoice_items.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.invoice_items.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.invoice_items.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.invoice_items.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.credit_notes.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.credit_notes.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.credit_notes.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.credit_notes.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.credit_notes.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.customers.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.customers.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.customers.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.customers.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.customers.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.suppliers.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.suppliers.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.suppliers.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.suppliers.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.suppliers.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.payments.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.payments.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.payments.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.payments.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.payments.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.company_info.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.balance_sheet.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.profit_and_loss.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.journal_entries.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.journal_entries.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.journal_entries.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.journal_entries.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.journal_entries.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.purchase_orders.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.purchase_orders.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.purchase_orders.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.purchase_orders.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.purchase_orders.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.subsidiaries.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.subsidiaries.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.subsidiaries.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.subsidiaries.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.subsidiaries.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.locations.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.locations.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.locations.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.locations.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.locations.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.departments.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.departments.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.departments.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.departments.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.departments.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.attachments.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.attachments.upload()`: `error.downstream_errors` **Added**\n* `apideck.accounting.attachments.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.attachments.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.attachments.download()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_accounts.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_accounts.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_accounts.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_accounts.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_accounts.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.tracking_categories.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.tracking_categories.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.tracking_categories.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.tracking_categories.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.tracking_categories.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bill_payments.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bill_payments.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bill_payments.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bill_payments.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bill_payments.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.expenses.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.expenses.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.expenses.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.expenses.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.expenses.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.aged_creditors.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.aged_debtors.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_feed_accounts.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_feed_accounts.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_feed_accounts.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_feed_accounts.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_feed_accounts.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_feed_statements.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_feed_statements.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_feed_statements.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_feed_statements.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.bank_feed_statements.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.categories.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.categories.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.quotes.list()`: `error.downstream_errors` **Added**\n* `apideck.accounting.quotes.create()`: `error.downstream_errors` **Added**\n* `apideck.accounting.quotes.get()`: `error.downstream_errors` **Added**\n* `apideck.accounting.quotes.update()`: `error.downstream_errors` **Added**\n* `apideck.accounting.quotes.delete()`: `error.downstream_errors` **Added**\n* `apideck.accounting.projects.list()`: \n * `request.filter` **Changed**\n * `response.data.[].completion_date` **Added**\n * `error.downstream_errors` **Added**\n* `apideck.accounting.projects.create()`: \n * `request.completion_date` **Added**\n * `error.downstream_errors` **Added**\n* `apideck.accounting.projects.get()`: \n * `response.data.completion_date` **Added**\n * `error.downstream_errors` **Added**\n* `apideck.accounting.projects.update()`: \n * `request.completion_date` **Added**\n * `error.downstream_errors` **Added**\n* `apideck.accounting.projects.delete()`: `error.downstream_errors` **Added**\n* `apideck.ats.jobs.list()`: `error.downstream_errors` **Added**\n* `apideck.ats.jobs.get()`: `error.downstream_errors` **Added**\n* `apideck.ats.applicants.list()`: `error.downstream_errors` **Added**\n* `apideck.ats.applicants.create()`: `error.downstream_errors` **Added**\n* `apideck.ats.applicants.get()`: `error.downstream_errors` **Added**\n* `apideck.ats.applicants.update()`: `error.downstream_errors` **Added**\n* `apideck.ats.applicants.delete()`: `error.downstream_errors` **Added**\n* `apideck.ats.applications.list()`: `error.downstream_errors` **Added**\n* `apideck.ats.applications.create()`: `error.downstream_errors` **Added**\n* `apideck.ats.applications.get()`: `error.downstream_errors` **Added**\n* `apideck.ats.applications.update()`: `error.downstream_errors` **Added**\n* `apideck.ats.applications.delete()`: `error.downstream_errors` **Added**\n* `apideck.crm.companies.list()`: \n * `request.filter` **Changed**\n * `error.downstream_errors` **Added**\n* `apideck.crm.companies.create()`: `error.downstream_errors` **Added**\n* `apideck.crm.companies.get()`: `error.downstream_errors` **Added**\n* `apideck.crm.companies.update()`: `error.downstream_errors` **Added**\n* `apideck.crm.companies.delete()`: `error.downstream_errors` **Added**\n* `apideck.crm.contacts.list()`: \n * `request.filter` **Changed**\n * `error.downstream_errors` **Added**\n* `apideck.crm.contacts.create()`: `error.downstream_errors` **Added**\n* `apideck.crm.contacts.get()`: \n * `request.filter` **Changed**\n * `error.downstream_errors` **Added**\n* `apideck.crm.contacts.update()`: `error.downstream_errors` **Added**\n* `apideck.crm.contacts.delete()`: `error.downstream_errors` **Added**\n* `apideck.crm.opportunities.list()`: `error.downstream_errors` **Added**\n* `apideck.crm.opportunities.create()`: `error.downstream_errors` **Added**\n* `apideck.crm.opportunities.get()`: `error.downstream_errors` **Added**\n* `apideck.crm.opportunities.update()`: `error.downstream_errors` **Added**\n* `apideck.crm.opportunities.delete()`: `error.downstream_errors` **Added**\n* `apideck.crm.leads.list()`: `error.downstream_errors` **Added**\n* `apideck.crm.leads.create()`: `error.downstream_errors` **Added**\n* `apideck.crm.leads.get()`: `error.downstream_errors` **Added**\n* `apideck.crm.leads.update()`: `error.downstream_errors` **Added**\n* `apideck.crm.leads.delete()`: `error.downstream_errors` **Added**\n* `apideck.crm.pipelines.list()`: `error.downstream_errors` **Added**\n* `apideck.crm.pipelines.create()`: `error.downstream_errors` **Added**\n* `apideck.crm.pipelines.get()`: `error.downstream_errors` **Added**\n* `apideck.crm.pipelines.update()`: `error.downstream_errors` **Added**\n* `apideck.crm.pipelines.delete()`: `error.downstream_errors` **Added**\n* `apideck.crm.notes.list()`: `error.downstream_errors` **Added**\n* `apideck.crm.notes.create()`: `error.downstream_errors` **Added**\n* `apideck.crm.notes.get()`: `error.downstream_errors` **Added**\n* `apideck.crm.notes.update()`: `error.downstream_errors` **Added**\n* `apideck.crm.notes.delete()`: `error.downstream_errors` **Added**\n* `apideck.crm.users.list()`: `error.downstream_errors` **Added**\n* `apideck.crm.users.create()`: `error.downstream_errors` **Added**\n* `apideck.crm.users.get()`: `error.downstream_errors` **Added**\n* `apideck.crm.users.update()`: `error.downstream_errors` **Added**\n* `apideck.crm.users.delete()`: `error.downstream_errors` **Added**\n* `apideck.crm.activities.list()`: `error.downstream_errors` **Added**\n* `apideck.crm.activities.create()`: `error.downstream_errors` **Added**\n* `apideck.crm.activities.get()`: `error.downstream_errors` **Added**\n* `apideck.crm.activities.update()`: `error.downstream_errors` **Added**\n* `apideck.crm.activities.delete()`: `error.downstream_errors` **Added**\n* `apideck.crm.custom_object_schemas.list()`: `error.downstream_errors` **Added**\n* `apideck.crm.custom_object_schemas.create()`: `error.downstream_errors` **Added**\n* `apideck.crm.custom_object_schemas.get()`: `error.downstream_errors` **Added**\n* `apideck.crm.custom_object_schemas.update()`: `error.downstream_errors` **Added**\n* `apideck.crm.custom_object_schemas.delete()`: `error.downstream_errors` **Added**\n* `apideck.crm.custom_objects.list()`: `error.downstream_errors` **Added**\n* `apideck.crm.custom_objects.create()`: `error.downstream_errors` **Added**\n* `apideck.crm.custom_objects.get()`: `error.downstream_errors` **Added**\n* `apideck.crm.custom_objects.update()`: `error.downstream_errors` **Added**\n* `apideck.crm.custom_objects.delete()`: `error.downstream_errors` **Added**\n* `apideck.ecommerce.orders.list()`: `error.downstream_errors` **Added**\n* `apideck.ecommerce.orders.get()`: `error.downstream_errors` **Added**\n* `apideck.ecommerce.products.list()`: `error.downstream_errors` **Added**\n* `apideck.ecommerce.products.get()`: `error.downstream_errors` **Added**\n* `apideck.ecommerce.customers.get()`: `error.downstream_errors` **Added**\n* `apideck.ecommerce.stores.get()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.files.list()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.files.search()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.files.get()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.files.update()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.files.delete()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.files.download()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.files.export()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.folders.create()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.folders.get()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.folders.update()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.folders.delete()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.folders.copy()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.shared_links.list()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.shared_links.create()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.shared_links.get()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.shared_links.update()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.shared_links.delete()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.upload_sessions.create()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.upload_sessions.get()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.upload_sessions.upload()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.upload_sessions.delete()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.upload_sessions.finish()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.drives.list()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.drives.create()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.drives.get()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.drives.update()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.drives.delete()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.drive_groups.list()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.drive_groups.create()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.drive_groups.get()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.drive_groups.update()`: `error.downstream_errors` **Added**\n* `apideck.file_storage.drive_groups.delete()`: `error.downstream_errors` **Added**\n* `apideck.hris.employees.list()`: `error.downstream_errors` **Added**\n* `apideck.hris.employees.create()`: `error.downstream_errors` **Added**\n* `apideck.hris.employees.get()`: `error.downstream_errors` **Added**\n* `apideck.hris.employees.update()`: `error.downstream_errors` **Added**\n* `apideck.hris.employees.delete()`: `error.downstream_errors` **Added**\n* `apideck.hris.companies.list()`: `error.downstream_errors` **Added**\n* `apideck.hris.companies.create()`: `error.downstream_errors` **Added**\n* `apideck.hris.companies.get()`: `error.downstream_errors` **Added**\n* `apideck.hris.companies.update()`: `error.downstream_errors` **Added**\n* `apideck.hris.companies.delete()`: `error.downstream_errors` **Added**\n* `apideck.hris.departments.list()`: `error.downstream_errors` **Added**\n* `apideck.hris.departments.create()`: `error.downstream_errors` **Added**\n* `apideck.hris.departments.get()`: `error.downstream_errors` **Added**\n* `apideck.hris.departments.update()`: `error.downstream_errors` **Added**\n* `apideck.hris.departments.delete()`: `error.downstream_errors` **Added**\n* `apideck.hris.payrolls.list()`: `error.downstream_errors` **Added**\n* `apideck.hris.payrolls.get()`: `error.downstream_errors` **Added**\n* `apideck.hris.employee_payrolls.list()`: `error.downstream_errors` **Added**\n* `apideck.hris.employee_payrolls.get()`: `error.downstream_errors` **Added**\n* `apideck.hris.employee_schedules.list()`: `error.downstream_errors` **Added**\n* `apideck.hris.time_off_requests.list()`: `error.downstream_errors` **Added**\n* `apideck.hris.time_off_requests.create()`: `error.downstream_errors` **Added**\n* `apideck.hris.time_off_requests.get()`: `error.downstream_errors` **Added**\n* `apideck.hris.time_off_requests.update()`: `error.downstream_errors` **Added**\n* `apideck.hris.time_off_requests.delete()`: `error.downstream_errors` **Added**\n* `apideck.sms.messages.list()`: `error.downstream_errors` **Added**\n* `apideck.sms.messages.create()`: `error.downstream_errors` **Added**\n* `apideck.sms.messages.get()`: `error.downstream_errors` **Added**\n* `apideck.sms.messages.update()`: `error.downstream_errors` **Added**\n* `apideck.sms.messages.delete()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collections.list()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collections.get()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_tickets.list()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_tickets.create()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_tickets.get()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_tickets.update()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_tickets.delete()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_ticket_comments.list()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_ticket_comments.create()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_ticket_comments.get()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_ticket_comments.update()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_ticket_comments.delete()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_users.list()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_users.get()`: `error.downstream_errors` **Added**\n* `apideck.issue_tracking.collection_tags.list()`: `error.downstream_errors` **Added**\n* `apideck.connector.connectors.list()`: `error.downstream_errors` **Added**\n* `apideck.connector.apis.list()`: `error.downstream_errors` **Added**\n* `apideck.vault.consumers.create()`: `error.downstream_errors` **Added**\n* `apideck.vault.consumers.list()`: `error.downstream_errors` **Added**\n* `apideck.vault.consumers.get()`: `error.downstream_errors` **Added**\n* `apideck.vault.consumers.update()`: `error.downstream_errors` **Added**\n* `apideck.vault.consumers.delete()`: `error.downstream_errors` **Added**\n* `apideck.vault.consumer_request_counts.list()`: `error.downstream_errors` **Added**\n* `apideck.vault.connections.list()`: `error.downstream_errors` **Added**\n* `apideck.vault.connections.get()`: `error.downstream_errors` **Added**\n* `apideck.vault.connections.update()`: `error.downstream_errors` **Added**\n* `apideck.vault.connections.delete()`: `error.downstream_errors` **Added**\n* `apideck.vault.connections.imports()`: `error.downstream_errors` **Added**\n* `apideck.vault.connections.token()`: `error.downstream_errors` **Added**\n* `apideck.vault.validate_connection.state()`: `error.downstream_errors` **Added**\n* `apideck.vault.connection_consents.list()`: `error.downstream_errors` **Added**\n* `apideck.vault.connection_consent.update()`: `error.downstream_errors` **Added**\n* `apideck.vault.create_callback.state()`: `error.downstream_errors` **Added**\n* `apideck.vault.connection_settings.list()`: `error.downstream_errors` **Added**\n* `apideck.vault.connection_settings.update()`: `error.downstream_errors` **Added**\n* `apideck.vault.custom_fields.list()`: `error.downstream_errors` **Added**\n* `apideck.vault.connection_custom_mappings.list()`: `error.downstream_errors` **Added**\n* `apideck.vault.custom_mappings.list()`: `error.downstream_errors` **Added**\n* `apideck.vault.sessions.create()`: `error.downstream_errors` **Added**\n* `apideck.vault.logs.list()`: `error.downstream_errors` **Added**\n* `apideck.webhook.webhooks.list()`: `error.downstream_errors` **Added**\n* `apideck.webhook.webhooks.create()`: `error.downstream_errors` **Added**\n* `apideck.webhook.webhooks.get()`: `error.downstream_errors` **Added**\n* `apideck.webhook.webhooks.update()`: `error.downstream_errors` **Added**\n* `apideck.webhook.webhooks.delete()`: `error.downstream_errors` **Added**\n* `apideck.webhook.event_logs.list()`: `error.downstream_errors` **Added**\n" +releaseNotes: | + ## Python SDK Changes Detected: + * `apideck.accounting.employees.list()`: **Added** + * `apideck.accounting.employees.create()`: **Added** + * `apideck.accounting.employees.get()`: **Added** + * `apideck.accounting.employees.update()`: **Added** + * `apideck.accounting.employees.delete()`: **Added** + * `apideck.accounting.expense_categories.list()`: **Added** + * `apideck.accounting.expense_categories.create()`: **Added** + * `apideck.accounting.expense_categories.get()`: **Added** + * `apideck.accounting.expense_categories.update()`: **Added** + * `apideck.accounting.expense_categories.delete()`: **Added** + * `apideck.accounting.expense_reports.list()`: **Added** + * `apideck.accounting.expense_reports.create()`: **Added** + * `apideck.accounting.expense_reports.get()`: **Added** + * `apideck.accounting.expense_reports.update()`: **Added** + * `apideck.accounting.expense_reports.delete()`: **Added** trackedFiles: .devcontainer/README.md: last_write_checksum: sha1:07adb0c0c051a9be4d479ea06461f3a9b3bbeb2f @@ -19022,6 +19569,106 @@ trackedFiles: last_write_checksum: sha1:519b744f1fd7c6e5159b4d36b233f9259c734dcd docs/models/accountingdepartmentsupdateresponse.md: last_write_checksum: sha1:462f499e64cce257ffdd6b69e593c2febae5b360 + docs/models/accountingemployee.md: + last_write_checksum: sha1:ccc87de844f147e2cf2ea7ba58789a3592f92a50 + docs/models/accountingemployeeinput.md: + last_write_checksum: sha1:7c4a2faed43a505d632f707d4e6d7b2fac5c025d + docs/models/accountingemployeemanager.md: + last_write_checksum: sha1:7efa85c8a38894e03a82f1741bf64cd1832f2b21 + docs/models/accountingemployeesaddglobals.md: + last_write_checksum: sha1:4760aa91a5e456a9fd0ba3c1b9d028369256663e + docs/models/accountingemployeesaddrequest.md: + last_write_checksum: sha1:e9be8f73030e7c54efad22c124ff2b7e24e67760 + docs/models/accountingemployeesaddresponse.md: + last_write_checksum: sha1:1e914203b509ffacb1ea522fcde30be38c3cdcee + docs/models/accountingemployeesallglobals.md: + last_write_checksum: sha1:bd8564cedc871ccec59aaa083e31e7c9390e36d8 + docs/models/accountingemployeesallrequest.md: + last_write_checksum: sha1:943e2e072197f8225eecd23503629fac6c1e4085 + docs/models/accountingemployeesallresponse.md: + last_write_checksum: sha1:8e69640b825370f8efb374195fade162a43bac34 + docs/models/accountingemployeesdeleteglobals.md: + last_write_checksum: sha1:a4a042f3dab6ece6be7d5cf7ee85adbaf3b7fd8d + docs/models/accountingemployeesdeleterequest.md: + last_write_checksum: sha1:59c930eab6af3f39012d5e3c464b5e95997b9114 + docs/models/accountingemployeesdeleteresponse.md: + last_write_checksum: sha1:7a32f64e1027dad4ef08c9b7bcb4c9fb66586c2d + docs/models/accountingemployeesfilter.md: + last_write_checksum: sha1:6deef76cd9d969a956dde79b2fae93ce2a073b7f + docs/models/accountingemployeesfilterstatus.md: + last_write_checksum: sha1:59a3a648d7208c9086b4056a4d7c3ef39b5b5315 + docs/models/accountingemployeesoneglobals.md: + last_write_checksum: sha1:90049bf2478b5fcb261fab0fd0f598c7c937846b + docs/models/accountingemployeesonerequest.md: + last_write_checksum: sha1:d6190863b24410b27bb94ffcd0c018f640b4c2f3 + docs/models/accountingemployeesoneresponse.md: + last_write_checksum: sha1:2aefec379ed1f6b0cbb85807bf0090e0b3c2839d + docs/models/accountingemployeesupdateglobals.md: + last_write_checksum: sha1:ec45816c74fe5e531e4cf99127fbcc90b5a92e7a + docs/models/accountingemployeesupdaterequest.md: + last_write_checksum: sha1:7164e72c1818817216ba02d1fcb406de16cbfedd + docs/models/accountingemployeesupdateresponse.md: + last_write_checksum: sha1:59738daf78a8218c5abef86ae945053413cffd1d + docs/models/accountingexpensecategoriesaddglobals.md: + last_write_checksum: sha1:d2d53e61101e8f2eb3525dbf59d5b8628c8a1930 + docs/models/accountingexpensecategoriesaddrequest.md: + last_write_checksum: sha1:dab1f1b8bf4cb1e1a7ad3e46a0137e67d0ee27d4 + docs/models/accountingexpensecategoriesaddresponse.md: + last_write_checksum: sha1:30df75cc6bc1bd23832d812c0571ea6e7be909c7 + docs/models/accountingexpensecategoriesallglobals.md: + last_write_checksum: sha1:ae306bd39721a32767f7ac538653ccc02de78166 + docs/models/accountingexpensecategoriesallrequest.md: + last_write_checksum: sha1:7df3912608a105f19401cd89b3d4a335032aa3fb + docs/models/accountingexpensecategoriesallresponse.md: + last_write_checksum: sha1:031426f4daa45c9f16bb163b127d5ac4c90b6e69 + docs/models/accountingexpensecategoriesdeleteglobals.md: + last_write_checksum: sha1:65d6ece6251ae2f870f8f60ed86b3372e7df4014 + docs/models/accountingexpensecategoriesdeleterequest.md: + last_write_checksum: sha1:c489a74480d37f37d55fddae090c3bc14c158052 + docs/models/accountingexpensecategoriesdeleteresponse.md: + last_write_checksum: sha1:3d6c3aac1572b15528f9d57a3f7283f0847db865 + docs/models/accountingexpensecategoriesoneglobals.md: + last_write_checksum: sha1:c329cf5ee1722ca0336a848b32eb504a1d7ee98b + docs/models/accountingexpensecategoriesonerequest.md: + last_write_checksum: sha1:a65dbd8590211170c5791b1644bdca06fa502e29 + docs/models/accountingexpensecategoriesoneresponse.md: + last_write_checksum: sha1:c72f47a7f4eafc5815f09c2b727c5972b500201d + docs/models/accountingexpensecategoriesupdateglobals.md: + last_write_checksum: sha1:735b4f2c49f9c46e22c97507170e0ec327fc5ae6 + docs/models/accountingexpensecategoriesupdaterequest.md: + last_write_checksum: sha1:b30d1e96e5a8fba46d096b53e09343d64bf34c7e + docs/models/accountingexpensecategoriesupdateresponse.md: + last_write_checksum: sha1:4497c57d9a29229dddf22b982beb177129d0ee6c + docs/models/accountingexpensereportsaddglobals.md: + last_write_checksum: sha1:b7164c02587dd7fbdf6ed9baa6906152cad3012f + docs/models/accountingexpensereportsaddrequest.md: + last_write_checksum: sha1:ee882b42fa97818ef7d376a0d8c4d5a4cd0992ea + docs/models/accountingexpensereportsaddresponse.md: + last_write_checksum: sha1:49db6688ced1680d318bfc351e54d1ac37251d06 + docs/models/accountingexpensereportsallglobals.md: + last_write_checksum: sha1:7bbdefee23df47487664f0814eb7400bf9ea63f9 + docs/models/accountingexpensereportsallrequest.md: + last_write_checksum: sha1:17883cb5a623502e55eeca2eda5b05a9baeb8a0b + docs/models/accountingexpensereportsallresponse.md: + last_write_checksum: sha1:26cc9c00d359bd0b5f43bcfc5992253f0d3eef51 + docs/models/accountingexpensereportsdeleteglobals.md: + last_write_checksum: sha1:2497960631b86c6259b9b83e192f562902a2bed1 + docs/models/accountingexpensereportsdeleterequest.md: + last_write_checksum: sha1:90999b623abe456369111d6c99e27eacd1f9354c + docs/models/accountingexpensereportsdeleteresponse.md: + last_write_checksum: sha1:ceecf048188849dcb37ed471e89f1eb8f589f44a + docs/models/accountingexpensereportsoneglobals.md: + last_write_checksum: sha1:443bd697c5857d7cf438ec1f41980f2420d56345 + docs/models/accountingexpensereportsonerequest.md: + last_write_checksum: sha1:f1f7ed7cf946c2c0ebd16d47ea8b2f83827cc703 + docs/models/accountingexpensereportsoneresponse.md: + last_write_checksum: sha1:17ea8aaaca114ba51d3019c9e3440f2fd5c73908 + docs/models/accountingexpensereportsupdateglobals.md: + last_write_checksum: sha1:5acc3a4048f18b5785c78968bb95dbab7cc5aa9d + docs/models/accountingexpensereportsupdaterequest.md: + last_write_checksum: sha1:ed254b1bb2de2a1c681cb991ddb0c06951a2956a + docs/models/accountingexpensereportsupdateresponse.md: + last_write_checksum: sha1:6d5302fdecea7094ae6f5db998a8d3159010d78e docs/models/accountingexpensesaddglobals.md: last_write_checksum: sha1:5f379f128ddb588e4893f6af81cd5f4754de6689 docs/models/accountingexpensesaddrequest.md: @@ -19240,6 +19887,8 @@ trackedFiles: last_write_checksum: sha1:a0c2ac4f81387cd873d667123c7cb90b41f63bab docs/models/accountingpaymentsupdateresponse.md: last_write_checksum: sha1:a0278bd0a78245f1c822a810f0d9b2b0984145a9 + docs/models/accountingperiod.md: + last_write_checksum: sha1:f1a4565e5088c6e94929002104eae3e2e3845412 docs/models/accountingprofitandlossoneglobals.md: last_write_checksum: sha1:8c32f601b7037cb9121150a53a81570c7258d861 docs/models/accountingprofitandlossonerequest.md: @@ -19528,6 +20177,8 @@ trackedFiles: last_write_checksum: sha1:0ee7986f4e339b12b81fc1a360f211842ec681b3 docs/models/applicationstatus.md: last_write_checksum: sha1:9e4e2f698accd1d9108574628e75778032541fb6 + docs/models/approvedby.md: + last_write_checksum: sha1:b357beb6c4659b6deeb3334e28775a09db4048d2 docs/models/assignee.md: last_write_checksum: sha1:79ae2eec09d851bdd45477f09b2c7b31f244aaa5 docs/models/assigneeinput.md: @@ -19888,6 +20539,8 @@ trackedFiles: last_write_checksum: sha1:27963d70a82e845ddc2f37b6ea7cf3e60f73c951 docs/models/createaccountingdepartmentresponse.md: last_write_checksum: sha1:a1afc4f9c1a14a555f8b40c9435f5cc1fb4294fe + docs/models/createaccountingemployeeresponse.md: + last_write_checksum: sha1:949c7ea5388cb960cbc29a84bb4d96ab50ab3b14 docs/models/createaccountinglocationresponse.md: last_write_checksum: sha1:7650b6fe1e5f8e3547ea28024fe0b51e0da14cb8 docs/models/createactivityresponse.md: @@ -19942,6 +20595,10 @@ trackedFiles: last_write_checksum: sha1:4748e36cfcc49a14f6318ba2287650f5944ff1bf docs/models/createemployeeresponse.md: last_write_checksum: sha1:418c38da48fb82c76d76e2c7cfa48776d3571f13 + docs/models/createexpensecategoryresponse.md: + last_write_checksum: sha1:1bd33e21bcb2fc69c6059c5ece8b95e860faeae1 + docs/models/createexpensereportresponse.md: + last_write_checksum: sha1:b6378823937935d05e096ee6174d358604952150 docs/models/createexpenseresponse.md: last_write_checksum: sha1:2a1341e6cf789de02035426136791c338e8162d2 docs/models/createfolderrequest.md: @@ -20396,6 +21053,8 @@ trackedFiles: last_write_checksum: sha1:951f345e7e15afa8b15efecf985614a36a99fe4e docs/models/deleteaccountingdepartmentresponse.md: last_write_checksum: sha1:7e90e4c9625ff2ef62f107204f0025137eb2007c + docs/models/deleteaccountingemployeeresponse.md: + last_write_checksum: sha1:c63fa78ad873db7d49336f45a747951127d66898 docs/models/deleteaccountinglocationresponse.md: last_write_checksum: sha1:e7381e85db2b34fdf3e79b74eb8d25548cd7f15d docs/models/deleteactivityresponse.md: @@ -20442,6 +21101,10 @@ trackedFiles: last_write_checksum: sha1:468cc4b6fdd84afd298cfe0e7588de650629a2df docs/models/deleteemployeeresponse.md: last_write_checksum: sha1:0a64f63322c70cbae158e410987937e2308c2353 + docs/models/deleteexpensecategoryresponse.md: + last_write_checksum: sha1:024b8225bd9f45713d59f2ad872ca29f8c9356b2 + docs/models/deleteexpensereportresponse.md: + last_write_checksum: sha1:98cc86b088597d56aa33cfc869c2b73ad7ee049b docs/models/deleteexpenseresponse.md: last_write_checksum: sha1:ed7fc8c7f06d5a01656ebdb3a4ba82eefa073093 docs/models/deletefileresponse.md: @@ -20646,6 +21309,8 @@ trackedFiles: last_write_checksum: sha1:8aa5ffed2776bee01e08c16634ad035bb7e89d5a docs/models/employeessortby.md: last_write_checksum: sha1:7cf5786235746fc9fa1e2877043e0647bd35c236 + docs/models/employeestatus.md: + last_write_checksum: sha1:4ecac7f44ec6f0b8af1e2229d7e9b547150b9cbb docs/models/employmentrole.md: last_write_checksum: sha1:d1b078da59cde574eb7a64e544f88e45bc57436c docs/models/employmentstatus.md: @@ -20664,6 +21329,16 @@ trackedFiles: last_write_checksum: sha1:6b3ad70d20c8db8ab8f22ff5caed132d42e44ae9 docs/models/expense.md: last_write_checksum: sha1:cc986277f925ac53a766b5031e9783dfe02cd218 + docs/models/expensecategoriesfilter.md: + last_write_checksum: sha1:e75fd051299246e9db82b3e4a48bd72f3751ad66 + docs/models/expensecategoriesfilterstatus.md: + last_write_checksum: sha1:c539a95492194f64cd703a764624e7f66c011adb + docs/models/expensecategory.md: + last_write_checksum: sha1:e9993c393d997edf56390affc2dada593bfed571 + docs/models/expensecategoryinput.md: + last_write_checksum: sha1:81da05e5770bd56ba8bc563ccdff1838f40537eb + docs/models/expensecategorystatus.md: + last_write_checksum: sha1:d17826fca8c26480ea26f548c8b0ef56484bee29 docs/models/expenseinput.md: last_write_checksum: sha1:6646b90f6e27c58a355ef185eb3e87150a2bc3c0 docs/models/expenselineitem.md: @@ -20672,6 +21347,24 @@ trackedFiles: last_write_checksum: sha1:f6669572e6685d65a5c05368a5cb1489ad2efbb8 docs/models/expensepaymenttype.md: last_write_checksum: sha1:317956776f7becd340588a851c75f34d86bb4fe5 + docs/models/expensereport.md: + last_write_checksum: sha1:b7bf68dfff63c7da50cc7aefa3429c34d6f670f9 + docs/models/expensereportemployee.md: + last_write_checksum: sha1:8601210f0c62f303ebedd9325f98110eff9d6cd3 + docs/models/expensereportinput.md: + last_write_checksum: sha1:447cb9eea8cb0801c7e455c12e4762323fc1eb0f + docs/models/expensereportlineitem.md: + last_write_checksum: sha1:a31e0c66dd95047e42975fb87eef2547bc115c16 + docs/models/expensereportlineitemexpensecategory.md: + last_write_checksum: sha1:173d036550004571abf54ade23632e0006ec8ca1 + docs/models/expensereportlineiteminput.md: + last_write_checksum: sha1:efdfcf6e77a89105e834c8ed77ea40f26e986dee + docs/models/expensereportsfilter.md: + last_write_checksum: sha1:533be8b993ddfd16144e9aaf1159c7568f40e745 + docs/models/expensereportsfilterstatus.md: + last_write_checksum: sha1:350b9dd658ebe4e37b7760c32ce9ae6853c54610 + docs/models/expensereportstatus.md: + last_write_checksum: sha1:9dab487faad1a438c2cfef1cfb89c338e5c7bdae docs/models/expensesfilter.md: last_write_checksum: sha1:a49160b91222ffd6a18855ed18866cad6b25dffd docs/models/expensesfilterstatus.md: @@ -20920,6 +21613,10 @@ trackedFiles: last_write_checksum: sha1:d9869be1a8ab2046d52d13eea2ea153f9e5f9aa1 docs/models/getaccountingdepartmentsresponse.md: last_write_checksum: sha1:e88d0717788a67342850db85a4b1ea7ac5f805af + docs/models/getaccountingemployeeresponse.md: + last_write_checksum: sha1:b54b5cf1cdf9a008a961cf9bd87e999ec3a40533 + docs/models/getaccountingemployeesresponse.md: + last_write_checksum: sha1:e9b212f6d57d1297b01b952e235695c9b643ec19 docs/models/getaccountinglocationresponse.md: last_write_checksum: sha1:046811e8fec459e95010ce6997a1535c454be4a9 docs/models/getaccountinglocationsresponse.md: @@ -21068,6 +21765,14 @@ trackedFiles: last_write_checksum: sha1:589f0489d9952dee6e2af6737a5d46ad64813408 docs/models/getemployeesresponse.md: last_write_checksum: sha1:0800bbbf067d58e32ff9a712d5cfe7e2e44d1bb9 + docs/models/getexpensecategoriesresponse.md: + last_write_checksum: sha1:657b511aebbb46a6031ecaf6ead8a034b8c3fd2f + docs/models/getexpensecategoryresponse.md: + last_write_checksum: sha1:3e94b65cd4a27abf0b1f644b650bfa68154847cc + docs/models/getexpensereportresponse.md: + last_write_checksum: sha1:5e56233651463e5b393b87a2a967614b244bf77f + docs/models/getexpensereportsresponse.md: + last_write_checksum: sha1:9ba4a2c75bf3c6de426bfe8a0a4de24422b131e7 docs/models/getexpenseresponse.md: last_write_checksum: sha1:6fb97b03aed89c71a4da5a4253d36e8ad980a264 docs/models/getexpensesresponse.md: @@ -21594,6 +22299,10 @@ trackedFiles: last_write_checksum: sha1:9943df5ea1971782389b7de3d2957e04d5c878ff docs/models/linkedresources.md: last_write_checksum: sha1:32edc8839219756cf08e96334d1107ad491009a1 + docs/models/linkedsubsidiary.md: + last_write_checksum: sha1:a4c8b72d0ca1c6a37fad58f92e133cda486b2e42 + docs/models/linkedsubsidiaryinput.md: + last_write_checksum: sha1:e9468b590f433210672059ecb6b9a0c80c876b14 docs/models/linkedsupplier.md: last_write_checksum: sha1:7da9c88e6a56c51f3c2f015e60451cbc7c241a72 docs/models/linkedsupplierinput.md: @@ -22078,6 +22787,8 @@ trackedFiles: last_write_checksum: sha1:0212e80975f1f097e8899272da7c9fb718c310c2 docs/models/updateaccountingdepartmentresponse.md: last_write_checksum: sha1:dc3321a9cd94065eae66c24ef850014c53965c0f + docs/models/updateaccountingemployeeresponse.md: + last_write_checksum: sha1:89e1f9d1cab907e3674f7ded89ecc5c67dcbdf9e docs/models/updateaccountinglocationresponse.md: last_write_checksum: sha1:a060fa0107c1547bd7f53b096a6df9bbc45e04a5 docs/models/updateactivityresponse.md: @@ -22130,6 +22841,10 @@ trackedFiles: last_write_checksum: sha1:0b38fc2b55f588c8cf42577a7212e6a5c93e284b docs/models/updateemployeeresponse.md: last_write_checksum: sha1:6a0701596510f46932a47ce4afa9ba39cbb582ba + docs/models/updateexpensecategoryresponse.md: + last_write_checksum: sha1:c717cabe56e91012f91e9c6abfd954000277bb85 + docs/models/updateexpensereportresponse.md: + last_write_checksum: sha1:8468944e3e1913305cae03ecb53a57ef0b7ac5ea docs/models/updateexpenseresponse.md: last_write_checksum: sha1:3298f09bb4655f98ddc108997a43d1dd89aac7b7 docs/models/updatefilerequest.md: @@ -22428,6 +23143,8 @@ trackedFiles: last_write_checksum: sha1:98ee6110c3a32129238df14a6861d9c0c61a2a84 docs/sdks/apideckdepartments/README.md: last_write_checksum: sha1:f9b2d7e94ad6332c1477b3d4e8e8a3b08a413b72 + docs/sdks/apideckemployees/README.md: + last_write_checksum: sha1:a7216a076976cafcc4cdf64638d9646c4c65c176 docs/sdks/apiresourcecoveragesdk/README.md: last_write_checksum: sha1:f1f7b50fc87034ce30c208e52670a3db6810f2a0 docs/sdks/apiresources/README.md: @@ -22513,11 +23230,15 @@ trackedFiles: docs/sdks/employeepayrolls/README.md: last_write_checksum: sha1:e09121648dcd0f921c9ca84727e3df556c143136 docs/sdks/employees/README.md: - last_write_checksum: sha1:a7216a076976cafcc4cdf64638d9646c4c65c176 + last_write_checksum: sha1:cd4dd262977c852dd471402bcd13db98e7b63aa4 docs/sdks/employeeschedulessdk/README.md: last_write_checksum: sha1:c1af996d6e52135a93af82e9c705a83d894b165e docs/sdks/eventlogs/README.md: last_write_checksum: sha1:d48376fe80b03118f59d1dbcbda4dacee05fa096 + docs/sdks/expensecategories/README.md: + last_write_checksum: sha1:460f0adeddf95d47fc40758b894f6340cb6e912e + docs/sdks/expensereports/README.md: + last_write_checksum: sha1:426c78a40f37559014659d8d4eef87889137d3b0 docs/sdks/expenses/README.md: last_write_checksum: sha1:86c7cca427ee056602534a2915cfc5bff31aa339 docs/sdks/files/README.md: @@ -22595,7 +23316,7 @@ trackedFiles: py.typed: last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pylintrc: - last_write_checksum: sha1:9dd6d5925551f6c9f30e6d9276512edb04b5db83 + last_write_checksum: sha1:ec6665a4862060890cf4c6ba61438d11decf5c3c pyproject.toml: last_write_checksum: sha1:f493d43c88958cd1ae52f9d8bb31dd4ca0e7c32b scripts/prepare_readme.py: @@ -22611,9 +23332,9 @@ trackedFiles: src/apideck_unify/_hooks/types.py: last_write_checksum: sha1:4b923d3d84d979af6169a9db6b81bfc373079a25 src/apideck_unify/_version.py: - last_write_checksum: sha1:5e7e8af318a52cd50b5ec8e8ca9134b4fee08e27 + last_write_checksum: sha1:3f378d2ef0d6761a85ad9af06c63ef9a9b7e0030 src/apideck_unify/accounting.py: - last_write_checksum: sha1:bd5b63b1d179c5a3b6b70c782cc3ca47fd46f0a4 + last_write_checksum: sha1:701f2a07beb11d9bae88d19c4cd909720ff4c58c src/apideck_unify/activities.py: last_write_checksum: sha1:32f7c7f98389a8d245e5de2b33a93193a62845bf src/apideck_unify/agedcreditors_sdk.py: @@ -22626,6 +23347,8 @@ trackedFiles: last_write_checksum: sha1:2def5ba958bbe3975cb539b190c9973514f0a0ed src/apideck_unify/apideck_departments.py: last_write_checksum: sha1:a87470602413b36d75af919df0388277a3d7d9f9 + src/apideck_unify/apideck_employees.py: + last_write_checksum: sha1:07f70365b3d1006291876b075019483998f74b52 src/apideck_unify/apiresourcecoverage_sdk.py: last_write_checksum: sha1:ecd702a262b28ba6269185c20d9e9edd9e02cbbb src/apideck_unify/apiresources.py: @@ -22677,7 +23400,7 @@ trackedFiles: src/apideck_unify/connectioncustommappings.py: last_write_checksum: sha1:ae1aa500e9289f1788cbb3c32d26e6af3b3f88e0 src/apideck_unify/connections.py: - last_write_checksum: sha1:bcf12cfd114ecf7ba74df763789baab5cc6e049f + last_write_checksum: sha1:e38934142b4a250c9558a28f26ab5da2bf9333c6 src/apideck_unify/connectionsettings.py: last_write_checksum: sha1:a12e446d032818e423ffd605c81a9055f0e0afc3 src/apideck_unify/connector_sdk.py: @@ -22721,11 +23444,15 @@ trackedFiles: src/apideck_unify/employeepayrolls.py: last_write_checksum: sha1:bf6186128162f21acd9169df46348c0b85e49493 src/apideck_unify/employees.py: - last_write_checksum: sha1:0ea4098cb00f67f58885a9930cb74e4d89bb32ab + last_write_checksum: sha1:bef9500c5f5cdc99dc8c4f9d195f50eb3f0faba1 src/apideck_unify/employeeschedules_sdk.py: last_write_checksum: sha1:6c31a3579eaba511d9d2b45e567c41a997a41319 src/apideck_unify/eventlogs.py: last_write_checksum: sha1:2ddfd87770cf0fe236aaa8b355fa2cff2d375602 + src/apideck_unify/expensecategories.py: + last_write_checksum: sha1:c9d68e45bbb042632a589c75ae082ab910bb76da + src/apideck_unify/expensereports.py: + last_write_checksum: sha1:13984ad8254b57dd7bee7bcf2b7038a8f3a7b694 src/apideck_unify/expenses.py: last_write_checksum: sha1:62f361dcf148e1319eb7d3e2bdcd1da1901e917b src/apideck_unify/files.py: @@ -22735,7 +23462,7 @@ trackedFiles: src/apideck_unify/folders.py: last_write_checksum: sha1:fb1034bbb1e50a93d3a6d8c6a2b5ad3543b6a452 src/apideck_unify/hris.py: - last_write_checksum: sha1:c909c50d23ccd9a0a8ae121b5890ca85f1e814f7 + last_write_checksum: sha1:37dc83b7ac6ea24f677736ec25563a776e14702e src/apideck_unify/httpclient.py: last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 src/apideck_unify/invoiceitems.py: @@ -22759,7 +23486,7 @@ trackedFiles: src/apideck_unify/messages.py: last_write_checksum: sha1:81505e18f3146769dce4b7366e3ab69d2330a80a src/apideck_unify/models/__init__.py: - last_write_checksum: sha1:b1d51438f13bc144d6a9386aa4342af38abac342 + last_write_checksum: sha1:7fd5de8feb4dc2ac01e2e684ba3891a8671228d9 src/apideck_unify/models/accounting_agedcreditorsoneop.py: last_write_checksum: sha1:6ee179d4c599e8c5baa7df4b4611653aa368d382 src/apideck_unify/models/accounting_ageddebtorsoneop.py: @@ -22862,6 +23589,36 @@ trackedFiles: last_write_checksum: sha1:4e4200062459222650e9e1d4add7dde07fc16321 src/apideck_unify/models/accounting_departmentsupdateop.py: last_write_checksum: sha1:2d30e15af1d0e6f6db2645699147ce98189a2dba + src/apideck_unify/models/accounting_employeesaddop.py: + last_write_checksum: sha1:116bb79258e029f58cecd192fd115274bfc09f41 + src/apideck_unify/models/accounting_employeesallop.py: + last_write_checksum: sha1:5538e1224137b62617ee338f68029ef44da20e4f + src/apideck_unify/models/accounting_employeesdeleteop.py: + last_write_checksum: sha1:4b4a0c0e55b36917686b651082e91a9da164b210 + src/apideck_unify/models/accounting_employeesoneop.py: + last_write_checksum: sha1:6409cb93985a3bd982b11d32b37b49e2fd052344 + src/apideck_unify/models/accounting_employeesupdateop.py: + last_write_checksum: sha1:d4dbf86be4911ed9992d797ea722dbcaac7349fc + src/apideck_unify/models/accounting_expensecategoriesaddop.py: + last_write_checksum: sha1:b37df2a30e0d5efa792d41378790087395df96a0 + src/apideck_unify/models/accounting_expensecategoriesallop.py: + last_write_checksum: sha1:bf180fb79278de4375eb5899a8c9041e72f8e857 + src/apideck_unify/models/accounting_expensecategoriesdeleteop.py: + last_write_checksum: sha1:777663d0dbf6ca347aa17173e131ab168d10f096 + src/apideck_unify/models/accounting_expensecategoriesoneop.py: + last_write_checksum: sha1:757ac0ef36e1138ae55ffcee288b20ceed25b57a + src/apideck_unify/models/accounting_expensecategoriesupdateop.py: + last_write_checksum: sha1:9a205c10c2d158a739dfc24a20ddbc9c6f2fa8e4 + src/apideck_unify/models/accounting_expensereportsaddop.py: + last_write_checksum: sha1:3753f2df93d376a871f2e037b92c8c4bd03c82b5 + src/apideck_unify/models/accounting_expensereportsallop.py: + last_write_checksum: sha1:5d41c753bbb70f74a3c6efb9dde6772501e4b1e0 + src/apideck_unify/models/accounting_expensereportsdeleteop.py: + last_write_checksum: sha1:b5dbfc2b1e6f40ecd288dfdacb7ffa59c3b4a21f + src/apideck_unify/models/accounting_expensereportsoneop.py: + last_write_checksum: sha1:34928a73c1bc1a3a069e4e7118f773f48d45625b + src/apideck_unify/models/accounting_expensereportsupdateop.py: + last_write_checksum: sha1:4e91b265dacba7fd74a11b4bce9f8243d47203b8 src/apideck_unify/models/accounting_expensesaddop.py: last_write_checksum: sha1:ef5eeef0ca73eab270be1cc1c0740a32aebfb18b src/apideck_unify/models/accounting_expensesallop.py: @@ -23010,6 +23767,10 @@ trackedFiles: last_write_checksum: sha1:caf9d1912c34e98f5016f0ce5c08fd9fee0bf81b src/apideck_unify/models/accountingdepartmentsfilter.py: last_write_checksum: sha1:2f341870d2a70256cc29b16893eef00ed1781a97 + src/apideck_unify/models/accountingemployee.py: + last_write_checksum: sha1:de0b50e71af039cce41fe6d7e9fb62b2b5ad9418 + src/apideck_unify/models/accountingemployeesfilter.py: + last_write_checksum: sha1:b65416f5fcaae565bedebcfd87c093ce9f2114ca src/apideck_unify/models/accountinglocation.py: last_write_checksum: sha1:68a62bdfa4b7df0d7ec0aa66177591a0cb678c81 src/apideck_unify/models/accountinglocationsfilter.py: @@ -23218,6 +23979,8 @@ trackedFiles: last_write_checksum: sha1:1fe4eb19cc7d92b11144a44103494cdadc5afae6 src/apideck_unify/models/createaccountingdepartmentresponse.py: last_write_checksum: sha1:c4073b3830dc8845616faa2f152a71bc44cfb1ad + src/apideck_unify/models/createaccountingemployeeresponse.py: + last_write_checksum: sha1:1f228bef425272eb29ce61d75a6a299b6ccf09b2 src/apideck_unify/models/createaccountinglocationresponse.py: last_write_checksum: sha1:6fbe29e1d4cfa3a22da0d07f1cd353e0b2ab3f55 src/apideck_unify/models/createactivityresponse.py: @@ -23270,6 +24033,10 @@ trackedFiles: last_write_checksum: sha1:f7b14e05d9a9cef4f9623858e439f8e04d8c9988 src/apideck_unify/models/createemployeeresponse.py: last_write_checksum: sha1:255aa006c5c8a439da3c1cec7a0c5f82e9aa7b56 + src/apideck_unify/models/createexpensecategoryresponse.py: + last_write_checksum: sha1:fd9224bcd4a87b9158e8b9810eaacd80f5281d13 + src/apideck_unify/models/createexpensereportresponse.py: + last_write_checksum: sha1:e2cf460b6d82241defd912a7b7be59b33b313244 src/apideck_unify/models/createexpenseresponse.py: last_write_checksum: sha1:886d11355ebacc5e7bae0e87d53971be3c706cff src/apideck_unify/models/createfolderrequest.py: @@ -23468,6 +24235,8 @@ trackedFiles: last_write_checksum: sha1:eb825912b23e59974ce1f556a7b20ef2e90515f4 src/apideck_unify/models/deleteaccountingdepartmentresponse.py: last_write_checksum: sha1:da90653b0bb1d62f0cd2da9c7445e260949c5f18 + src/apideck_unify/models/deleteaccountingemployeeresponse.py: + last_write_checksum: sha1:83c438da60778227856aabe98e6bbcce1b8f3caa src/apideck_unify/models/deleteaccountinglocationresponse.py: last_write_checksum: sha1:de720d7ae3c80bad3bc8da3e5c9da4c543db4f27 src/apideck_unify/models/deleteactivityresponse.py: @@ -23512,6 +24281,10 @@ trackedFiles: last_write_checksum: sha1:bf4fbbb8782bf99ad030b5465e4593946997563f src/apideck_unify/models/deleteemployeeresponse.py: last_write_checksum: sha1:4f38f71852689d53571d82b2c0d57c4ef9e70ade + src/apideck_unify/models/deleteexpensecategoryresponse.py: + last_write_checksum: sha1:4f1d4a5ace9bad381c0448b39eabed79e78060a9 + src/apideck_unify/models/deleteexpensereportresponse.py: + last_write_checksum: sha1:98f7d22b53ad62687b2171f83e7865157b996f49 src/apideck_unify/models/deleteexpenseresponse.py: last_write_checksum: sha1:de1742f9e6ededc234f7e9f7310c2ffe6bf5dac3 src/apideck_unify/models/deletefileresponse.py: @@ -23646,10 +24419,20 @@ trackedFiles: last_write_checksum: sha1:952640b4677117c6a8e60fa302e4314100e8b3cc src/apideck_unify/models/expense.py: last_write_checksum: sha1:90c22ea347e193287b8d31815e68cedf79c21999 + src/apideck_unify/models/expensecategoriesfilter.py: + last_write_checksum: sha1:9d5e7a7b2f686999016fe7f8f693daabe148380c + src/apideck_unify/models/expensecategory.py: + last_write_checksum: sha1:51a7f15a44a68d410497c2f53a4dd33ba1b72cff src/apideck_unify/models/expenselineitem.py: last_write_checksum: sha1:c2c4b931ea5c5e6f4a1e55c917337f25acb645da src/apideck_unify/models/expenselineitem_input.py: last_write_checksum: sha1:eb6f6de0af7df60572e36bb8626fc0453714ce4a + src/apideck_unify/models/expensereport.py: + last_write_checksum: sha1:f7110b1d39fac0eaf366fb245c2129603890aa03 + src/apideck_unify/models/expensereportlineitem.py: + last_write_checksum: sha1:89e8157577d8e21e4d37cc11c193b4699cae7c85 + src/apideck_unify/models/expensereportsfilter.py: + last_write_checksum: sha1:db258ac1106944e4b96488a4bedcd24d79bd4dca src/apideck_unify/models/expensesfilter.py: last_write_checksum: sha1:300b70fa442e7a48e4b5e7a721663a8583e4be8a src/apideck_unify/models/filesfilter.py: @@ -23738,6 +24521,10 @@ trackedFiles: last_write_checksum: sha1:ceea84cbbe355df79e9d3ca9b4461ccd41e6bf23 src/apideck_unify/models/getaccountingdepartmentsresponse.py: last_write_checksum: sha1:7f522e45e5ba3c40c6af98f4ee67c5fbfcad8eaa + src/apideck_unify/models/getaccountingemployeeresponse.py: + last_write_checksum: sha1:1150542ea12b2ecffc989204186e797e03f07966 + src/apideck_unify/models/getaccountingemployeesresponse.py: + last_write_checksum: sha1:d5f68469b36f3ae2b7a96ac73ad16014b488f860 src/apideck_unify/models/getaccountinglocationresponse.py: last_write_checksum: sha1:d5e5368445e74ef0aaafc59e6f85b3a6499b9875 src/apideck_unify/models/getaccountinglocationsresponse.py: @@ -23886,6 +24673,14 @@ trackedFiles: last_write_checksum: sha1:591ae5d137587e8c0811c959f9cf6241fb8e630b src/apideck_unify/models/getemployeesresponse.py: last_write_checksum: sha1:bf63830080a9fd78448bc9c4d470426699eb7a68 + src/apideck_unify/models/getexpensecategoriesresponse.py: + last_write_checksum: sha1:46c26d66092f6ffd12449f98df176d039cec6964 + src/apideck_unify/models/getexpensecategoryresponse.py: + last_write_checksum: sha1:0f30930bb5c4102fa01146f679e1b5d0f6c5d985 + src/apideck_unify/models/getexpensereportresponse.py: + last_write_checksum: sha1:0eb861f32bc9ef33f6c431b60b5eb6af9ca1b60c + src/apideck_unify/models/getexpensereportsresponse.py: + last_write_checksum: sha1:71fc94489e87b8395564c09a884c3a2a929f559e src/apideck_unify/models/getexpenseresponse.py: last_write_checksum: sha1:9d8ea10210ed55a8155c382addd2c5faa1ec8523 src/apideck_unify/models/getexpensesresponse.py: @@ -24067,7 +24862,7 @@ trackedFiles: src/apideck_unify/models/integrationstate.py: last_write_checksum: sha1:0c39018e000c3117ac1074214900a2bf02cd8da1 src/apideck_unify/models/internal/__init__.py: - last_write_checksum: sha1:5beaf7e5a713d3eead465c6edcfdeb7f8076175c + last_write_checksum: sha1:9171cd0e2d96b965a4c05dcb33becbad59639700 src/apideck_unify/models/internal/globals.py: last_write_checksum: sha1:68f480e877fad9ca1301e2bb35d5cb5979f916dd src/apideck_unify/models/invoice.py: @@ -24180,6 +24975,10 @@ trackedFiles: last_write_checksum: sha1:dabb33ef72aeb43c97d97f9cc996a611fa8329d4 src/apideck_unify/models/linkedpurchaseorder.py: last_write_checksum: sha1:d5a71165af7cbcfe5c202cf4755f6119a82d8ef4 + src/apideck_unify/models/linkedsubsidiary.py: + last_write_checksum: sha1:6e557a15646749ea6331dbfcbd842df452389b71 + src/apideck_unify/models/linkedsubsidiary_input.py: + last_write_checksum: sha1:3ac86a561f033773d9e41bef46595600b46a4ee3 src/apideck_unify/models/linkedsupplier.py: last_write_checksum: sha1:55657c056e98a878b3b667be44265a67f035ab06 src/apideck_unify/models/linkedsupplier_input.py: @@ -24396,6 +25195,8 @@ trackedFiles: last_write_checksum: sha1:e5ee35bbf216ade12c35fe47fe2bae42482b1c8f src/apideck_unify/models/updateaccountingdepartmentresponse.py: last_write_checksum: sha1:52919d25307a1b6263b7cae772be52a6efebc520 + src/apideck_unify/models/updateaccountingemployeeresponse.py: + last_write_checksum: sha1:1b9d46df108e641af61537ba321de6e68751a476 src/apideck_unify/models/updateaccountinglocationresponse.py: last_write_checksum: sha1:2fd85ca26d8ee353589c8a96502851bf86db4113 src/apideck_unify/models/updateactivityresponse.py: @@ -24446,6 +25247,10 @@ trackedFiles: last_write_checksum: sha1:ccd5aad17dfa867c41c2c8d69cd927d44ae2be8a src/apideck_unify/models/updateemployeeresponse.py: last_write_checksum: sha1:f79ad959f7889fc0fb222b0a0f93b808aaaa7cae + src/apideck_unify/models/updateexpensecategoryresponse.py: + last_write_checksum: sha1:5de52b2696baeaf2fd336db4fa20a6b551dfb81a + src/apideck_unify/models/updateexpensereportresponse.py: + last_write_checksum: sha1:78f88e5a32655ce4087db49175d9ebc7d9b33f5b src/apideck_unify/models/updateexpenseresponse.py: last_write_checksum: sha1:6b07eae3ce05e43bf47f18f7218f3558da57993e src/apideck_unify/models/updatefilerequest.py: @@ -24605,7 +25410,7 @@ trackedFiles: src/apideck_unify/projects.py: last_write_checksum: sha1:cad624247aa59550f9359d6396bf8b2da6e86aa5 src/apideck_unify/proxy.py: - last_write_checksum: sha1:5486df4f7e403adf056a4e73e071fa6bb56847b0 + last_write_checksum: sha1:972a4e45c6330f2f130a33b49729cba2351e90e4 src/apideck_unify/purchaseorders.py: last_write_checksum: sha1:10087d944986109ae24b27f32954df988be2addb src/apideck_unify/py.typed: @@ -24617,7 +25422,7 @@ trackedFiles: src/apideck_unify/sdkconfiguration.py: last_write_checksum: sha1:41dc7958d7c9ad55f49a781091bea6d6d4c8d7ab src/apideck_unify/sessions.py: - last_write_checksum: sha1:2b85bd8bdefa07aa739c300c74c35620a47b8fef + last_write_checksum: sha1:f61f2a163f855ee39be7eb837cef9241d6dc3d54 src/apideck_unify/sharedlinks.py: last_write_checksum: sha1:d17a3923e59d4359c52cfbeb2f35d6df70e01c3e src/apideck_unify/sms.py: @@ -24639,15 +25444,17 @@ trackedFiles: src/apideck_unify/types/basemodel.py: last_write_checksum: sha1:10d84aedeb9d35edfdadf2c3020caa1d24d8b584 src/apideck_unify/uploadsessions.py: - last_write_checksum: sha1:26f81c5cd75c45172fdb154cd35d00da624d4de4 + last_write_checksum: sha1:65c87610da3e80e3032dd54ab5b65d1d3991d4b5 src/apideck_unify/users.py: last_write_checksum: sha1:bf9559ff819260cb89eb50c14a8f405ab70f5f12 src/apideck_unify/utils/__init__.py: - last_write_checksum: sha1:141be7a6debce43d0acfb482e4b3dab85a894c4a + last_write_checksum: sha1:0f93d821f9cb3e061ea125d881bb6f61166738dd src/apideck_unify/utils/annotations.py: last_write_checksum: sha1:a4824ad65f730303e4e1e3ec1febf87b4eb46dbc src/apideck_unify/utils/datetimes.py: last_write_checksum: sha1:c721e4123000e7dc61ec52b28a739439d9e17341 + src/apideck_unify/utils/dynamic_imports.py: + last_write_checksum: sha1:a1940c63feb8eddfd8026de53384baf5056d5dcc src/apideck_unify/utils/enums.py: last_write_checksum: sha1:bc8c3c1285ae09ba8a094ee5c3d9c7f41fa1284d src/apideck_unify/utils/eventstreaming.py: @@ -24665,7 +25472,7 @@ trackedFiles: src/apideck_unify/utils/requestbodies.py: last_write_checksum: sha1:41e2d2d2d3ecc394c8122ca4d4b85e1c3e03f054 src/apideck_unify/utils/retries.py: - last_write_checksum: sha1:5b97ac4f59357d70c2529975d50364c88bcad607 + last_write_checksum: sha1:471372f5c5d1dd5583239c9cf3c75f1b636e5d87 src/apideck_unify/utils/security.py: last_write_checksum: sha1:ba36ede663a67e6fe1146627d1b53a03311a09c0 src/apideck_unify/utils/serializers.py: @@ -24677,7 +25484,7 @@ trackedFiles: src/apideck_unify/utils/values.py: last_write_checksum: sha1:acaa178a7c41ddd000f58cc691e4632d925b2553 src/apideck_unify/validateconnection.py: - last_write_checksum: sha1:ba9b094b67bcf617b38697d7812663d6278d547a + last_write_checksum: sha1:b0d26fdfcfcdf666d7643ef2e42ff940bb4ad701 src/apideck_unify/vault.py: last_write_checksum: sha1:3f0371863893f83e4286702b94c3802bb19efd42 src/apideck_unify/webhook_sdk.py: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 2d2a12e6..55d9fb83 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -16,6 +16,7 @@ generation: requestResponseComponentNamesFeb2024: true securityFeb2025: false sharedErrorComponentsApr2025: false + nameOverrideFeb2026: false sharedNestedComponentsJan2026: false auth: oAuth2ClientCredentialsEnabled: true @@ -31,7 +32,7 @@ generation: persistentEdits: {} versioningStrategy: automatic python: - version: 0.30.2 + version: 0.30.3 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b82b6377..3c833734 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,20 +2,20 @@ speakeasyVersion: 1.656.1 sources: Apideck: sourceNamespace: apideck - sourceRevisionDigest: sha256:805c5d71506826e388460d8af6041e25808b33d168788c1f719598ef5123ad62 - sourceBlobDigest: sha256:c54ecb0f81457065cec794f39c95cb86c462eff9bf591f673e9280b5c55d3ef6 + sourceRevisionDigest: sha256:d1aea11bc7e18967d43488273016eb4c20ecba771c4ae6a7e798f8f53992ef28 + sourceBlobDigest: sha256:bd592cb0bec1a847885023e511140ab627c15eed4c51d745779055698786810f tags: - latest - - speakeasy-sdk-regen-1770727714 - - 10.23.19 + - speakeasy-sdk-regen-1771345451 + - 10.23.21 targets: apideck: source: Apideck sourceNamespace: apideck - sourceRevisionDigest: sha256:805c5d71506826e388460d8af6041e25808b33d168788c1f719598ef5123ad62 - sourceBlobDigest: sha256:c54ecb0f81457065cec794f39c95cb86c462eff9bf591f673e9280b5c55d3ef6 + sourceRevisionDigest: sha256:d1aea11bc7e18967d43488273016eb4c20ecba771c4ae6a7e798f8f53992ef28 + sourceBlobDigest: sha256:bd592cb0bec1a847885023e511140ab627c15eed4c51d745779055698786810f codeSamplesNamespace: apideck-python-code-samples - codeSamplesRevisionDigest: sha256:aebac4228c3ab0461de187d8f8263a3ec88b5cfe379764a61c914af9edd87df0 + codeSamplesRevisionDigest: sha256:de0e762c3a5c1dee0d5f342791e79087a929a63f36bddebbc2c763be91b8274f workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 3d3a929f..db4ba293 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,30 @@ with Apideck( * [update](docs/sdks/departments/README.md#update) - Update Department * [delete](docs/sdks/departments/README.md#delete) - Delete Department +#### [accounting.employees](docs/sdks/employees/README.md) + +* [list](docs/sdks/employees/README.md#list) - List Employees +* [create](docs/sdks/employees/README.md#create) - Create Employee +* [get](docs/sdks/employees/README.md#get) - Get Employee +* [update](docs/sdks/employees/README.md#update) - Update Employee +* [delete](docs/sdks/employees/README.md#delete) - Delete Employee + +#### [accounting.expense_categories](docs/sdks/expensecategories/README.md) + +* [list](docs/sdks/expensecategories/README.md#list) - List Expense Categories +* [create](docs/sdks/expensecategories/README.md#create) - Create Expense Category +* [get](docs/sdks/expensecategories/README.md#get) - Get Expense Category +* [update](docs/sdks/expensecategories/README.md#update) - Update Expense Category +* [delete](docs/sdks/expensecategories/README.md#delete) - Delete Expense Category + +#### [accounting.expense_reports](docs/sdks/expensereports/README.md) + +* [list](docs/sdks/expensereports/README.md#list) - List Expense Reports +* [create](docs/sdks/expensereports/README.md#create) - Create Expense Report +* [get](docs/sdks/expensereports/README.md#get) - Get Expense Report +* [update](docs/sdks/expensereports/README.md#update) - Update Expense Report +* [delete](docs/sdks/expensereports/README.md#delete) - Delete Expense Report + #### [accounting.expenses](docs/sdks/expenses/README.md) * [list](docs/sdks/expenses/README.md#list) - List Expenses @@ -664,13 +688,13 @@ with Apideck( * [list](docs/sdks/employeeschedulessdk/README.md#list) - List Employee Schedules -#### [hris.employees](docs/sdks/employees/README.md) +#### [hris.employees](docs/sdks/apideckemployees/README.md) -* [list](docs/sdks/employees/README.md#list) - List Employees -* [create](docs/sdks/employees/README.md#create) - Create Employee -* [get](docs/sdks/employees/README.md#get) - Get Employee -* [update](docs/sdks/employees/README.md#update) - Update Employee -* [delete](docs/sdks/employees/README.md#delete) - Delete Employee +* [list](docs/sdks/apideckemployees/README.md#list) - List Employees +* [create](docs/sdks/apideckemployees/README.md#create) - Create Employee +* [get](docs/sdks/apideckemployees/README.md#get) - Get Employee +* [update](docs/sdks/apideckemployees/README.md#update) - Update Employee +* [delete](docs/sdks/apideckemployees/README.md#delete) - Delete Employee #### [hris.payrolls](docs/sdks/payrolls/README.md) @@ -1028,7 +1052,7 @@ with Apideck( **Inherit from [`ApideckError`](./src/apideck_unify/models/apideckerror.py)**: -* [`Unauthorized`](./src/apideck_unify/models/unauthorized.py): Unauthorized. Status code `401`. Applicable to 6 of 311 methods.* +* [`Unauthorized`](./src/apideck_unify/models/unauthorized.py): Unauthorized. Status code `401`. Applicable to 6 of 326 methods.* * [`ResponseValidationError`](./src/apideck_unify/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. diff --git a/RELEASES.md b/RELEASES.md index 57b80729..a4540841 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1048,4 +1048,14 @@ Based on: ### Generated - [python v0.30.2] . ### Releases -- [PyPI v0.30.2] https://pypi.org/project/apideck-unify/0.30.2 - . \ No newline at end of file +- [PyPI v0.30.2] https://pypi.org/project/apideck-unify/0.30.2 - . + +## 2026-02-20 13:50:59 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.656.1 (2.753.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.30.3] . +### Releases +- [PyPI v0.30.3] https://pypi.org/project/apideck-unify/0.30.3 - . \ No newline at end of file diff --git a/docs/models/accountingemployee.md b/docs/models/accountingemployee.md new file mode 100644 index 00000000..34491595 --- /dev/null +++ b/docs/models/accountingemployee.md @@ -0,0 +1,37 @@ +# AccountingEmployee + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `downstream_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The third-party API ID of original entity | 12345 | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the employee. | John | +| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the employee. | Doe | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The display name of the employee. | John Doe | +| `emails` | List[[models.Email](../models/email.md)] | :heavy_minus_sign: | Email addresses of the employee. | | +| `employee_number` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee number or identifier. | EMP-001 | +| `job_title` | *OptionalNullable[str]* | :heavy_minus_sign: | The job title of the employee. | Senior Accountant | +| `status` | [OptionalNullable[models.EmployeeStatus]](../models/employeestatus.md) | :heavy_minus_sign: | The status of the employee. | active | +| `is_contractor` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee is a contractor. | false | +| `department` | [OptionalNullable[models.LinkedDepartment]](../models/linkeddepartment.md) | :heavy_minus_sign: | N/A | | +| `location` | [OptionalNullable[models.LinkedLocation]](../models/linkedlocation.md) | :heavy_minus_sign: | N/A | | +| `manager` | [Optional[models.AccountingEmployeeManager]](../models/accountingemployeemanager.md) | :heavy_minus_sign: | The manager of the employee. | | +| `hire_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee was hired. | 2020-01-15 | +| `termination_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee was terminated. | 2025-12-31 | +| `gender` | [OptionalNullable[models.Gender]](../models/gender.md) | :heavy_minus_sign: | The gender represents the gender identity of a person. | male | +| `birth_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date of birth of the employee. | 1990-05-20 | +| `subsidiary` | [OptionalNullable[models.LinkedSubsidiary]](../models/linkedsubsidiary.md) | :heavy_minus_sign: | N/A | | +| `tracking_categories` | List[[Nullable[models.LinkedTrackingCategory]](../models/linkedtrackingcategory.md)] | :heavy_minus_sign: | A list of linked tracking categories. | | +| `currency` | [OptionalNullable[models.Currency]](../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `notes` | *OptionalNullable[str]* | :heavy_minus_sign: | Notes about the employee. | Some notes about this employee | +| `addresses` | List[[models.Address](../models/address.md)] | :heavy_minus_sign: | Addresses of the employee. | | +| `phone_numbers` | List[[models.PhoneNumber](../models/phonenumber.md)] | :heavy_minus_sign: | Phone numbers of the employee. | | +| `custom_fields` | List[[models.CustomField](../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `custom_mappings` | Dict[str, *Any*] | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `pass_through` | List[[models.PassThroughBody](../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/accountingemployeeinput.md b/docs/models/accountingemployeeinput.md new file mode 100644 index 00000000..d776f721 --- /dev/null +++ b/docs/models/accountingemployeeinput.md @@ -0,0 +1,32 @@ +# AccountingEmployeeInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the employee. | John | +| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the employee. | Doe | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The display name of the employee. | John Doe | +| `emails` | List[[models.Email](../models/email.md)] | :heavy_minus_sign: | Email addresses of the employee. | | +| `employee_number` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee number or identifier. | EMP-001 | +| `job_title` | *OptionalNullable[str]* | :heavy_minus_sign: | The job title of the employee. | Senior Accountant | +| `status` | [OptionalNullable[models.EmployeeStatus]](../models/employeestatus.md) | :heavy_minus_sign: | The status of the employee. | active | +| `is_contractor` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee is a contractor. | false | +| `department` | [OptionalNullable[models.LinkedDepartmentInput]](../models/linkeddepartmentinput.md) | :heavy_minus_sign: | N/A | | +| `location` | [OptionalNullable[models.LinkedLocationInput]](../models/linkedlocationinput.md) | :heavy_minus_sign: | N/A | | +| `manager` | [Optional[models.AccountingEmployeeManager]](../models/accountingemployeemanager.md) | :heavy_minus_sign: | The manager of the employee. | | +| `hire_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee was hired. | 2020-01-15 | +| `termination_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee was terminated. | 2025-12-31 | +| `gender` | [OptionalNullable[models.Gender]](../models/gender.md) | :heavy_minus_sign: | The gender represents the gender identity of a person. | male | +| `birth_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date of birth of the employee. | 1990-05-20 | +| `subsidiary` | [OptionalNullable[models.LinkedSubsidiaryInput]](../models/linkedsubsidiaryinput.md) | :heavy_minus_sign: | N/A | | +| `tracking_categories` | List[[Nullable[models.LinkedTrackingCategory]](../models/linkedtrackingcategory.md)] | :heavy_minus_sign: | A list of linked tracking categories. | | +| `currency` | [OptionalNullable[models.Currency]](../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `notes` | *OptionalNullable[str]* | :heavy_minus_sign: | Notes about the employee. | Some notes about this employee | +| `addresses` | List[[models.Address](../models/address.md)] | :heavy_minus_sign: | Addresses of the employee. | | +| `phone_numbers` | List[[models.PhoneNumber](../models/phonenumber.md)] | :heavy_minus_sign: | Phone numbers of the employee. | | +| `custom_fields` | List[[models.CustomField](../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `pass_through` | List[[models.PassThroughBody](../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/accountingemployeemanager.md b/docs/models/accountingemployeemanager.md new file mode 100644 index 00000000..662d8776 --- /dev/null +++ b/docs/models/accountingemployeemanager.md @@ -0,0 +1,11 @@ +# AccountingEmployeeManager + +The manager of the employee. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for the manager. | 12345 | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the manager. | Jane Smith | \ No newline at end of file diff --git a/docs/models/accountingemployeesaddglobals.md b/docs/models/accountingemployeesaddglobals.md new file mode 100644 index 00000000..d5000f56 --- /dev/null +++ b/docs/models/accountingemployeesaddglobals.md @@ -0,0 +1,9 @@ +# AccountingEmployeesAddGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingemployeesaddrequest.md b/docs/models/accountingemployeesaddrequest.md new file mode 100644 index 00000000..9d59628c --- /dev/null +++ b/docs/models/accountingemployeesaddrequest.md @@ -0,0 +1,12 @@ +# AccountingEmployeesAddRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `accounting_employee` | [models.AccountingEmployeeInput](../models/accountingemployeeinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingemployeesaddresponse.md b/docs/models/accountingemployeesaddresponse.md new file mode 100644 index 00000000..32ee788a --- /dev/null +++ b/docs/models/accountingemployeesaddresponse.md @@ -0,0 +1,10 @@ +# AccountingEmployeesAddResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `create_accounting_employee_response` | [Optional[models.CreateAccountingEmployeeResponse]](../models/createaccountingemployeeresponse.md) | :heavy_minus_sign: | Employees | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingemployeesallglobals.md b/docs/models/accountingemployeesallglobals.md new file mode 100644 index 00000000..0e56b263 --- /dev/null +++ b/docs/models/accountingemployeesallglobals.md @@ -0,0 +1,9 @@ +# AccountingEmployeesAllGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingemployeesallrequest.md b/docs/models/accountingemployeesallrequest.md new file mode 100644 index 00000000..f381dce0 --- /dev/null +++ b/docs/models/accountingemployeesallrequest.md @@ -0,0 +1,15 @@ +# AccountingEmployeesAllRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `filter_` | [Optional[models.AccountingEmployeesFilter]](../models/accountingemployeesfilter.md) | :heavy_minus_sign: | Apply filters | {
"updated_since": "2020-09-30T07:43:32.000Z",
"status": "active"
} | \ No newline at end of file diff --git a/docs/models/accountingemployeesallresponse.md b/docs/models/accountingemployeesallresponse.md new file mode 100644 index 00000000..28899a12 --- /dev/null +++ b/docs/models/accountingemployeesallresponse.md @@ -0,0 +1,10 @@ +# AccountingEmployeesAllResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_accounting_employees_response` | [Optional[models.GetAccountingEmployeesResponse]](../models/getaccountingemployeesresponse.md) | :heavy_minus_sign: | Employees | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingemployeesdeleteglobals.md b/docs/models/accountingemployeesdeleteglobals.md new file mode 100644 index 00000000..12527c3e --- /dev/null +++ b/docs/models/accountingemployeesdeleteglobals.md @@ -0,0 +1,9 @@ +# AccountingEmployeesDeleteGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingemployeesdeleterequest.md b/docs/models/accountingemployeesdeleterequest.md new file mode 100644 index 00000000..9a019267 --- /dev/null +++ b/docs/models/accountingemployeesdeleterequest.md @@ -0,0 +1,12 @@ +# AccountingEmployeesDeleteRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | \ No newline at end of file diff --git a/docs/models/accountingemployeesdeleteresponse.md b/docs/models/accountingemployeesdeleteresponse.md new file mode 100644 index 00000000..54e5d6ff --- /dev/null +++ b/docs/models/accountingemployeesdeleteresponse.md @@ -0,0 +1,10 @@ +# AccountingEmployeesDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `delete_accounting_employee_response` | [Optional[models.DeleteAccountingEmployeeResponse]](../models/deleteaccountingemployeeresponse.md) | :heavy_minus_sign: | Employees | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingemployeesfilter.md b/docs/models/accountingemployeesfilter.md new file mode 100644 index 00000000..94f6eae0 --- /dev/null +++ b/docs/models/accountingemployeesfilter.md @@ -0,0 +1,9 @@ +# AccountingEmployeesFilter + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `updated_since` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | 2020-09-30T07:43:32.000Z | +| `status` | [Optional[models.AccountingEmployeesFilterStatus]](../models/accountingemployeesfilterstatus.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingemployeesfilterstatus.md b/docs/models/accountingemployeesfilterstatus.md new file mode 100644 index 00000000..a498983e --- /dev/null +++ b/docs/models/accountingemployeesfilterstatus.md @@ -0,0 +1,10 @@ +# AccountingEmployeesFilterStatus + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `ACTIVE` | active | +| `INACTIVE` | inactive | +| `TERMINATED` | terminated | \ No newline at end of file diff --git a/docs/models/accountingemployeesoneglobals.md b/docs/models/accountingemployeesoneglobals.md new file mode 100644 index 00000000..ff870eca --- /dev/null +++ b/docs/models/accountingemployeesoneglobals.md @@ -0,0 +1,9 @@ +# AccountingEmployeesOneGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingemployeesonerequest.md b/docs/models/accountingemployeesonerequest.md new file mode 100644 index 00000000..22ed4a9a --- /dev/null +++ b/docs/models/accountingemployeesonerequest.md @@ -0,0 +1,13 @@ +# AccountingEmployeesOneRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file diff --git a/docs/models/accountingemployeesoneresponse.md b/docs/models/accountingemployeesoneresponse.md new file mode 100644 index 00000000..a797f459 --- /dev/null +++ b/docs/models/accountingemployeesoneresponse.md @@ -0,0 +1,10 @@ +# AccountingEmployeesOneResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_accounting_employee_response` | [Optional[models.GetAccountingEmployeeResponse]](../models/getaccountingemployeeresponse.md) | :heavy_minus_sign: | Employees | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingemployeesupdateglobals.md b/docs/models/accountingemployeesupdateglobals.md new file mode 100644 index 00000000..5dcfcd37 --- /dev/null +++ b/docs/models/accountingemployeesupdateglobals.md @@ -0,0 +1,9 @@ +# AccountingEmployeesUpdateGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingemployeesupdaterequest.md b/docs/models/accountingemployeesupdaterequest.md new file mode 100644 index 00000000..073a4bc3 --- /dev/null +++ b/docs/models/accountingemployeesupdaterequest.md @@ -0,0 +1,13 @@ +# AccountingEmployeesUpdateRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `accounting_employee` | [models.AccountingEmployeeInput](../models/accountingemployeeinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingemployeesupdateresponse.md b/docs/models/accountingemployeesupdateresponse.md new file mode 100644 index 00000000..5348ca3f --- /dev/null +++ b/docs/models/accountingemployeesupdateresponse.md @@ -0,0 +1,10 @@ +# AccountingEmployeesUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `update_accounting_employee_response` | [Optional[models.UpdateAccountingEmployeeResponse]](../models/updateaccountingemployeeresponse.md) | :heavy_minus_sign: | Employees | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesaddglobals.md b/docs/models/accountingexpensecategoriesaddglobals.md new file mode 100644 index 00000000..6511d9be --- /dev/null +++ b/docs/models/accountingexpensecategoriesaddglobals.md @@ -0,0 +1,9 @@ +# AccountingExpenseCategoriesAddGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesaddrequest.md b/docs/models/accountingexpensecategoriesaddrequest.md new file mode 100644 index 00000000..4d82b982 --- /dev/null +++ b/docs/models/accountingexpensecategoriesaddrequest.md @@ -0,0 +1,12 @@ +# AccountingExpenseCategoriesAddRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `expense_category` | [models.ExpenseCategoryInput](../models/expensecategoryinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesaddresponse.md b/docs/models/accountingexpensecategoriesaddresponse.md new file mode 100644 index 00000000..d8eea2c4 --- /dev/null +++ b/docs/models/accountingexpensecategoriesaddresponse.md @@ -0,0 +1,10 @@ +# AccountingExpenseCategoriesAddResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `create_expense_category_response` | [Optional[models.CreateExpenseCategoryResponse]](../models/createexpensecategoryresponse.md) | :heavy_minus_sign: | Expense Categories | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesallglobals.md b/docs/models/accountingexpensecategoriesallglobals.md new file mode 100644 index 00000000..cbd50d6a --- /dev/null +++ b/docs/models/accountingexpensecategoriesallglobals.md @@ -0,0 +1,9 @@ +# AccountingExpenseCategoriesAllGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesallrequest.md b/docs/models/accountingexpensecategoriesallrequest.md new file mode 100644 index 00000000..ebba325e --- /dev/null +++ b/docs/models/accountingexpensecategoriesallrequest.md @@ -0,0 +1,15 @@ +# AccountingExpenseCategoriesAllRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `filter_` | [Optional[models.ExpenseCategoriesFilter]](../models/expensecategoriesfilter.md) | :heavy_minus_sign: | Apply filters | {
"updated_since": "2020-09-30T07:43:32.000Z",
"status": "active"
} | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesallresponse.md b/docs/models/accountingexpensecategoriesallresponse.md new file mode 100644 index 00000000..be67c23c --- /dev/null +++ b/docs/models/accountingexpensecategoriesallresponse.md @@ -0,0 +1,10 @@ +# AccountingExpenseCategoriesAllResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_expense_categories_response` | [Optional[models.GetExpenseCategoriesResponse]](../models/getexpensecategoriesresponse.md) | :heavy_minus_sign: | Expense Categories | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesdeleteglobals.md b/docs/models/accountingexpensecategoriesdeleteglobals.md new file mode 100644 index 00000000..43a92834 --- /dev/null +++ b/docs/models/accountingexpensecategoriesdeleteglobals.md @@ -0,0 +1,9 @@ +# AccountingExpenseCategoriesDeleteGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesdeleterequest.md b/docs/models/accountingexpensecategoriesdeleterequest.md new file mode 100644 index 00000000..fd307b54 --- /dev/null +++ b/docs/models/accountingexpensecategoriesdeleterequest.md @@ -0,0 +1,12 @@ +# AccountingExpenseCategoriesDeleteRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesdeleteresponse.md b/docs/models/accountingexpensecategoriesdeleteresponse.md new file mode 100644 index 00000000..f0240104 --- /dev/null +++ b/docs/models/accountingexpensecategoriesdeleteresponse.md @@ -0,0 +1,10 @@ +# AccountingExpenseCategoriesDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `delete_expense_category_response` | [Optional[models.DeleteExpenseCategoryResponse]](../models/deleteexpensecategoryresponse.md) | :heavy_minus_sign: | Expense Categories | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesoneglobals.md b/docs/models/accountingexpensecategoriesoneglobals.md new file mode 100644 index 00000000..8ec4c87d --- /dev/null +++ b/docs/models/accountingexpensecategoriesoneglobals.md @@ -0,0 +1,9 @@ +# AccountingExpenseCategoriesOneGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesonerequest.md b/docs/models/accountingexpensecategoriesonerequest.md new file mode 100644 index 00000000..76a2bcfe --- /dev/null +++ b/docs/models/accountingexpensecategoriesonerequest.md @@ -0,0 +1,13 @@ +# AccountingExpenseCategoriesOneRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesoneresponse.md b/docs/models/accountingexpensecategoriesoneresponse.md new file mode 100644 index 00000000..5e5adffc --- /dev/null +++ b/docs/models/accountingexpensecategoriesoneresponse.md @@ -0,0 +1,10 @@ +# AccountingExpenseCategoriesOneResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_expense_category_response` | [Optional[models.GetExpenseCategoryResponse]](../models/getexpensecategoryresponse.md) | :heavy_minus_sign: | Expense Categories | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesupdateglobals.md b/docs/models/accountingexpensecategoriesupdateglobals.md new file mode 100644 index 00000000..3aa018e3 --- /dev/null +++ b/docs/models/accountingexpensecategoriesupdateglobals.md @@ -0,0 +1,9 @@ +# AccountingExpenseCategoriesUpdateGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesupdaterequest.md b/docs/models/accountingexpensecategoriesupdaterequest.md new file mode 100644 index 00000000..e0de9547 --- /dev/null +++ b/docs/models/accountingexpensecategoriesupdaterequest.md @@ -0,0 +1,13 @@ +# AccountingExpenseCategoriesUpdateRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `expense_category` | [models.ExpenseCategoryInput](../models/expensecategoryinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingexpensecategoriesupdateresponse.md b/docs/models/accountingexpensecategoriesupdateresponse.md new file mode 100644 index 00000000..9d9b5b19 --- /dev/null +++ b/docs/models/accountingexpensecategoriesupdateresponse.md @@ -0,0 +1,10 @@ +# AccountingExpenseCategoriesUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `update_expense_category_response` | [Optional[models.UpdateExpenseCategoryResponse]](../models/updateexpensecategoryresponse.md) | :heavy_minus_sign: | Expense Categories | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsaddglobals.md b/docs/models/accountingexpensereportsaddglobals.md new file mode 100644 index 00000000..130de155 --- /dev/null +++ b/docs/models/accountingexpensereportsaddglobals.md @@ -0,0 +1,9 @@ +# AccountingExpenseReportsAddGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsaddrequest.md b/docs/models/accountingexpensereportsaddrequest.md new file mode 100644 index 00000000..5a0fe471 --- /dev/null +++ b/docs/models/accountingexpensereportsaddrequest.md @@ -0,0 +1,12 @@ +# AccountingExpenseReportsAddRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `expense_report` | [models.ExpenseReportInput](../models/expensereportinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsaddresponse.md b/docs/models/accountingexpensereportsaddresponse.md new file mode 100644 index 00000000..95843746 --- /dev/null +++ b/docs/models/accountingexpensereportsaddresponse.md @@ -0,0 +1,10 @@ +# AccountingExpenseReportsAddResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `create_expense_report_response` | [Optional[models.CreateExpenseReportResponse]](../models/createexpensereportresponse.md) | :heavy_minus_sign: | Expense Reports | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsallglobals.md b/docs/models/accountingexpensereportsallglobals.md new file mode 100644 index 00000000..ea2117f2 --- /dev/null +++ b/docs/models/accountingexpensereportsallglobals.md @@ -0,0 +1,9 @@ +# AccountingExpenseReportsAllGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsallrequest.md b/docs/models/accountingexpensereportsallrequest.md new file mode 100644 index 00000000..c5b4f6d8 --- /dev/null +++ b/docs/models/accountingexpensereportsallrequest.md @@ -0,0 +1,15 @@ +# AccountingExpenseReportsAllRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `filter_` | [Optional[models.ExpenseReportsFilter]](../models/expensereportsfilter.md) | :heavy_minus_sign: | Apply filters | {
"updated_since": "2020-09-30T07:43:32.000Z",
"status": "submitted"
} | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsallresponse.md b/docs/models/accountingexpensereportsallresponse.md new file mode 100644 index 00000000..0fe2ae88 --- /dev/null +++ b/docs/models/accountingexpensereportsallresponse.md @@ -0,0 +1,10 @@ +# AccountingExpenseReportsAllResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_expense_reports_response` | [Optional[models.GetExpenseReportsResponse]](../models/getexpensereportsresponse.md) | :heavy_minus_sign: | Expense Reports | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsdeleteglobals.md b/docs/models/accountingexpensereportsdeleteglobals.md new file mode 100644 index 00000000..1b720e82 --- /dev/null +++ b/docs/models/accountingexpensereportsdeleteglobals.md @@ -0,0 +1,9 @@ +# AccountingExpenseReportsDeleteGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsdeleterequest.md b/docs/models/accountingexpensereportsdeleterequest.md new file mode 100644 index 00000000..0777cf4f --- /dev/null +++ b/docs/models/accountingexpensereportsdeleterequest.md @@ -0,0 +1,12 @@ +# AccountingExpenseReportsDeleteRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsdeleteresponse.md b/docs/models/accountingexpensereportsdeleteresponse.md new file mode 100644 index 00000000..7f78172f --- /dev/null +++ b/docs/models/accountingexpensereportsdeleteresponse.md @@ -0,0 +1,10 @@ +# AccountingExpenseReportsDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `delete_expense_report_response` | [Optional[models.DeleteExpenseReportResponse]](../models/deleteexpensereportresponse.md) | :heavy_minus_sign: | Expense Reports | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsoneglobals.md b/docs/models/accountingexpensereportsoneglobals.md new file mode 100644 index 00000000..5727e91e --- /dev/null +++ b/docs/models/accountingexpensereportsoneglobals.md @@ -0,0 +1,9 @@ +# AccountingExpenseReportsOneGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsonerequest.md b/docs/models/accountingexpensereportsonerequest.md new file mode 100644 index 00000000..c82c5365 --- /dev/null +++ b/docs/models/accountingexpensereportsonerequest.md @@ -0,0 +1,13 @@ +# AccountingExpenseReportsOneRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsoneresponse.md b/docs/models/accountingexpensereportsoneresponse.md new file mode 100644 index 00000000..5a6c83f8 --- /dev/null +++ b/docs/models/accountingexpensereportsoneresponse.md @@ -0,0 +1,10 @@ +# AccountingExpenseReportsOneResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_expense_report_response` | [Optional[models.GetExpenseReportResponse]](../models/getexpensereportresponse.md) | :heavy_minus_sign: | Expense Reports | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsupdateglobals.md b/docs/models/accountingexpensereportsupdateglobals.md new file mode 100644 index 00000000..3c0fd679 --- /dev/null +++ b/docs/models/accountingexpensereportsupdateglobals.md @@ -0,0 +1,9 @@ +# AccountingExpenseReportsUpdateGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsupdaterequest.md b/docs/models/accountingexpensereportsupdaterequest.md new file mode 100644 index 00000000..1a82b3dd --- /dev/null +++ b/docs/models/accountingexpensereportsupdaterequest.md @@ -0,0 +1,13 @@ +# AccountingExpenseReportsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `expense_report` | [models.ExpenseReportInput](../models/expensereportinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingexpensereportsupdateresponse.md b/docs/models/accountingexpensereportsupdateresponse.md new file mode 100644 index 00000000..6aa3bfac --- /dev/null +++ b/docs/models/accountingexpensereportsupdateresponse.md @@ -0,0 +1,10 @@ +# AccountingExpenseReportsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `update_expense_report_response` | [Optional[models.UpdateExpenseReportResponse]](../models/updateexpensereportresponse.md) | :heavy_minus_sign: | Expense Reports | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingperiod.md b/docs/models/accountingperiod.md new file mode 100644 index 00000000..8ddecdb5 --- /dev/null +++ b/docs/models/accountingperiod.md @@ -0,0 +1,11 @@ +# AccountingPeriod + +The accounting period the expense report is posted to. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for the accounting period. | 12345 | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the accounting period. | Q1 2024 | \ No newline at end of file diff --git a/docs/models/approvedby.md b/docs/models/approvedby.md new file mode 100644 index 00000000..b25aa713 --- /dev/null +++ b/docs/models/approvedby.md @@ -0,0 +1,11 @@ +# ApprovedBy + +The person who approved the expense report. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for the approver. | 12345 | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The display name of the approver. | Jane Smith | \ No newline at end of file diff --git a/docs/models/createaccountingemployeeresponse.md b/docs/models/createaccountingemployeeresponse.md new file mode 100644 index 00000000..2e905ad9 --- /dev/null +++ b/docs/models/createaccountingemployeeresponse.md @@ -0,0 +1,16 @@ +# CreateAccountingEmployeeResponse + +Employees + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | Employees | +| `operation` | *str* | :heavy_check_mark: | Operation performed | add | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/createexpensecategoryresponse.md b/docs/models/createexpensecategoryresponse.md new file mode 100644 index 00000000..5927bb1d --- /dev/null +++ b/docs/models/createexpensecategoryresponse.md @@ -0,0 +1,16 @@ +# CreateExpenseCategoryResponse + +Expense Categories + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | netsuite | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | ExpenseCategories | +| `operation` | *str* | :heavy_check_mark: | Operation performed | add | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/createexpensereportresponse.md b/docs/models/createexpensereportresponse.md new file mode 100644 index 00000000..ae8e1591 --- /dev/null +++ b/docs/models/createexpensereportresponse.md @@ -0,0 +1,16 @@ +# CreateExpenseReportResponse + +Expense Reports + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | netsuite | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | ExpenseReports | +| `operation` | *str* | :heavy_check_mark: | Operation performed | add | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/deleteaccountingemployeeresponse.md b/docs/models/deleteaccountingemployeeresponse.md new file mode 100644 index 00000000..69638baa --- /dev/null +++ b/docs/models/deleteaccountingemployeeresponse.md @@ -0,0 +1,16 @@ +# DeleteAccountingEmployeeResponse + +Employees + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | Employees | +| `operation` | *str* | :heavy_check_mark: | Operation performed | delete | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/deleteexpensecategoryresponse.md b/docs/models/deleteexpensecategoryresponse.md new file mode 100644 index 00000000..53795d1d --- /dev/null +++ b/docs/models/deleteexpensecategoryresponse.md @@ -0,0 +1,16 @@ +# DeleteExpenseCategoryResponse + +Expense Categories + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | netsuite | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | ExpenseCategories | +| `operation` | *str* | :heavy_check_mark: | Operation performed | delete | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/deleteexpensereportresponse.md b/docs/models/deleteexpensereportresponse.md new file mode 100644 index 00000000..4394daec --- /dev/null +++ b/docs/models/deleteexpensereportresponse.md @@ -0,0 +1,16 @@ +# DeleteExpenseReportResponse + +Expense Reports + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | netsuite | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | ExpenseReports | +| `operation` | *str* | :heavy_check_mark: | Operation performed | delete | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/employeestatus.md b/docs/models/employeestatus.md new file mode 100644 index 00000000..1b41574b --- /dev/null +++ b/docs/models/employeestatus.md @@ -0,0 +1,12 @@ +# EmployeeStatus + +The status of the employee. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `ACTIVE` | active | +| `INACTIVE` | inactive | +| `TERMINATED` | terminated | \ No newline at end of file diff --git a/docs/models/expensecategoriesfilter.md b/docs/models/expensecategoriesfilter.md new file mode 100644 index 00000000..bbfe0028 --- /dev/null +++ b/docs/models/expensecategoriesfilter.md @@ -0,0 +1,9 @@ +# ExpenseCategoriesFilter + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `updated_since` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | 2020-09-30T07:43:32.000Z | +| `status` | [Optional[models.ExpenseCategoriesFilterStatus]](../models/expensecategoriesfilterstatus.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/expensecategoriesfilterstatus.md b/docs/models/expensecategoriesfilterstatus.md new file mode 100644 index 00000000..244159d0 --- /dev/null +++ b/docs/models/expensecategoriesfilterstatus.md @@ -0,0 +1,9 @@ +# ExpenseCategoriesFilterStatus + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `ACTIVE` | active | +| `INACTIVE` | inactive | \ No newline at end of file diff --git a/docs/models/expensecategory.md b/docs/models/expensecategory.md new file mode 100644 index 00000000..1fe205b4 --- /dev/null +++ b/docs/models/expensecategory.md @@ -0,0 +1,23 @@ +# ExpenseCategory + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `name` | *str* | :heavy_check_mark: | The name of the expense category. | Travel | +| `code` | *OptionalNullable[str]* | :heavy_minus_sign: | The code or external identifier of the expense category. | TRAVEL-001 | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the expense category. | Travel-related expenses including flights, hotels, and ground transportation. | +| `status` | [OptionalNullable[models.ExpenseCategoryStatus]](../models/expensecategorystatus.md) | :heavy_minus_sign: | The status of the expense category. | active | +| `account` | [OptionalNullable[models.LinkedLedgerAccount]](../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `offset_account` | [OptionalNullable[models.LinkedLedgerAccount]](../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `tax_rate` | [Optional[models.LinkedTaxRate]](../models/linkedtaxrate.md) | :heavy_minus_sign: | N/A | | +| `rate_required` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). | false | +| `default_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Default rate when rate_required is true (e.g. 0.67 for mileage). | 0.67 | +| `custom_mappings` | Dict[str, *Any*] | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `pass_through` | List[[models.PassThroughBody](../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/expensecategoryinput.md b/docs/models/expensecategoryinput.md new file mode 100644 index 00000000..d404b424 --- /dev/null +++ b/docs/models/expensecategoryinput.md @@ -0,0 +1,19 @@ +# ExpenseCategoryInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `name` | *str* | :heavy_check_mark: | The name of the expense category. | Travel | +| `code` | *OptionalNullable[str]* | :heavy_minus_sign: | The code or external identifier of the expense category. | TRAVEL-001 | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the expense category. | Travel-related expenses including flights, hotels, and ground transportation. | +| `status` | [OptionalNullable[models.ExpenseCategoryStatus]](../models/expensecategorystatus.md) | :heavy_minus_sign: | The status of the expense category. | active | +| `account` | [OptionalNullable[models.LinkedLedgerAccount]](../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `offset_account` | [OptionalNullable[models.LinkedLedgerAccount]](../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `tax_rate` | [Optional[models.LinkedTaxRateInput]](../models/linkedtaxrateinput.md) | :heavy_minus_sign: | N/A | | +| `rate_required` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). | false | +| `default_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Default rate when rate_required is true (e.g. 0.67 for mileage). | 0.67 | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `pass_through` | List[[models.PassThroughBody](../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/expensecategorystatus.md b/docs/models/expensecategorystatus.md new file mode 100644 index 00000000..fb30f72f --- /dev/null +++ b/docs/models/expensecategorystatus.md @@ -0,0 +1,11 @@ +# ExpenseCategoryStatus + +The status of the expense category. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `ACTIVE` | active | +| `INACTIVE` | inactive | \ No newline at end of file diff --git a/docs/models/expensereport.md b/docs/models/expensereport.md new file mode 100644 index 00000000..2052ca95 --- /dev/null +++ b/docs/models/expensereport.md @@ -0,0 +1,38 @@ +# ExpenseReport + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `number` | *OptionalNullable[str]* | :heavy_minus_sign: | The expense report number. | ER-001 | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Title or purpose of the expense report. | Q1 Business Travel | +| `employee` | [models.ExpenseReportEmployee](../models/expensereportemployee.md) | :heavy_check_mark: | The employee who submitted the expense report. | | +| `status` | [OptionalNullable[models.ExpenseReportStatus]](../models/expensereportstatus.md) | :heavy_minus_sign: | The status of the expense report. | submitted | +| `transaction_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `posting_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the expense report was posted to the general ledger. | 2024-06-01 | +| `due_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date when reimbursement is due. | 2024-06-15 | +| `currency` | [OptionalNullable[models.Currency]](../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currency_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `sub_total` | *OptionalNullable[float]* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `total_tax` | *OptionalNullable[float]* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `total_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | Total amount of all expense lines including tax. | 1250.75 | +| `reimbursable_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | Total reimbursable amount (may differ from total if some expenses are non-reimbursable). | 1100 | +| `memo` | *OptionalNullable[str]* | :heavy_minus_sign: | The memo of the expense report. | Business travel expenses for Q1 client meetings | +| `department` | [OptionalNullable[models.LinkedDepartment]](../models/linkeddepartment.md) | :heavy_minus_sign: | N/A | | +| `location` | [OptionalNullable[models.LinkedLocation]](../models/linkedlocation.md) | :heavy_minus_sign: | N/A | | +| `account` | [OptionalNullable[models.LinkedLedgerAccount]](../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `accounting_period` | [OptionalNullable[models.AccountingPeriod]](../models/accountingperiod.md) | :heavy_minus_sign: | The accounting period the expense report is posted to. | | +| `line_items` | List[[models.ExpenseReportLineItem](../models/expensereportlineitem.md)] | :heavy_check_mark: | Expense line items linked to this expense report. | | +| `subsidiary` | [OptionalNullable[models.LinkedSubsidiary]](../models/linkedsubsidiary.md) | :heavy_minus_sign: | N/A | | +| `tracking_categories` | List[[Nullable[models.LinkedTrackingCategory]](../models/linkedtrackingcategory.md)] | :heavy_minus_sign: | A list of linked tracking categories. | | +| `tax_inclusive` | *OptionalNullable[bool]* | :heavy_minus_sign: | Amounts are including tax | true | +| `approved_by` | [OptionalNullable[models.ApprovedBy]](../models/approvedby.md) | :heavy_minus_sign: | The person who approved the expense report. | | +| `custom_fields` | List[[models.CustomField](../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `custom_mappings` | Dict[str, *Any*] | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `pass_through` | List[[models.PassThroughBody](../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/expensereportemployee.md b/docs/models/expensereportemployee.md new file mode 100644 index 00000000..01bcd9b8 --- /dev/null +++ b/docs/models/expensereportemployee.md @@ -0,0 +1,11 @@ +# ExpenseReportEmployee + +The employee who submitted the expense report. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for the employee. | 12345 | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The display name of the employee. | John Doe | \ No newline at end of file diff --git a/docs/models/expensereportinput.md b/docs/models/expensereportinput.md new file mode 100644 index 00000000..4d8c8910 --- /dev/null +++ b/docs/models/expensereportinput.md @@ -0,0 +1,34 @@ +# ExpenseReportInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `number` | *OptionalNullable[str]* | :heavy_minus_sign: | The expense report number. | ER-001 | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Title or purpose of the expense report. | Q1 Business Travel | +| `employee` | [models.ExpenseReportEmployee](../models/expensereportemployee.md) | :heavy_check_mark: | The employee who submitted the expense report. | | +| `status` | [OptionalNullable[models.ExpenseReportStatus]](../models/expensereportstatus.md) | :heavy_minus_sign: | The status of the expense report. | submitted | +| `transaction_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `posting_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the expense report was posted to the general ledger. | 2024-06-01 | +| `due_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date when reimbursement is due. | 2024-06-15 | +| `currency` | [OptionalNullable[models.Currency]](../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currency_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `sub_total` | *OptionalNullable[float]* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `total_tax` | *OptionalNullable[float]* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `total_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | Total amount of all expense lines including tax. | 1250.75 | +| `reimbursable_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | Total reimbursable amount (may differ from total if some expenses are non-reimbursable). | 1100 | +| `memo` | *OptionalNullable[str]* | :heavy_minus_sign: | The memo of the expense report. | Business travel expenses for Q1 client meetings | +| `department` | [OptionalNullable[models.LinkedDepartmentInput]](../models/linkeddepartmentinput.md) | :heavy_minus_sign: | N/A | | +| `location` | [OptionalNullable[models.LinkedLocationInput]](../models/linkedlocationinput.md) | :heavy_minus_sign: | N/A | | +| `account` | [OptionalNullable[models.LinkedLedgerAccount]](../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `accounting_period` | [OptionalNullable[models.AccountingPeriod]](../models/accountingperiod.md) | :heavy_minus_sign: | The accounting period the expense report is posted to. | | +| `line_items` | List[[models.ExpenseReportLineItemInput](../models/expensereportlineiteminput.md)] | :heavy_check_mark: | Expense line items linked to this expense report. | | +| `subsidiary` | [OptionalNullable[models.LinkedSubsidiaryInput]](../models/linkedsubsidiaryinput.md) | :heavy_minus_sign: | N/A | | +| `tracking_categories` | List[[Nullable[models.LinkedTrackingCategory]](../models/linkedtrackingcategory.md)] | :heavy_minus_sign: | A list of linked tracking categories. | | +| `tax_inclusive` | *OptionalNullable[bool]* | :heavy_minus_sign: | Amounts are including tax | true | +| `approved_by` | [OptionalNullable[models.ApprovedBy]](../models/approvedby.md) | :heavy_minus_sign: | The person who approved the expense report. | | +| `custom_fields` | List[[models.CustomField](../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `pass_through` | List[[models.PassThroughBody](../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | \ No newline at end of file diff --git a/docs/models/expensereportlineitem.md b/docs/models/expensereportlineitem.md new file mode 100644 index 00000000..ff3004e3 --- /dev/null +++ b/docs/models/expensereportlineitem.md @@ -0,0 +1,26 @@ +# ExpenseReportLineItem + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `expense_category` | [Optional[models.ExpenseReportLineItemExpenseCategory]](../models/expensereportlineitemexpensecategory.md) | :heavy_minus_sign: | The expense category for this line item. | | +| `account` | [OptionalNullable[models.LinkedLedgerAccount]](../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the expense line item. | Flight to New York | +| `quantity` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | 1 | +| `unit_price` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | 27500.5 | +| `amount` | *float* | :heavy_check_mark: | The amount of the expense line item. | 275 | +| `tax_rate` | [Optional[models.LinkedTaxRate]](../models/linkedtaxrate.md) | :heavy_minus_sign: | N/A | | +| `tax_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | Tax amount | 27.5 | +| `total_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | The total amount of the expense line item including tax. | 302.5 | +| `transaction_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date of the individual expense. | 2024-05-15 | +| `billable` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the expense is billable to a customer. | true | +| `reimbursable` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the expense is reimbursable to the employee. | true | +| `customer` | [OptionalNullable[models.LinkedCustomer]](../models/linkedcustomer.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `department` | [OptionalNullable[models.LinkedDepartment]](../models/linkeddepartment.md) | :heavy_minus_sign: | N/A | | +| `location` | [OptionalNullable[models.LinkedLocation]](../models/linkedlocation.md) | :heavy_minus_sign: | N/A | | +| `tracking_categories` | List[[Nullable[models.LinkedTrackingCategory]](../models/linkedtrackingcategory.md)] | :heavy_minus_sign: | A list of linked tracking categories. | | +| `receipt_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the receipt or attachment for this expense line. | https://example.com/receipts/123.pdf | +| `currency` | [OptionalNullable[models.Currency]](../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | \ No newline at end of file diff --git a/docs/models/expensereportlineitemexpensecategory.md b/docs/models/expensereportlineitemexpensecategory.md new file mode 100644 index 00000000..b2385b8f --- /dev/null +++ b/docs/models/expensereportlineitemexpensecategory.md @@ -0,0 +1,11 @@ +# ExpenseReportLineItemExpenseCategory + +The expense category for this line item. + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for the expense category. | 12345 | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the expense category. | Travel | \ No newline at end of file diff --git a/docs/models/expensereportlineiteminput.md b/docs/models/expensereportlineiteminput.md new file mode 100644 index 00000000..190e3885 --- /dev/null +++ b/docs/models/expensereportlineiteminput.md @@ -0,0 +1,25 @@ +# ExpenseReportLineItemInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `expense_category` | [Optional[models.ExpenseReportLineItemExpenseCategory]](../models/expensereportlineitemexpensecategory.md) | :heavy_minus_sign: | The expense category for this line item. | | +| `account` | [OptionalNullable[models.LinkedLedgerAccount]](../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the expense line item. | Flight to New York | +| `quantity` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | 1 | +| `unit_price` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | 27500.5 | +| `amount` | *float* | :heavy_check_mark: | The amount of the expense line item. | 275 | +| `tax_rate` | [Optional[models.LinkedTaxRateInput]](../models/linkedtaxrateinput.md) | :heavy_minus_sign: | N/A | | +| `tax_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | Tax amount | 27.5 | +| `total_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | The total amount of the expense line item including tax. | 302.5 | +| `transaction_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date of the individual expense. | 2024-05-15 | +| `billable` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the expense is billable to a customer. | true | +| `reimbursable` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the expense is reimbursable to the employee. | true | +| `customer` | [OptionalNullable[models.LinkedCustomerInput]](../models/linkedcustomerinput.md) | :heavy_minus_sign: | The customer this entity is linked to. | | +| `department` | [OptionalNullable[models.LinkedDepartmentInput]](../models/linkeddepartmentinput.md) | :heavy_minus_sign: | N/A | | +| `location` | [OptionalNullable[models.LinkedLocationInput]](../models/linkedlocationinput.md) | :heavy_minus_sign: | N/A | | +| `tracking_categories` | List[[Nullable[models.LinkedTrackingCategory]](../models/linkedtrackingcategory.md)] | :heavy_minus_sign: | A list of linked tracking categories. | | +| `receipt_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the receipt or attachment for this expense line. | https://example.com/receipts/123.pdf | +| `currency` | [OptionalNullable[models.Currency]](../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | \ No newline at end of file diff --git a/docs/models/expensereportsfilter.md b/docs/models/expensereportsfilter.md new file mode 100644 index 00000000..2ff446c0 --- /dev/null +++ b/docs/models/expensereportsfilter.md @@ -0,0 +1,10 @@ +# ExpenseReportsFilter + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `updated_since` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | 2020-09-30T07:43:32.000Z | +| `status` | [Optional[models.ExpenseReportsFilterStatus]](../models/expensereportsfilterstatus.md) | :heavy_minus_sign: | N/A | | +| `employee_id` | *Optional[str]* | :heavy_minus_sign: | Filter by employee ID | 12345 | \ No newline at end of file diff --git a/docs/models/expensereportsfilterstatus.md b/docs/models/expensereportsfilterstatus.md new file mode 100644 index 00000000..6a56b616 --- /dev/null +++ b/docs/models/expensereportsfilterstatus.md @@ -0,0 +1,14 @@ +# ExpenseReportsFilterStatus + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `DRAFT` | draft | +| `SUBMITTED` | submitted | +| `APPROVED` | approved | +| `REIMBURSED` | reimbursed | +| `REJECTED` | rejected | +| `REVERSED` | reversed | +| `VOIDED` | voided | \ No newline at end of file diff --git a/docs/models/expensereportstatus.md b/docs/models/expensereportstatus.md new file mode 100644 index 00000000..f037f080 --- /dev/null +++ b/docs/models/expensereportstatus.md @@ -0,0 +1,16 @@ +# ExpenseReportStatus + +The status of the expense report. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `DRAFT` | draft | +| `SUBMITTED` | submitted | +| `APPROVED` | approved | +| `REIMBURSED` | reimbursed | +| `REJECTED` | rejected | +| `REVERSED` | reversed | +| `VOIDED` | voided | \ No newline at end of file diff --git a/docs/models/getaccountingemployeeresponse.md b/docs/models/getaccountingemployeeresponse.md new file mode 100644 index 00000000..f195313f --- /dev/null +++ b/docs/models/getaccountingemployeeresponse.md @@ -0,0 +1,16 @@ +# GetAccountingEmployeeResponse + +Employees + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | Employees | +| `operation` | *str* | :heavy_check_mark: | Operation performed | one | +| `data` | [models.AccountingEmployee](../models/accountingemployee.md) | :heavy_check_mark: | N/A | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/getaccountingemployeesresponse.md b/docs/models/getaccountingemployeesresponse.md new file mode 100644 index 00000000..3fc7edb3 --- /dev/null +++ b/docs/models/getaccountingemployeesresponse.md @@ -0,0 +1,18 @@ +# GetAccountingEmployeesResponse + +Employees + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | Employees | +| `operation` | *str* | :heavy_check_mark: | Operation performed | all | +| `data` | List[[models.AccountingEmployee](../models/accountingemployee.md)] | :heavy_check_mark: | N/A | | +| `meta` | [Optional[models.Meta]](../models/meta.md) | :heavy_minus_sign: | Response metadata | | +| `links` | [Optional[models.Links]](../models/links.md) | :heavy_minus_sign: | Links to navigate to previous or next pages through the API | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/getexpensecategoriesresponse.md b/docs/models/getexpensecategoriesresponse.md new file mode 100644 index 00000000..2015c770 --- /dev/null +++ b/docs/models/getexpensecategoriesresponse.md @@ -0,0 +1,18 @@ +# GetExpenseCategoriesResponse + +Expense Categories + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | netsuite | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | ExpenseCategories | +| `operation` | *str* | :heavy_check_mark: | Operation performed | all | +| `data` | List[[models.ExpenseCategory](../models/expensecategory.md)] | :heavy_check_mark: | N/A | | +| `meta` | [Optional[models.Meta]](../models/meta.md) | :heavy_minus_sign: | Response metadata | | +| `links` | [Optional[models.Links]](../models/links.md) | :heavy_minus_sign: | Links to navigate to previous or next pages through the API | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/getexpensecategoryresponse.md b/docs/models/getexpensecategoryresponse.md new file mode 100644 index 00000000..9156b5c5 --- /dev/null +++ b/docs/models/getexpensecategoryresponse.md @@ -0,0 +1,16 @@ +# GetExpenseCategoryResponse + +Expense Categories + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | netsuite | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | ExpenseCategories | +| `operation` | *str* | :heavy_check_mark: | Operation performed | one | +| `data` | [models.ExpenseCategory](../models/expensecategory.md) | :heavy_check_mark: | N/A | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/getexpensereportresponse.md b/docs/models/getexpensereportresponse.md new file mode 100644 index 00000000..fd68ac97 --- /dev/null +++ b/docs/models/getexpensereportresponse.md @@ -0,0 +1,16 @@ +# GetExpenseReportResponse + +Expense Reports + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | netsuite | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | ExpenseReports | +| `operation` | *str* | :heavy_check_mark: | Operation performed | one | +| `data` | [models.ExpenseReport](../models/expensereport.md) | :heavy_check_mark: | N/A | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/getexpensereportsresponse.md b/docs/models/getexpensereportsresponse.md new file mode 100644 index 00000000..bc6744e4 --- /dev/null +++ b/docs/models/getexpensereportsresponse.md @@ -0,0 +1,18 @@ +# GetExpenseReportsResponse + +Expense Reports + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | netsuite | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | ExpenseReports | +| `operation` | *str* | :heavy_check_mark: | Operation performed | all | +| `data` | List[[models.ExpenseReport](../models/expensereport.md)] | :heavy_check_mark: | N/A | | +| `meta` | [Optional[models.Meta]](../models/meta.md) | :heavy_minus_sign: | Response metadata | | +| `links` | [Optional[models.Links]](../models/links.md) | :heavy_minus_sign: | Links to navigate to previous or next pages through the API | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/linkedsubsidiary.md b/docs/models/linkedsubsidiary.md new file mode 100644 index 00000000..a0f69765 --- /dev/null +++ b/docs/models/linkedsubsidiary.md @@ -0,0 +1,10 @@ +# LinkedSubsidiary + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the resource. | Acme Inc. | \ No newline at end of file diff --git a/docs/models/linkedsubsidiaryinput.md b/docs/models/linkedsubsidiaryinput.md new file mode 100644 index 00000000..644fc0f0 --- /dev/null +++ b/docs/models/linkedsubsidiaryinput.md @@ -0,0 +1,9 @@ +# LinkedSubsidiaryInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the resource. | Acme Inc. | \ No newline at end of file diff --git a/docs/models/updateaccountingemployeeresponse.md b/docs/models/updateaccountingemployeeresponse.md new file mode 100644 index 00000000..eccec8dd --- /dev/null +++ b/docs/models/updateaccountingemployeeresponse.md @@ -0,0 +1,16 @@ +# UpdateAccountingEmployeeResponse + +Employees + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | Employees | +| `operation` | *str* | :heavy_check_mark: | Operation performed | update | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/updateexpensecategoryresponse.md b/docs/models/updateexpensecategoryresponse.md new file mode 100644 index 00000000..f017aafd --- /dev/null +++ b/docs/models/updateexpensecategoryresponse.md @@ -0,0 +1,16 @@ +# UpdateExpenseCategoryResponse + +Expense Categories + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | netsuite | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | ExpenseCategories | +| `operation` | *str* | :heavy_check_mark: | Operation performed | update | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/updateexpensereportresponse.md b/docs/models/updateexpensereportresponse.md new file mode 100644 index 00000000..d381edae --- /dev/null +++ b/docs/models/updateexpensereportresponse.md @@ -0,0 +1,16 @@ +# UpdateExpenseReportResponse + +Expense Reports + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | netsuite | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | ExpenseReports | +| `operation` | *str* | :heavy_check_mark: | Operation performed | update | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/sdks/apideckemployees/README.md b/docs/sdks/apideckemployees/README.md new file mode 100644 index 00000000..cf509516 --- /dev/null +++ b/docs/sdks/apideckemployees/README.md @@ -0,0 +1,1030 @@ +# ApideckEmployees +(*hris.employees*) + +## Overview + +### Available Operations + +* [list](#list) - List Employees +* [create](#create) - Create Employee +* [get](#get) - Get Employee +* [update](#update) - Update Employee +* [delete](#delete) - Delete Employee + +## list + +Apideck operates as a stateless Unified API, which means that the list endpoint only provides a portion of the employee model. This is due to the fact that most HRIS systems do not readily provide all data in every call. However, you can access the complete employee model through an employee detail call. + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.hris.employees.list(raw=False, service_id="salesforce", limit=20, filter_={ + "company_id": "1234", + "email": "elon@tesla.com", + "first_name": "Elon", + "title": "Manager", + "last_name": "Musk", + "manager_id": "1234", + "employment_status": apideck_unify.EmployeesFilterEmploymentStatus.ACTIVE, + "employee_number": "123456-AB", + "department_id": "1234", + "city": "San Francisco", + "country": "US", + }, sort={ + "by": apideck_unify.EmployeesSortBy.CREATED_AT, + "direction": apideck_unify.SortDirection.DESC, + }, pass_through={ + "search": "San Francisco", + }, fields="id,updated_at") + + while res is not None: + # Handle items + + res = res.next() + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `filter_` | [Optional[models.EmployeesFilter]](../../models/employeesfilter.md) | :heavy_minus_sign: | Apply filters | {
"company_id": "1234",
"email": "elon@tesla.com",
"first_name": "Elon",
"last_name": "Musk",
"title": "Manager",
"manager_id": "1234",
"employment_status": "active",
"employee_number": "123456-AB",
"department_id": "1234",
"city": "San Francisco",
"country": "US"
} | +| `sort` | [Optional[models.EmployeesSort]](../../models/employeessort.md) | :heavy_minus_sign: | Apply sorting | {
"by": "created_at",
"direction": "desc"
} | +| `pass_through` | Dict[str, *Any*] | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.HrisEmployeesAllResponse](../../models/hrisemployeesallresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## create + +Create Employee + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +from datetime import date +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.hris.employees.create(raw=False, service_id="salesforce", id="12345", first_name="Elon", last_name="Musk", middle_name="D.", display_name="Technoking", preferred_name="Elon Musk", initials="EM", salutation="Mr", title="CEO", marital_status="married", partner={ + "first_name": "Elon", + "last_name": "Musk", + "middle_name": "D.", + "gender": apideck_unify.Gender.MALE, + "initials": "EM", + "birthday": date.fromisoformat("2000-08-12"), + "deceased_on": date.fromisoformat("2000-08-12"), + }, division="Europe", division_id="12345", department_id="12345", department_name="12345", team={ + "id": "1234", + "name": "Full Stack Engineers", + }, company_id="23456", company_name="SpaceX", employment_start_date="2021-10-26", employment_end_date="2028-10-26", leaving_reason=apideck_unify.LeavingReason.RESIGNED, employee_number="123456-AB", employment_status=apideck_unify.EmploymentStatus.ACTIVE, ethnicity="African American", manager={ + "id": "12345", + "name": "Elon Musk", + "first_name": "Elon", + "last_name": "Musk", + "email": "elon@musk.com", + "employment_status": apideck_unify.EmploymentStatus.ACTIVE, + }, direct_reports=[ + "a0d636c6-43b3-4bde-8c70-85b707d992f4", + "a98lfd96-43b3-4bde-8c70-85b707d992e6", + ], social_security_number="123456789", birthday=date.fromisoformat("2000-08-12"), deceased_on=date.fromisoformat("2000-08-12"), country_of_birth="US", description="A description", gender=apideck_unify.Gender.MALE, pronouns="she,her", preferred_language="EN", languages=[ + "EN", + ], nationalities=[ + "US", + ], photo_url="https://unavatar.io/elon-musk", timezone="Europe/London", source="lever", source_id="12345", record_url="https://app.intercom.io/contacts/12345", jobs=[ + { + "title": "CEO", + "role": "Sales", + "start_date": date.fromisoformat("2020-08-12"), + "end_date": date.fromisoformat("2020-08-12"), + "compensation_rate": 72000, + "currency": apideck_unify.Currency.USD, + "payment_unit": apideck_unify.PaymentUnit.YEAR, + "hired_at": date.fromisoformat("2020-08-12"), + "is_primary": True, + "is_manager": True, + "status": apideck_unify.EmployeeJobStatus.ACTIVE, + "location": { + "id": "123", + "type": apideck_unify.Type.PRIMARY, + "string": "25 Spring Street, Blackburn, VIC 3130", + "name": "HQ US", + "line1": "Main street", + "line2": "apt #", + "line3": "Suite #", + "line4": "delivery instructions", + "street_number": "25", + "city": "San Francisco", + "state": "CA", + "postal_code": "94104", + "country": "US", + "latitude": "40.759211", + "longitude": "-73.984638", + "county": "Santa Clara", + "contact_name": "Elon Musk", + "salutation": "Mr", + "phone_number": "111-111-1111", + "fax": "122-111-1111", + "email": "elon@musk.com", + "website": "https://elonmusk.com", + "notes": "Address notes or delivery instructions.", + "row_version": "1-12345", + }, + }, + { + "title": "CEO", + "role": "Sales", + "start_date": date.fromisoformat("2020-08-12"), + "end_date": date.fromisoformat("2020-08-12"), + "compensation_rate": 72000, + "currency": apideck_unify.Currency.USD, + "payment_unit": apideck_unify.PaymentUnit.YEAR, + "hired_at": date.fromisoformat("2020-08-12"), + "is_primary": True, + "is_manager": True, + "status": apideck_unify.EmployeeJobStatus.ACTIVE, + "location": { + "id": "123", + "type": apideck_unify.Type.PRIMARY, + "string": "25 Spring Street, Blackburn, VIC 3130", + "name": "HQ US", + "line1": "Main street", + "line2": "apt #", + "line3": "Suite #", + "line4": "delivery instructions", + "street_number": "25", + "city": "San Francisco", + "state": "CA", + "postal_code": "94104", + "country": "US", + "latitude": "40.759211", + "longitude": "-73.984638", + "county": "Santa Clara", + "contact_name": "Elon Musk", + "salutation": "Mr", + "phone_number": "111-111-1111", + "fax": "122-111-1111", + "email": "elon@musk.com", + "website": "https://elonmusk.com", + "notes": "Address notes or delivery instructions.", + "row_version": "1-12345", + }, + }, + ], compensations=[ + { + "rate": 50, + "payment_unit": apideck_unify.PaymentUnit.HOUR, + "flsa_status": apideck_unify.FlsaStatus.NONEXEMPT, + "effective_date": "2021-06-11", + }, + ], works_remote=True, addresses=[ + { + "id": "123", + "type": apideck_unify.Type.PRIMARY, + "string": "25 Spring Street, Blackburn, VIC 3130", + "name": "HQ US", + "line1": "Main street", + "line2": "apt #", + "line3": "Suite #", + "line4": "delivery instructions", + "street_number": "25", + "city": "San Francisco", + "state": "CA", + "postal_code": "94104", + "country": "US", + "latitude": "40.759211", + "longitude": "-73.984638", + "county": "Santa Clara", + "contact_name": "Elon Musk", + "salutation": "Mr", + "phone_number": "111-111-1111", + "fax": "122-111-1111", + "email": "elon@musk.com", + "website": "https://elonmusk.com", + "notes": "Address notes or delivery instructions.", + "row_version": "1-12345", + }, + ], phone_numbers=[ + { + "id": "12345", + "country_code": "1", + "area_code": "323", + "number": "111-111-1111", + "extension": "105", + "type": apideck_unify.PhoneNumberType.PRIMARY, + }, + { + "id": "12345", + "country_code": "1", + "area_code": "323", + "number": "111-111-1111", + "extension": "105", + "type": apideck_unify.PhoneNumberType.PRIMARY, + }, + { + "id": "12345", + "country_code": "1", + "area_code": "323", + "number": "111-111-1111", + "extension": "105", + "type": apideck_unify.PhoneNumberType.PRIMARY, + }, + ], emails=[ + { + "id": "123", + "email": "elon@musk.com", + "type": apideck_unify.EmailType.PRIMARY, + }, + { + "id": "123", + "email": "elon@musk.com", + "type": apideck_unify.EmailType.PRIMARY, + }, + { + "id": "123", + "email": "elon@musk.com", + "type": apideck_unify.EmailType.PRIMARY, + }, + ], custom_fields=[ + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": 10, + }, + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": 10, + }, + ], social_links=[ + { + "id": "12345", + "url": "https://www.twitter.com/apideck", + "type": "twitter", + }, + ], bank_accounts=[ + { + "bank_name": "Monzo", + "account_number": "123465", + "account_name": "SPACEX LLC", + "account_type": apideck_unify.BankAccount2AccountType.CREDIT_CARD, + "iban": "CH2989144532982975332", + "bic": "AUDSCHGGXXX", + "routing_number": "012345678", + "bsb_number": "062-001", + "branch_identifier": "001", + "bank_code": "BNH", + "currency": apideck_unify.Currency.USD, + }, + { + "bank_name": "Monzo", + "account_number": "123465", + "account_name": "SPACEX LLC", + "account_type": apideck_unify.BankAccount2AccountType.CREDIT_CARD, + "iban": "CH2989144532982975332", + "bic": "AUDSCHGGXXX", + "routing_number": "012345678", + "bsb_number": "062-001", + "branch_identifier": "001", + "bank_code": "BNH", + "currency": apideck_unify.Currency.USD, + }, + ], tax_code="1111", tax_id="234-32-0000", dietary_preference="Veggie", food_allergies=[ + "No allergies", + ], probation_period={ + "start_date": date.fromisoformat("2021-10-01"), + "end_date": date.fromisoformat("2021-11-28"), + }, tags=[ + "New", + ], row_version="1-12345", deleted=True, pass_through=[ + { + "service_id": "", + "extend_paths": [ + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + ], + }, + { + "service_id": "", + "extend_paths": [ + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + ], + }, + { + "service_id": "", + "extend_paths": [ + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + ], + }, + ]) + + assert res.create_employee_response is not None + + # Handle response + print(res.create_employee_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the person. | Elon | +| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the person. | Musk | +| `middle_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Middle name of the person. | D. | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name used to display the employee, often a combination of their first and last names. | Technoking | +| `preferred_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name the employee prefers to be addressed by, which may be different from their legal name. | Elon Musk | +| `initials` | *OptionalNullable[str]* | :heavy_minus_sign: | The initials of the person, usually derived from their first, middle, and last names. | EM | +| `salutation` | *OptionalNullable[str]* | :heavy_minus_sign: | A formal salutation for the person. For example, 'Mr', 'Mrs' | Mr | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | The job title of the person. | CEO | +| `marital_status` | *OptionalNullable[str]* | :heavy_minus_sign: | The marital status of the employee. | married | +| `partner` | [Optional[models.PersonInput]](../../models/personinput.md) | :heavy_minus_sign: | N/A | | +| `division` | *OptionalNullable[str]* | :heavy_minus_sign: | The division the person is currently in. Usually a collection of departments or teams or regions. | Europe | +| `division_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the division this employee belongs to. | 12345 | +| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated. Use department_id instead..

The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. | R&D | +| `department_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the department ID this employee belongs to. | 12345 | +| `department_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the department this employee belongs to. | 12345 | +| `team` | [OptionalNullable[models.Team]](../../models/team.md) | :heavy_minus_sign: | The team the person is currently in. | | +| `company_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique identifier of the company. | 23456 | +| `company_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the company. | SpaceX | +| `employment_start_date` | *OptionalNullable[str]* | :heavy_minus_sign: | A Start Date is the date that the employee started working at the company | 2021-10-26 | +| `employment_end_date` | *OptionalNullable[str]* | :heavy_minus_sign: | An End Date is the date that the employee ended working at the company | 2028-10-26 | +| `leaving_reason` | [OptionalNullable[models.LeavingReason]](../../models/leavingreason.md) | :heavy_minus_sign: | The reason because the employment ended. | resigned | +| `employee_number` | *OptionalNullable[str]* | :heavy_minus_sign: | An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. | 123456-AB | +| `employment_status` | [OptionalNullable[models.EmploymentStatus]](../../models/employmentstatus.md) | :heavy_minus_sign: | The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. | active | +| `employment_role` | [Optional[models.EmploymentRole]](../../models/employmentrole.md) | :heavy_minus_sign: | N/A | | +| `ethnicity` | *OptionalNullable[str]* | :heavy_minus_sign: | The ethnicity of the employee | African American | +| `manager` | [Optional[models.Manager]](../../models/manager.md) | :heavy_minus_sign: | N/A | | +| `direct_reports` | List[*str*] | :heavy_minus_sign: | Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. | [
"a0d636c6-43b3-4bde-8c70-85b707d992f4",
"a98lfd96-43b3-4bde-8c70-85b707d992e6"
] | +| `social_security_number` | *OptionalNullable[str]* | :heavy_minus_sign: | A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. | 123456789 | +| `birthday` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date of birth of the person. | 2000-08-12 | +| `deceased_on` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the person deceased. | 2000-08-12 | +| `country_of_birth` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | A description of the object. | A description | +| `gender` | [OptionalNullable[models.Gender]](../../models/gender.md) | :heavy_minus_sign: | The gender represents the gender identity of a person. | male | +| `pronouns` | *OptionalNullable[str]* | :heavy_minus_sign: | The preferred pronouns of the person. | she,her | +| `preferred_language` | *OptionalNullable[str]* | :heavy_minus_sign: | language code according to ISO 639-1. For the United States - EN | EN | +| `languages` | List[*Nullable[str]*] | :heavy_minus_sign: | N/A | | +| `nationalities` | List[*Nullable[str]*] | :heavy_minus_sign: | N/A | | +| `photo_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The URL of the photo of a person. | https://unavatar.io/elon-musk | +| `timezone` | *OptionalNullable[str]* | :heavy_minus_sign: | The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. | Europe/London | +| `source` | *OptionalNullable[str]* | :heavy_minus_sign: | When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. | lever | +| `source_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). | 12345 | +| `record_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | https://app.intercom.io/contacts/12345 | +| `jobs` | List[[models.EmployeeJobInput](../../models/employeejobinput.md)] | :heavy_minus_sign: | N/A | | +| `compensations` | List[[models.EmployeeCompensationInput](../../models/employeecompensationinput.md)] | :heavy_minus_sign: | N/A | | +| `works_remote` | *OptionalNullable[bool]* | :heavy_minus_sign: | Indicates if the employee works from a remote location. | true | +| `addresses` | List[[models.Address](../../models/address.md)] | :heavy_minus_sign: | N/A | | +| `phone_numbers` | List[[models.PhoneNumber](../../models/phonenumber.md)] | :heavy_minus_sign: | N/A | | +| `emails` | List[[models.Email](../../models/email.md)] | :heavy_minus_sign: | N/A | | +| `custom_fields` | List[[models.CustomField](../../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `social_links` | List[[models.SocialLink](../../models/sociallink.md)] | :heavy_minus_sign: | N/A | | +| `bank_accounts` | List[[models.BankAccount2](../../models/bankaccount2.md)] | :heavy_minus_sign: | N/A | | +| `tax_code` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | 1111 | +| `tax_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | 234-32-0000 | +| `dietary_preference` | *OptionalNullable[str]* | :heavy_minus_sign: | Indicate the employee's dietary preference. | Veggie | +| `food_allergies` | List[*str*] | :heavy_minus_sign: | Indicate the employee's food allergies. | [
"No allergies"
] | +| `probation_period` | [Optional[models.ProbationPeriod]](../../models/probationperiod.md) | :heavy_minus_sign: | N/A | | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | [
"New"
] | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `deleted` | *OptionalNullable[bool]* | :heavy_minus_sign: | Flag to indicate if the object is deleted. | true | +| `pass_through` | List[[models.PassThroughBody](../../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.HrisEmployeesAddResponse](../../models/hrisemployeesaddresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get + +Get Employee + +### Example Usage + + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.hris.employees.get(id="", service_id="salesforce", raw=False, fields="id,updated_at", filter_={ + "company_id": "1234", + }, pass_through={ + "search": "San Francisco", + }) + + assert res.get_employee_response is not None + + # Handle response + print(res.get_employee_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `filter_` | [Optional[models.EmployeesOneFilter]](../../models/employeesonefilter.md) | :heavy_minus_sign: | Apply filters | {
"company_id": "1234"
} | +| `pass_through` | Dict[str, *Any*] | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.HrisEmployeesOneResponse](../../models/hrisemployeesoneresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## update + +Update Employee + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +from datetime import date +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.hris.employees.update(id_param="", service_id="salesforce", raw=False, id="12345", first_name="Elon", last_name="Musk", middle_name="D.", display_name="Technoking", preferred_name="Elon Musk", initials="EM", salutation="Mr", title="CEO", marital_status="married", partner={ + "first_name": "Elon", + "last_name": "Musk", + "middle_name": "D.", + "gender": apideck_unify.Gender.MALE, + "initials": "EM", + "birthday": date.fromisoformat("2000-08-12"), + "deceased_on": date.fromisoformat("2000-08-12"), + }, division="Europe", division_id="12345", department_id="12345", department_name="12345", team={ + "id": "1234", + "name": "Full Stack Engineers", + }, company_id="23456", company_name="SpaceX", employment_start_date="2021-10-26", employment_end_date="2028-10-26", leaving_reason=apideck_unify.LeavingReason.RESIGNED, employee_number="123456-AB", employment_status=apideck_unify.EmploymentStatus.ACTIVE, ethnicity="African American", manager={ + "id": "12345", + "name": "Elon Musk", + "first_name": "Elon", + "last_name": "Musk", + "email": "elon@musk.com", + "employment_status": apideck_unify.EmploymentStatus.ACTIVE, + }, direct_reports=[ + "a0d636c6-43b3-4bde-8c70-85b707d992f4", + "a98lfd96-43b3-4bde-8c70-85b707d992e6", + ], social_security_number="123456789", birthday=date.fromisoformat("2000-08-12"), deceased_on=date.fromisoformat("2000-08-12"), country_of_birth="US", description="A description", gender=apideck_unify.Gender.MALE, pronouns="she,her", preferred_language="EN", languages=[ + "EN", + ], nationalities=[ + "US", + ], photo_url="https://unavatar.io/elon-musk", timezone="Europe/London", source="lever", source_id="12345", record_url="https://app.intercom.io/contacts/12345", jobs=[ + { + "title": "CEO", + "role": "Sales", + "start_date": date.fromisoformat("2020-08-12"), + "end_date": date.fromisoformat("2020-08-12"), + "compensation_rate": 72000, + "currency": apideck_unify.Currency.USD, + "payment_unit": apideck_unify.PaymentUnit.YEAR, + "hired_at": date.fromisoformat("2020-08-12"), + "is_primary": True, + "is_manager": True, + "status": apideck_unify.EmployeeJobStatus.ACTIVE, + "location": { + "id": "123", + "type": apideck_unify.Type.PRIMARY, + "string": "25 Spring Street, Blackburn, VIC 3130", + "name": "HQ US", + "line1": "Main street", + "line2": "apt #", + "line3": "Suite #", + "line4": "delivery instructions", + "street_number": "25", + "city": "San Francisco", + "state": "CA", + "postal_code": "94104", + "country": "US", + "latitude": "40.759211", + "longitude": "-73.984638", + "county": "Santa Clara", + "contact_name": "Elon Musk", + "salutation": "Mr", + "phone_number": "111-111-1111", + "fax": "122-111-1111", + "email": "elon@musk.com", + "website": "https://elonmusk.com", + "notes": "Address notes or delivery instructions.", + "row_version": "1-12345", + }, + }, + { + "title": "CEO", + "role": "Sales", + "start_date": date.fromisoformat("2020-08-12"), + "end_date": date.fromisoformat("2020-08-12"), + "compensation_rate": 72000, + "currency": apideck_unify.Currency.USD, + "payment_unit": apideck_unify.PaymentUnit.YEAR, + "hired_at": date.fromisoformat("2020-08-12"), + "is_primary": True, + "is_manager": True, + "status": apideck_unify.EmployeeJobStatus.ACTIVE, + "location": { + "id": "123", + "type": apideck_unify.Type.PRIMARY, + "string": "25 Spring Street, Blackburn, VIC 3130", + "name": "HQ US", + "line1": "Main street", + "line2": "apt #", + "line3": "Suite #", + "line4": "delivery instructions", + "street_number": "25", + "city": "San Francisco", + "state": "CA", + "postal_code": "94104", + "country": "US", + "latitude": "40.759211", + "longitude": "-73.984638", + "county": "Santa Clara", + "contact_name": "Elon Musk", + "salutation": "Mr", + "phone_number": "111-111-1111", + "fax": "122-111-1111", + "email": "elon@musk.com", + "website": "https://elonmusk.com", + "notes": "Address notes or delivery instructions.", + "row_version": "1-12345", + }, + }, + { + "title": "CEO", + "role": "Sales", + "start_date": date.fromisoformat("2020-08-12"), + "end_date": date.fromisoformat("2020-08-12"), + "compensation_rate": 72000, + "currency": apideck_unify.Currency.USD, + "payment_unit": apideck_unify.PaymentUnit.YEAR, + "hired_at": date.fromisoformat("2020-08-12"), + "is_primary": True, + "is_manager": True, + "status": apideck_unify.EmployeeJobStatus.ACTIVE, + "location": { + "id": "123", + "type": apideck_unify.Type.PRIMARY, + "string": "25 Spring Street, Blackburn, VIC 3130", + "name": "HQ US", + "line1": "Main street", + "line2": "apt #", + "line3": "Suite #", + "line4": "delivery instructions", + "street_number": "25", + "city": "San Francisco", + "state": "CA", + "postal_code": "94104", + "country": "US", + "latitude": "40.759211", + "longitude": "-73.984638", + "county": "Santa Clara", + "contact_name": "Elon Musk", + "salutation": "Mr", + "phone_number": "111-111-1111", + "fax": "122-111-1111", + "email": "elon@musk.com", + "website": "https://elonmusk.com", + "notes": "Address notes or delivery instructions.", + "row_version": "1-12345", + }, + }, + ], compensations=[ + { + "rate": 50, + "payment_unit": apideck_unify.PaymentUnit.HOUR, + "flsa_status": apideck_unify.FlsaStatus.NONEXEMPT, + "effective_date": "2021-06-11", + }, + ], works_remote=True, addresses=[ + { + "id": "123", + "type": apideck_unify.Type.PRIMARY, + "string": "25 Spring Street, Blackburn, VIC 3130", + "name": "HQ US", + "line1": "Main street", + "line2": "apt #", + "line3": "Suite #", + "line4": "delivery instructions", + "street_number": "25", + "city": "San Francisco", + "state": "CA", + "postal_code": "94104", + "country": "US", + "latitude": "40.759211", + "longitude": "-73.984638", + "county": "Santa Clara", + "contact_name": "Elon Musk", + "salutation": "Mr", + "phone_number": "111-111-1111", + "fax": "122-111-1111", + "email": "elon@musk.com", + "website": "https://elonmusk.com", + "notes": "Address notes or delivery instructions.", + "row_version": "1-12345", + }, + ], phone_numbers=[ + { + "id": "12345", + "country_code": "1", + "area_code": "323", + "number": "111-111-1111", + "extension": "105", + "type": apideck_unify.PhoneNumberType.PRIMARY, + }, + ], emails=[ + { + "id": "123", + "email": "elon@musk.com", + "type": apideck_unify.EmailType.PRIMARY, + }, + { + "id": "123", + "email": "elon@musk.com", + "type": apideck_unify.EmailType.PRIMARY, + }, + ], custom_fields=[ + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": { + + }, + }, + ], social_links=[ + { + "id": "12345", + "url": "https://www.twitter.com/apideck", + "type": "twitter", + }, + ], bank_accounts=[ + { + "bank_name": "Monzo", + "account_number": "123465", + "account_name": "SPACEX LLC", + "account_type": apideck_unify.BankAccount2AccountType.CREDIT_CARD, + "iban": "CH2989144532982975332", + "bic": "AUDSCHGGXXX", + "routing_number": "012345678", + "bsb_number": "062-001", + "branch_identifier": "001", + "bank_code": "BNH", + "currency": apideck_unify.Currency.USD, + }, + { + "bank_name": "Monzo", + "account_number": "123465", + "account_name": "SPACEX LLC", + "account_type": apideck_unify.BankAccount2AccountType.CREDIT_CARD, + "iban": "CH2989144532982975332", + "bic": "AUDSCHGGXXX", + "routing_number": "012345678", + "bsb_number": "062-001", + "branch_identifier": "001", + "bank_code": "BNH", + "currency": apideck_unify.Currency.USD, + }, + { + "bank_name": "Monzo", + "account_number": "123465", + "account_name": "SPACEX LLC", + "account_type": apideck_unify.BankAccount2AccountType.CREDIT_CARD, + "iban": "CH2989144532982975332", + "bic": "AUDSCHGGXXX", + "routing_number": "012345678", + "bsb_number": "062-001", + "branch_identifier": "001", + "bank_code": "BNH", + "currency": apideck_unify.Currency.USD, + }, + ], tax_code="1111", tax_id="234-32-0000", dietary_preference="Veggie", food_allergies=[ + "No allergies", + ], probation_period={ + "start_date": date.fromisoformat("2021-10-01"), + "end_date": date.fromisoformat("2021-11-28"), + }, tags=[ + "New", + ], row_version="1-12345", deleted=True, pass_through=[ + { + "service_id": "", + "extend_paths": [ + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + ], + }, + { + "service_id": "", + "extend_paths": [ + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + ], + }, + ]) + + assert res.update_employee_response is not None + + # Handle response + print(res.update_employee_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id_param` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | +| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the person. | Elon | +| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the person. | Musk | +| `middle_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Middle name of the person. | D. | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name used to display the employee, often a combination of their first and last names. | Technoking | +| `preferred_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name the employee prefers to be addressed by, which may be different from their legal name. | Elon Musk | +| `initials` | *OptionalNullable[str]* | :heavy_minus_sign: | The initials of the person, usually derived from their first, middle, and last names. | EM | +| `salutation` | *OptionalNullable[str]* | :heavy_minus_sign: | A formal salutation for the person. For example, 'Mr', 'Mrs' | Mr | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | The job title of the person. | CEO | +| `marital_status` | *OptionalNullable[str]* | :heavy_minus_sign: | The marital status of the employee. | married | +| `partner` | [Optional[models.PersonInput]](../../models/personinput.md) | :heavy_minus_sign: | N/A | | +| `division` | *OptionalNullable[str]* | :heavy_minus_sign: | The division the person is currently in. Usually a collection of departments or teams or regions. | Europe | +| `division_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the division this employee belongs to. | 12345 | +| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated. Use department_id instead..

The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. | R&D | +| `department_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the department ID this employee belongs to. | 12345 | +| `department_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the department this employee belongs to. | 12345 | +| `team` | [OptionalNullable[models.Team]](../../models/team.md) | :heavy_minus_sign: | The team the person is currently in. | | +| `company_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique identifier of the company. | 23456 | +| `company_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the company. | SpaceX | +| `employment_start_date` | *OptionalNullable[str]* | :heavy_minus_sign: | A Start Date is the date that the employee started working at the company | 2021-10-26 | +| `employment_end_date` | *OptionalNullable[str]* | :heavy_minus_sign: | An End Date is the date that the employee ended working at the company | 2028-10-26 | +| `leaving_reason` | [OptionalNullable[models.LeavingReason]](../../models/leavingreason.md) | :heavy_minus_sign: | The reason because the employment ended. | resigned | +| `employee_number` | *OptionalNullable[str]* | :heavy_minus_sign: | An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. | 123456-AB | +| `employment_status` | [OptionalNullable[models.EmploymentStatus]](../../models/employmentstatus.md) | :heavy_minus_sign: | The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. | active | +| `employment_role` | [Optional[models.EmploymentRole]](../../models/employmentrole.md) | :heavy_minus_sign: | N/A | | +| `ethnicity` | *OptionalNullable[str]* | :heavy_minus_sign: | The ethnicity of the employee | African American | +| `manager` | [Optional[models.Manager]](../../models/manager.md) | :heavy_minus_sign: | N/A | | +| `direct_reports` | List[*str*] | :heavy_minus_sign: | Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. | [
"a0d636c6-43b3-4bde-8c70-85b707d992f4",
"a98lfd96-43b3-4bde-8c70-85b707d992e6"
] | +| `social_security_number` | *OptionalNullable[str]* | :heavy_minus_sign: | A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. | 123456789 | +| `birthday` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date of birth of the person. | 2000-08-12 | +| `deceased_on` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the person deceased. | 2000-08-12 | +| `country_of_birth` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | A description of the object. | A description | +| `gender` | [OptionalNullable[models.Gender]](../../models/gender.md) | :heavy_minus_sign: | The gender represents the gender identity of a person. | male | +| `pronouns` | *OptionalNullable[str]* | :heavy_minus_sign: | The preferred pronouns of the person. | she,her | +| `preferred_language` | *OptionalNullable[str]* | :heavy_minus_sign: | language code according to ISO 639-1. For the United States - EN | EN | +| `languages` | List[*Nullable[str]*] | :heavy_minus_sign: | N/A | | +| `nationalities` | List[*Nullable[str]*] | :heavy_minus_sign: | N/A | | +| `photo_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The URL of the photo of a person. | https://unavatar.io/elon-musk | +| `timezone` | *OptionalNullable[str]* | :heavy_minus_sign: | The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. | Europe/London | +| `source` | *OptionalNullable[str]* | :heavy_minus_sign: | When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. | lever | +| `source_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). | 12345 | +| `record_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | https://app.intercom.io/contacts/12345 | +| `jobs` | List[[models.EmployeeJobInput](../../models/employeejobinput.md)] | :heavy_minus_sign: | N/A | | +| `compensations` | List[[models.EmployeeCompensationInput](../../models/employeecompensationinput.md)] | :heavy_minus_sign: | N/A | | +| `works_remote` | *OptionalNullable[bool]* | :heavy_minus_sign: | Indicates if the employee works from a remote location. | true | +| `addresses` | List[[models.Address](../../models/address.md)] | :heavy_minus_sign: | N/A | | +| `phone_numbers` | List[[models.PhoneNumber](../../models/phonenumber.md)] | :heavy_minus_sign: | N/A | | +| `emails` | List[[models.Email](../../models/email.md)] | :heavy_minus_sign: | N/A | | +| `custom_fields` | List[[models.CustomField](../../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `social_links` | List[[models.SocialLink](../../models/sociallink.md)] | :heavy_minus_sign: | N/A | | +| `bank_accounts` | List[[models.BankAccount2](../../models/bankaccount2.md)] | :heavy_minus_sign: | N/A | | +| `tax_code` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | 1111 | +| `tax_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | 234-32-0000 | +| `dietary_preference` | *OptionalNullable[str]* | :heavy_minus_sign: | Indicate the employee's dietary preference. | Veggie | +| `food_allergies` | List[*str*] | :heavy_minus_sign: | Indicate the employee's food allergies. | [
"No allergies"
] | +| `probation_period` | [Optional[models.ProbationPeriod]](../../models/probationperiod.md) | :heavy_minus_sign: | N/A | | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | [
"New"
] | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `deleted` | *OptionalNullable[bool]* | :heavy_minus_sign: | Flag to indicate if the object is deleted. | true | +| `pass_through` | List[[models.PassThroughBody](../../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.HrisEmployeesUpdateResponse](../../models/hrisemployeesupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete Employee + +### Example Usage + + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.hris.employees.delete(id="", service_id="salesforce", raw=False) + + assert res.delete_employee_response is not None + + # Handle response + print(res.delete_employee_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.HrisEmployeesDeleteResponse](../../models/hrisemployeesdeleteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/employees/README.md b/docs/sdks/employees/README.md index 5d8c8065..212088f2 100644 --- a/docs/sdks/employees/README.md +++ b/docs/sdks/employees/README.md @@ -1,5 +1,5 @@ # Employees -(*hris.employees*) +(*accounting.employees*) ## Overview @@ -13,14 +13,15 @@ ## list -Apideck operates as a stateless Unified API, which means that the list endpoint only provides a portion of the employee model. This is due to the fact that most HRIS systems do not readily provide all data in every call. However, you can access the complete employee model through an employee detail call. +List Employees ### Example Usage - + ```python import apideck_unify from apideck_unify import Apideck +from apideck_unify.utils import parse_datetime import os @@ -30,24 +31,10 @@ with Apideck( api_key=os.getenv("APIDECK_API_KEY", ""), ) as apideck: - res = apideck.hris.employees.list(raw=False, service_id="salesforce", limit=20, filter_={ - "company_id": "1234", - "email": "elon@tesla.com", - "first_name": "Elon", - "title": "Manager", - "last_name": "Musk", - "manager_id": "1234", - "employment_status": apideck_unify.EmployeesFilterEmploymentStatus.ACTIVE, - "employee_number": "123456-AB", - "department_id": "1234", - "city": "San Francisco", - "country": "US", - }, sort={ - "by": apideck_unify.EmployeesSortBy.CREATED_AT, - "direction": apideck_unify.SortDirection.DESC, - }, pass_through={ - "search": "San Francisco", - }, fields="id,updated_at") + res = apideck.accounting.employees.list(raw=False, service_id="salesforce", limit=20, fields="id,updated_at", filter_={ + "updated_since": parse_datetime("2020-09-30T07:43:32.000Z"), + "status": apideck_unify.AccountingEmployeesFilterStatus.ACTIVE, + }) while res is not None: # Handle items @@ -66,15 +53,13 @@ with Apideck( | `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | | `limit` | *Optional[int]* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | -| `filter_` | [Optional[models.EmployeesFilter]](../../models/employeesfilter.md) | :heavy_minus_sign: | Apply filters | {
"company_id": "1234",
"email": "elon@tesla.com",
"first_name": "Elon",
"last_name": "Musk",
"title": "Manager",
"manager_id": "1234",
"employment_status": "active",
"employee_number": "123456-AB",
"department_id": "1234",
"city": "San Francisco",
"country": "US"
} | -| `sort` | [Optional[models.EmployeesSort]](../../models/employeessort.md) | :heavy_minus_sign: | Apply sorting | {
"by": "created_at",
"direction": "desc"
} | -| `pass_through` | Dict[str, *Any*] | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | | `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `filter_` | [Optional[models.AccountingEmployeesFilter]](../../models/accountingemployeesfilter.md) | :heavy_minus_sign: | Apply filters | {
"updated_since": "2020-09-30T07:43:32.000Z",
"status": "active"
} | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[models.HrisEmployeesAllResponse](../../models/hrisemployeesallresponse.md)** +**[models.AccountingEmployeesAllResponse](../../models/accountingemployeesallresponse.md)** ### Errors @@ -93,7 +78,7 @@ Create Employee ### Example Usage - + ```python import apideck_unify from apideck_unify import Apideck @@ -107,118 +92,34 @@ with Apideck( api_key=os.getenv("APIDECK_API_KEY", ""), ) as apideck: - res = apideck.hris.employees.create(raw=False, service_id="salesforce", id="12345", first_name="Elon", last_name="Musk", middle_name="D.", display_name="Technoking", preferred_name="Elon Musk", initials="EM", salutation="Mr", title="CEO", marital_status="married", partner={ - "first_name": "Elon", - "last_name": "Musk", - "middle_name": "D.", - "gender": apideck_unify.Gender.MALE, - "initials": "EM", - "birthday": date.fromisoformat("2000-08-12"), - "deceased_on": date.fromisoformat("2000-08-12"), - }, division="Europe", division_id="12345", department_id="12345", department_name="12345", team={ - "id": "1234", - "name": "Full Stack Engineers", - }, company_id="23456", company_name="SpaceX", employment_start_date="2021-10-26", employment_end_date="2028-10-26", leaving_reason=apideck_unify.LeavingReason.RESIGNED, employee_number="123456-AB", employment_status=apideck_unify.EmploymentStatus.ACTIVE, ethnicity="African American", manager={ - "id": "12345", - "name": "Elon Musk", - "first_name": "Elon", - "last_name": "Musk", - "email": "elon@musk.com", - "employment_status": apideck_unify.EmploymentStatus.ACTIVE, - }, direct_reports=[ - "a0d636c6-43b3-4bde-8c70-85b707d992f4", - "a98lfd96-43b3-4bde-8c70-85b707d992e6", - ], social_security_number="123456789", birthday=date.fromisoformat("2000-08-12"), deceased_on=date.fromisoformat("2000-08-12"), country_of_birth="US", description="A description", gender=apideck_unify.Gender.MALE, pronouns="she,her", preferred_language="EN", languages=[ - "EN", - ], nationalities=[ - "US", - ], photo_url="https://unavatar.io/elon-musk", timezone="Europe/London", source="lever", source_id="12345", record_url="https://app.intercom.io/contacts/12345", jobs=[ + res = apideck.accounting.employees.create(raw=False, service_id="salesforce", display_id="123456", first_name="John", last_name="Doe", display_name="John Doe", emails=[ { - "title": "CEO", - "role": "Sales", - "start_date": date.fromisoformat("2020-08-12"), - "end_date": date.fromisoformat("2020-08-12"), - "compensation_rate": 72000, - "currency": apideck_unify.Currency.USD, - "payment_unit": apideck_unify.PaymentUnit.YEAR, - "hired_at": date.fromisoformat("2020-08-12"), - "is_primary": True, - "is_manager": True, - "status": apideck_unify.EmployeeJobStatus.ACTIVE, - "location": { - "id": "123", - "type": apideck_unify.Type.PRIMARY, - "string": "25 Spring Street, Blackburn, VIC 3130", - "name": "HQ US", - "line1": "Main street", - "line2": "apt #", - "line3": "Suite #", - "line4": "delivery instructions", - "street_number": "25", - "city": "San Francisco", - "state": "CA", - "postal_code": "94104", - "country": "US", - "latitude": "40.759211", - "longitude": "-73.984638", - "county": "Santa Clara", - "contact_name": "Elon Musk", - "salutation": "Mr", - "phone_number": "111-111-1111", - "fax": "122-111-1111", - "email": "elon@musk.com", - "website": "https://elonmusk.com", - "notes": "Address notes or delivery instructions.", - "row_version": "1-12345", - }, - }, - { - "title": "CEO", - "role": "Sales", - "start_date": date.fromisoformat("2020-08-12"), - "end_date": date.fromisoformat("2020-08-12"), - "compensation_rate": 72000, - "currency": apideck_unify.Currency.USD, - "payment_unit": apideck_unify.PaymentUnit.YEAR, - "hired_at": date.fromisoformat("2020-08-12"), - "is_primary": True, - "is_manager": True, - "status": apideck_unify.EmployeeJobStatus.ACTIVE, - "location": { - "id": "123", - "type": apideck_unify.Type.PRIMARY, - "string": "25 Spring Street, Blackburn, VIC 3130", - "name": "HQ US", - "line1": "Main street", - "line2": "apt #", - "line3": "Suite #", - "line4": "delivery instructions", - "street_number": "25", - "city": "San Francisco", - "state": "CA", - "postal_code": "94104", - "country": "US", - "latitude": "40.759211", - "longitude": "-73.984638", - "county": "Santa Clara", - "contact_name": "Elon Musk", - "salutation": "Mr", - "phone_number": "111-111-1111", - "fax": "122-111-1111", - "email": "elon@musk.com", - "website": "https://elonmusk.com", - "notes": "Address notes or delivery instructions.", - "row_version": "1-12345", - }, + "id": "123", + "email": "elon@musk.com", + "type": apideck_unify.EmailType.PRIMARY, }, - ], compensations=[ + ], employee_number="EMP-001", job_title="Senior Accountant", status=apideck_unify.EmployeeStatus.ACTIVE, is_contractor=False, department={ + "display_id": "123456", + "name": "Acme Inc.", + }, location={ + "id": "123456", + "display_id": "123456", + "name": "New York Office", + }, manager={ + "id": "12345", + "name": "Jane Smith", + }, hire_date=date.fromisoformat("2020-01-15"), termination_date=date.fromisoformat("2025-12-31"), gender=apideck_unify.Gender.MALE, birth_date=date.fromisoformat("1990-05-20"), subsidiary={ + "display_id": "123456", + "name": "Acme Inc.", + }, tracking_categories=[ { - "rate": 50, - "payment_unit": apideck_unify.PaymentUnit.HOUR, - "flsa_status": apideck_unify.FlsaStatus.NONEXEMPT, - "effective_date": "2021-06-11", + "id": "123456", + "code": "100", + "name": "New York", + "parent_id": "123456", + "parent_name": "New York", }, - ], works_remote=True, addresses=[ + ], currency=apideck_unify.Currency.USD, notes="Some notes about this employee", addresses=[ { "id": "123", "type": apideck_unify.Type.PRIMARY, @@ -228,6 +129,7 @@ with Apideck( "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", + "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", @@ -254,134 +156,14 @@ with Apideck( "extension": "105", "type": apideck_unify.PhoneNumberType.PRIMARY, }, - { - "id": "12345", - "country_code": "1", - "area_code": "323", - "number": "111-111-1111", - "extension": "105", - "type": apideck_unify.PhoneNumberType.PRIMARY, - }, - { - "id": "12345", - "country_code": "1", - "area_code": "323", - "number": "111-111-1111", - "extension": "105", - "type": apideck_unify.PhoneNumberType.PRIMARY, - }, - ], emails=[ - { - "id": "123", - "email": "elon@musk.com", - "type": apideck_unify.EmailType.PRIMARY, - }, - { - "id": "123", - "email": "elon@musk.com", - "type": apideck_unify.EmailType.PRIMARY, - }, - { - "id": "123", - "email": "elon@musk.com", - "type": apideck_unify.EmailType.PRIMARY, - }, ], custom_fields=[ { "id": "2389328923893298", "name": "employee_level", "description": "Employee Level", - "value": 10, - }, - { - "id": "2389328923893298", - "name": "employee_level", - "description": "Employee Level", - "value": 10, - }, - ], social_links=[ - { - "id": "12345", - "url": "https://www.twitter.com/apideck", - "type": "twitter", - }, - ], bank_accounts=[ - { - "bank_name": "Monzo", - "account_number": "123465", - "account_name": "SPACEX LLC", - "account_type": apideck_unify.BankAccount2AccountType.CREDIT_CARD, - "iban": "CH2989144532982975332", - "bic": "AUDSCHGGXXX", - "routing_number": "012345678", - "bsb_number": "062-001", - "branch_identifier": "001", - "bank_code": "BNH", - "currency": apideck_unify.Currency.USD, - }, - { - "bank_name": "Monzo", - "account_number": "123465", - "account_name": "SPACEX LLC", - "account_type": apideck_unify.BankAccount2AccountType.CREDIT_CARD, - "iban": "CH2989144532982975332", - "bic": "AUDSCHGGXXX", - "routing_number": "012345678", - "bsb_number": "062-001", - "branch_identifier": "001", - "bank_code": "BNH", - "currency": apideck_unify.Currency.USD, - }, - ], tax_code="1111", tax_id="234-32-0000", dietary_preference="Veggie", food_allergies=[ - "No allergies", - ], probation_period={ - "start_date": date.fromisoformat("2021-10-01"), - "end_date": date.fromisoformat("2021-11-28"), - }, tags=[ - "New", - ], row_version="1-12345", deleted=True, pass_through=[ - { - "service_id": "", - "extend_paths": [ - { - "path": "$.nested.property", - "value": { - "TaxClassificationRef": { - "value": "EUC-99990201-V1-00020000", - }, - }, - }, - { - "path": "$.nested.property", - "value": { - "TaxClassificationRef": { - "value": "EUC-99990201-V1-00020000", - }, - }, - }, - ], - }, - { - "service_id": "", - "extend_paths": [ - { - "path": "$.nested.property", - "value": { - "TaxClassificationRef": { - "value": "EUC-99990201-V1-00020000", - }, - }, - }, - { - "path": "$.nested.property", - "value": { - "TaxClassificationRef": { - "value": "EUC-99990201-V1-00020000", - }, - }, - }, - ], + "value": "Uses Salesforce and Marketo", }, + ], row_version="1-12345", pass_through=[ { "service_id": "", "extend_paths": [ @@ -393,99 +175,55 @@ with Apideck( }, }, }, - { - "path": "$.nested.property", - "value": { - "TaxClassificationRef": { - "value": "EUC-99990201-V1-00020000", - }, - }, - }, ], }, ]) - assert res.create_employee_response is not None + assert res.create_accounting_employee_response is not None # Handle response - print(res.create_employee_response) + print(res.create_accounting_employee_response) ``` ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | -| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | -| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | -| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | -| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the person. | Elon | -| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the person. | Musk | -| `middle_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Middle name of the person. | D. | -| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name used to display the employee, often a combination of their first and last names. | Technoking | -| `preferred_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name the employee prefers to be addressed by, which may be different from their legal name. | Elon Musk | -| `initials` | *OptionalNullable[str]* | :heavy_minus_sign: | The initials of the person, usually derived from their first, middle, and last names. | EM | -| `salutation` | *OptionalNullable[str]* | :heavy_minus_sign: | A formal salutation for the person. For example, 'Mr', 'Mrs' | Mr | -| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | The job title of the person. | CEO | -| `marital_status` | *OptionalNullable[str]* | :heavy_minus_sign: | The marital status of the employee. | married | -| `partner` | [Optional[models.PersonInput]](../../models/personinput.md) | :heavy_minus_sign: | N/A | | -| `division` | *OptionalNullable[str]* | :heavy_minus_sign: | The division the person is currently in. Usually a collection of departments or teams or regions. | Europe | -| `division_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the division this employee belongs to. | 12345 | -| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated. Use department_id instead..

The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. | R&D | -| `department_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the department ID this employee belongs to. | 12345 | -| `department_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the department this employee belongs to. | 12345 | -| `team` | [OptionalNullable[models.Team]](../../models/team.md) | :heavy_minus_sign: | The team the person is currently in. | | -| `company_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique identifier of the company. | 23456 | -| `company_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the company. | SpaceX | -| `employment_start_date` | *OptionalNullable[str]* | :heavy_minus_sign: | A Start Date is the date that the employee started working at the company | 2021-10-26 | -| `employment_end_date` | *OptionalNullable[str]* | :heavy_minus_sign: | An End Date is the date that the employee ended working at the company | 2028-10-26 | -| `leaving_reason` | [OptionalNullable[models.LeavingReason]](../../models/leavingreason.md) | :heavy_minus_sign: | The reason because the employment ended. | resigned | -| `employee_number` | *OptionalNullable[str]* | :heavy_minus_sign: | An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. | 123456-AB | -| `employment_status` | [OptionalNullable[models.EmploymentStatus]](../../models/employmentstatus.md) | :heavy_minus_sign: | The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. | active | -| `employment_role` | [Optional[models.EmploymentRole]](../../models/employmentrole.md) | :heavy_minus_sign: | N/A | | -| `ethnicity` | *OptionalNullable[str]* | :heavy_minus_sign: | The ethnicity of the employee | African American | -| `manager` | [Optional[models.Manager]](../../models/manager.md) | :heavy_minus_sign: | N/A | | -| `direct_reports` | List[*str*] | :heavy_minus_sign: | Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. | [
"a0d636c6-43b3-4bde-8c70-85b707d992f4",
"a98lfd96-43b3-4bde-8c70-85b707d992e6"
] | -| `social_security_number` | *OptionalNullable[str]* | :heavy_minus_sign: | A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. | 123456789 | -| `birthday` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date of birth of the person. | 2000-08-12 | -| `deceased_on` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the person deceased. | 2000-08-12 | -| `country_of_birth` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | A description of the object. | A description | -| `gender` | [OptionalNullable[models.Gender]](../../models/gender.md) | :heavy_minus_sign: | The gender represents the gender identity of a person. | male | -| `pronouns` | *OptionalNullable[str]* | :heavy_minus_sign: | The preferred pronouns of the person. | she,her | -| `preferred_language` | *OptionalNullable[str]* | :heavy_minus_sign: | language code according to ISO 639-1. For the United States - EN | EN | -| `languages` | List[*Nullable[str]*] | :heavy_minus_sign: | N/A | | -| `nationalities` | List[*Nullable[str]*] | :heavy_minus_sign: | N/A | | -| `photo_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The URL of the photo of a person. | https://unavatar.io/elon-musk | -| `timezone` | *OptionalNullable[str]* | :heavy_minus_sign: | The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. | Europe/London | -| `source` | *OptionalNullable[str]* | :heavy_minus_sign: | When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. | lever | -| `source_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). | 12345 | -| `record_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | https://app.intercom.io/contacts/12345 | -| `jobs` | List[[models.EmployeeJobInput](../../models/employeejobinput.md)] | :heavy_minus_sign: | N/A | | -| `compensations` | List[[models.EmployeeCompensationInput](../../models/employeecompensationinput.md)] | :heavy_minus_sign: | N/A | | -| `works_remote` | *OptionalNullable[bool]* | :heavy_minus_sign: | Indicates if the employee works from a remote location. | true | -| `addresses` | List[[models.Address](../../models/address.md)] | :heavy_minus_sign: | N/A | | -| `phone_numbers` | List[[models.PhoneNumber](../../models/phonenumber.md)] | :heavy_minus_sign: | N/A | | -| `emails` | List[[models.Email](../../models/email.md)] | :heavy_minus_sign: | N/A | | -| `custom_fields` | List[[models.CustomField](../../models/customfield.md)] | :heavy_minus_sign: | N/A | | -| `social_links` | List[[models.SocialLink](../../models/sociallink.md)] | :heavy_minus_sign: | N/A | | -| `bank_accounts` | List[[models.BankAccount2](../../models/bankaccount2.md)] | :heavy_minus_sign: | N/A | | -| `tax_code` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | 1111 | -| `tax_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | 234-32-0000 | -| `dietary_preference` | *OptionalNullable[str]* | :heavy_minus_sign: | Indicate the employee's dietary preference. | Veggie | -| `food_allergies` | List[*str*] | :heavy_minus_sign: | Indicate the employee's food allergies. | [
"No allergies"
] | -| `probation_period` | [Optional[models.ProbationPeriod]](../../models/probationperiod.md) | :heavy_minus_sign: | N/A | | -| `tags` | List[*str*] | :heavy_minus_sign: | N/A | [
"New"
] | -| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | -| `deleted` | *OptionalNullable[bool]* | :heavy_minus_sign: | Flag to indicate if the object is deleted. | true | -| `pass_through` | List[[models.PassThroughBody](../../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | -| `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 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the employee. | John | +| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the employee. | Doe | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The display name of the employee. | John Doe | +| `emails` | List[[models.Email](../../models/email.md)] | :heavy_minus_sign: | Email addresses of the employee. | | +| `employee_number` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee number or identifier. | EMP-001 | +| `job_title` | *OptionalNullable[str]* | :heavy_minus_sign: | The job title of the employee. | Senior Accountant | +| `status` | [OptionalNullable[models.EmployeeStatus]](../../models/employeestatus.md) | :heavy_minus_sign: | The status of the employee. | active | +| `is_contractor` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee is a contractor. | false | +| `department` | [OptionalNullable[models.LinkedDepartmentInput]](../../models/linkeddepartmentinput.md) | :heavy_minus_sign: | N/A | | +| `location` | [OptionalNullable[models.LinkedLocationInput]](../../models/linkedlocationinput.md) | :heavy_minus_sign: | N/A | | +| `manager` | [Optional[models.AccountingEmployeeManager]](../../models/accountingemployeemanager.md) | :heavy_minus_sign: | The manager of the employee. | | +| `hire_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee was hired. | 2020-01-15 | +| `termination_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee was terminated. | 2025-12-31 | +| `gender` | [OptionalNullable[models.Gender]](../../models/gender.md) | :heavy_minus_sign: | The gender represents the gender identity of a person. | male | +| `birth_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date of birth of the employee. | 1990-05-20 | +| `subsidiary` | [OptionalNullable[models.LinkedSubsidiaryInput]](../../models/linkedsubsidiaryinput.md) | :heavy_minus_sign: | N/A | | +| `tracking_categories` | List[[Nullable[models.LinkedTrackingCategory]](../../models/linkedtrackingcategory.md)] | :heavy_minus_sign: | A list of linked tracking categories. | | +| `currency` | [OptionalNullable[models.Currency]](../../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `notes` | *OptionalNullable[str]* | :heavy_minus_sign: | Notes about the employee. | Some notes about this employee | +| `addresses` | List[[models.Address](../../models/address.md)] | :heavy_minus_sign: | Addresses of the employee. | | +| `phone_numbers` | List[[models.PhoneNumber](../../models/phonenumber.md)] | :heavy_minus_sign: | Phone numbers of the employee. | | +| `custom_fields` | List[[models.CustomField](../../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `pass_through` | List[[models.PassThroughBody](../../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[models.HrisEmployeesAddResponse](../../models/hrisemployeesaddresponse.md)** +**[models.AccountingEmployeesAddResponse](../../models/accountingemployeesaddresponse.md)** ### Errors @@ -504,7 +242,7 @@ Get Employee ### Example Usage - + ```python from apideck_unify import Apideck import os @@ -516,16 +254,12 @@ with Apideck( api_key=os.getenv("APIDECK_API_KEY", ""), ) as apideck: - res = apideck.hris.employees.get(id="", service_id="salesforce", raw=False, fields="id,updated_at", filter_={ - "company_id": "1234", - }, pass_through={ - "search": "San Francisco", - }) + res = apideck.accounting.employees.get(id="", service_id="salesforce", raw=False, fields="id,updated_at") - assert res.get_employee_response is not None + assert res.get_accounting_employee_response is not None # Handle response - print(res.get_employee_response) + print(res.get_accounting_employee_response) ``` @@ -539,13 +273,11 @@ with Apideck( | `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | | `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | | `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | -| `filter_` | [Optional[models.EmployeesOneFilter]](../../models/employeesonefilter.md) | :heavy_minus_sign: | Apply filters | {
"company_id": "1234"
} | -| `pass_through` | Dict[str, *Any*] | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[models.HrisEmployeesOneResponse](../../models/hrisemployeesoneresponse.md)** +**[models.AccountingEmployeesOneResponse](../../models/accountingemployeesoneresponse.md)** ### Errors @@ -564,7 +296,7 @@ Update Employee ### Example Usage - + ```python import apideck_unify from apideck_unify import Apideck @@ -578,157 +310,34 @@ with Apideck( api_key=os.getenv("APIDECK_API_KEY", ""), ) as apideck: - res = apideck.hris.employees.update(id_param="", service_id="salesforce", raw=False, id="12345", first_name="Elon", last_name="Musk", middle_name="D.", display_name="Technoking", preferred_name="Elon Musk", initials="EM", salutation="Mr", title="CEO", marital_status="married", partner={ - "first_name": "Elon", - "last_name": "Musk", - "middle_name": "D.", - "gender": apideck_unify.Gender.MALE, - "initials": "EM", - "birthday": date.fromisoformat("2000-08-12"), - "deceased_on": date.fromisoformat("2000-08-12"), - }, division="Europe", division_id="12345", department_id="12345", department_name="12345", team={ - "id": "1234", - "name": "Full Stack Engineers", - }, company_id="23456", company_name="SpaceX", employment_start_date="2021-10-26", employment_end_date="2028-10-26", leaving_reason=apideck_unify.LeavingReason.RESIGNED, employee_number="123456-AB", employment_status=apideck_unify.EmploymentStatus.ACTIVE, ethnicity="African American", manager={ - "id": "12345", - "name": "Elon Musk", - "first_name": "Elon", - "last_name": "Musk", - "email": "elon@musk.com", - "employment_status": apideck_unify.EmploymentStatus.ACTIVE, - }, direct_reports=[ - "a0d636c6-43b3-4bde-8c70-85b707d992f4", - "a98lfd96-43b3-4bde-8c70-85b707d992e6", - ], social_security_number="123456789", birthday=date.fromisoformat("2000-08-12"), deceased_on=date.fromisoformat("2000-08-12"), country_of_birth="US", description="A description", gender=apideck_unify.Gender.MALE, pronouns="she,her", preferred_language="EN", languages=[ - "EN", - ], nationalities=[ - "US", - ], photo_url="https://unavatar.io/elon-musk", timezone="Europe/London", source="lever", source_id="12345", record_url="https://app.intercom.io/contacts/12345", jobs=[ - { - "title": "CEO", - "role": "Sales", - "start_date": date.fromisoformat("2020-08-12"), - "end_date": date.fromisoformat("2020-08-12"), - "compensation_rate": 72000, - "currency": apideck_unify.Currency.USD, - "payment_unit": apideck_unify.PaymentUnit.YEAR, - "hired_at": date.fromisoformat("2020-08-12"), - "is_primary": True, - "is_manager": True, - "status": apideck_unify.EmployeeJobStatus.ACTIVE, - "location": { - "id": "123", - "type": apideck_unify.Type.PRIMARY, - "string": "25 Spring Street, Blackburn, VIC 3130", - "name": "HQ US", - "line1": "Main street", - "line2": "apt #", - "line3": "Suite #", - "line4": "delivery instructions", - "street_number": "25", - "city": "San Francisco", - "state": "CA", - "postal_code": "94104", - "country": "US", - "latitude": "40.759211", - "longitude": "-73.984638", - "county": "Santa Clara", - "contact_name": "Elon Musk", - "salutation": "Mr", - "phone_number": "111-111-1111", - "fax": "122-111-1111", - "email": "elon@musk.com", - "website": "https://elonmusk.com", - "notes": "Address notes or delivery instructions.", - "row_version": "1-12345", - }, - }, + res = apideck.accounting.employees.update(id="", service_id="salesforce", raw=False, display_id="123456", first_name="John", last_name="Doe", display_name="John Doe", emails=[ { - "title": "CEO", - "role": "Sales", - "start_date": date.fromisoformat("2020-08-12"), - "end_date": date.fromisoformat("2020-08-12"), - "compensation_rate": 72000, - "currency": apideck_unify.Currency.USD, - "payment_unit": apideck_unify.PaymentUnit.YEAR, - "hired_at": date.fromisoformat("2020-08-12"), - "is_primary": True, - "is_manager": True, - "status": apideck_unify.EmployeeJobStatus.ACTIVE, - "location": { - "id": "123", - "type": apideck_unify.Type.PRIMARY, - "string": "25 Spring Street, Blackburn, VIC 3130", - "name": "HQ US", - "line1": "Main street", - "line2": "apt #", - "line3": "Suite #", - "line4": "delivery instructions", - "street_number": "25", - "city": "San Francisco", - "state": "CA", - "postal_code": "94104", - "country": "US", - "latitude": "40.759211", - "longitude": "-73.984638", - "county": "Santa Clara", - "contact_name": "Elon Musk", - "salutation": "Mr", - "phone_number": "111-111-1111", - "fax": "122-111-1111", - "email": "elon@musk.com", - "website": "https://elonmusk.com", - "notes": "Address notes or delivery instructions.", - "row_version": "1-12345", - }, - }, - { - "title": "CEO", - "role": "Sales", - "start_date": date.fromisoformat("2020-08-12"), - "end_date": date.fromisoformat("2020-08-12"), - "compensation_rate": 72000, - "currency": apideck_unify.Currency.USD, - "payment_unit": apideck_unify.PaymentUnit.YEAR, - "hired_at": date.fromisoformat("2020-08-12"), - "is_primary": True, - "is_manager": True, - "status": apideck_unify.EmployeeJobStatus.ACTIVE, - "location": { - "id": "123", - "type": apideck_unify.Type.PRIMARY, - "string": "25 Spring Street, Blackburn, VIC 3130", - "name": "HQ US", - "line1": "Main street", - "line2": "apt #", - "line3": "Suite #", - "line4": "delivery instructions", - "street_number": "25", - "city": "San Francisco", - "state": "CA", - "postal_code": "94104", - "country": "US", - "latitude": "40.759211", - "longitude": "-73.984638", - "county": "Santa Clara", - "contact_name": "Elon Musk", - "salutation": "Mr", - "phone_number": "111-111-1111", - "fax": "122-111-1111", - "email": "elon@musk.com", - "website": "https://elonmusk.com", - "notes": "Address notes or delivery instructions.", - "row_version": "1-12345", - }, + "id": "123", + "email": "elon@musk.com", + "type": apideck_unify.EmailType.PRIMARY, }, - ], compensations=[ + ], employee_number="EMP-001", job_title="Senior Accountant", status=apideck_unify.EmployeeStatus.ACTIVE, is_contractor=False, department={ + "display_id": "123456", + "name": "Acme Inc.", + }, location={ + "id": "123456", + "display_id": "123456", + "name": "New York Office", + }, manager={ + "id": "12345", + "name": "Jane Smith", + }, hire_date=date.fromisoformat("2020-01-15"), termination_date=date.fromisoformat("2025-12-31"), gender=apideck_unify.Gender.MALE, birth_date=date.fromisoformat("1990-05-20"), subsidiary={ + "display_id": "123456", + "name": "Acme Inc.", + }, tracking_categories=[ { - "rate": 50, - "payment_unit": apideck_unify.PaymentUnit.HOUR, - "flsa_status": apideck_unify.FlsaStatus.NONEXEMPT, - "effective_date": "2021-06-11", + "id": "123456", + "code": "100", + "name": "New York", + "parent_id": "123456", + "parent_name": "New York", }, - ], works_remote=True, addresses=[ + ], currency=apideck_unify.Currency.USD, notes="Some notes about this employee", addresses=[ { "id": "123", "type": apideck_unify.Type.PRIMARY, @@ -738,6 +347,7 @@ with Apideck( "line2": "apt #", "line3": "Suite #", "line4": "delivery instructions", + "line5": "Attention: Finance Dept", "street_number": "25", "city": "San Francisco", "state": "CA", @@ -764,101 +374,14 @@ with Apideck( "extension": "105", "type": apideck_unify.PhoneNumberType.PRIMARY, }, - ], emails=[ - { - "id": "123", - "email": "elon@musk.com", - "type": apideck_unify.EmailType.PRIMARY, - }, - { - "id": "123", - "email": "elon@musk.com", - "type": apideck_unify.EmailType.PRIMARY, - }, ], custom_fields=[ { "id": "2389328923893298", "name": "employee_level", "description": "Employee Level", - "value": { - - }, - }, - ], social_links=[ - { - "id": "12345", - "url": "https://www.twitter.com/apideck", - "type": "twitter", - }, - ], bank_accounts=[ - { - "bank_name": "Monzo", - "account_number": "123465", - "account_name": "SPACEX LLC", - "account_type": apideck_unify.BankAccount2AccountType.CREDIT_CARD, - "iban": "CH2989144532982975332", - "bic": "AUDSCHGGXXX", - "routing_number": "012345678", - "bsb_number": "062-001", - "branch_identifier": "001", - "bank_code": "BNH", - "currency": apideck_unify.Currency.USD, - }, - { - "bank_name": "Monzo", - "account_number": "123465", - "account_name": "SPACEX LLC", - "account_type": apideck_unify.BankAccount2AccountType.CREDIT_CARD, - "iban": "CH2989144532982975332", - "bic": "AUDSCHGGXXX", - "routing_number": "012345678", - "bsb_number": "062-001", - "branch_identifier": "001", - "bank_code": "BNH", - "currency": apideck_unify.Currency.USD, - }, - { - "bank_name": "Monzo", - "account_number": "123465", - "account_name": "SPACEX LLC", - "account_type": apideck_unify.BankAccount2AccountType.CREDIT_CARD, - "iban": "CH2989144532982975332", - "bic": "AUDSCHGGXXX", - "routing_number": "012345678", - "bsb_number": "062-001", - "branch_identifier": "001", - "bank_code": "BNH", - "currency": apideck_unify.Currency.USD, - }, - ], tax_code="1111", tax_id="234-32-0000", dietary_preference="Veggie", food_allergies=[ - "No allergies", - ], probation_period={ - "start_date": date.fromisoformat("2021-10-01"), - "end_date": date.fromisoformat("2021-11-28"), - }, tags=[ - "New", - ], row_version="1-12345", deleted=True, pass_through=[ - { - "service_id": "", - "extend_paths": [ - { - "path": "$.nested.property", - "value": { - "TaxClassificationRef": { - "value": "EUC-99990201-V1-00020000", - }, - }, - }, - { - "path": "$.nested.property", - "value": { - "TaxClassificationRef": { - "value": "EUC-99990201-V1-00020000", - }, - }, - }, - ], + "value": "Uses Salesforce and Marketo", }, + ], row_version="1-12345", pass_through=[ { "service_id": "", "extend_paths": [ @@ -870,100 +393,56 @@ with Apideck( }, }, }, - { - "path": "$.nested.property", - "value": { - "TaxClassificationRef": { - "value": "EUC-99990201-V1-00020000", - }, - }, - }, ], }, ]) - assert res.update_employee_response is not None + assert res.update_accounting_employee_response is not None # Handle response - print(res.update_employee_response) + print(res.update_accounting_employee_response) ``` ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id_param` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | -| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | -| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | -| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | -| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | -| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | A unique identifier for an object. | 12345 | -| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the person. | Elon | -| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the person. | Musk | -| `middle_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Middle name of the person. | D. | -| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name used to display the employee, often a combination of their first and last names. | Technoking | -| `preferred_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name the employee prefers to be addressed by, which may be different from their legal name. | Elon Musk | -| `initials` | *OptionalNullable[str]* | :heavy_minus_sign: | The initials of the person, usually derived from their first, middle, and last names. | EM | -| `salutation` | *OptionalNullable[str]* | :heavy_minus_sign: | A formal salutation for the person. For example, 'Mr', 'Mrs' | Mr | -| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | The job title of the person. | CEO | -| `marital_status` | *OptionalNullable[str]* | :heavy_minus_sign: | The marital status of the employee. | married | -| `partner` | [Optional[models.PersonInput]](../../models/personinput.md) | :heavy_minus_sign: | N/A | | -| `division` | *OptionalNullable[str]* | :heavy_minus_sign: | The division the person is currently in. Usually a collection of departments or teams or regions. | Europe | -| `division_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the division this employee belongs to. | 12345 | -| `department` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated. Use department_id instead..

The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. | R&D | -| `department_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the department ID this employee belongs to. | 12345 | -| `department_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the department this employee belongs to. | 12345 | -| `team` | [OptionalNullable[models.Team]](../../models/team.md) | :heavy_minus_sign: | The team the person is currently in. | | -| `company_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique identifier of the company. | 23456 | -| `company_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the company. | SpaceX | -| `employment_start_date` | *OptionalNullable[str]* | :heavy_minus_sign: | A Start Date is the date that the employee started working at the company | 2021-10-26 | -| `employment_end_date` | *OptionalNullable[str]* | :heavy_minus_sign: | An End Date is the date that the employee ended working at the company | 2028-10-26 | -| `leaving_reason` | [OptionalNullable[models.LeavingReason]](../../models/leavingreason.md) | :heavy_minus_sign: | The reason because the employment ended. | resigned | -| `employee_number` | *OptionalNullable[str]* | :heavy_minus_sign: | An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. | 123456-AB | -| `employment_status` | [OptionalNullable[models.EmploymentStatus]](../../models/employmentstatus.md) | :heavy_minus_sign: | The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. | active | -| `employment_role` | [Optional[models.EmploymentRole]](../../models/employmentrole.md) | :heavy_minus_sign: | N/A | | -| `ethnicity` | *OptionalNullable[str]* | :heavy_minus_sign: | The ethnicity of the employee | African American | -| `manager` | [Optional[models.Manager]](../../models/manager.md) | :heavy_minus_sign: | N/A | | -| `direct_reports` | List[*str*] | :heavy_minus_sign: | Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. | [
"a0d636c6-43b3-4bde-8c70-85b707d992f4",
"a98lfd96-43b3-4bde-8c70-85b707d992e6"
] | -| `social_security_number` | *OptionalNullable[str]* | :heavy_minus_sign: | A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. | 123456789 | -| `birthday` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date of birth of the person. | 2000-08-12 | -| `deceased_on` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the person deceased. | 2000-08-12 | -| `country_of_birth` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | A description of the object. | A description | -| `gender` | [OptionalNullable[models.Gender]](../../models/gender.md) | :heavy_minus_sign: | The gender represents the gender identity of a person. | male | -| `pronouns` | *OptionalNullable[str]* | :heavy_minus_sign: | The preferred pronouns of the person. | she,her | -| `preferred_language` | *OptionalNullable[str]* | :heavy_minus_sign: | language code according to ISO 639-1. For the United States - EN | EN | -| `languages` | List[*Nullable[str]*] | :heavy_minus_sign: | N/A | | -| `nationalities` | List[*Nullable[str]*] | :heavy_minus_sign: | N/A | | -| `photo_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The URL of the photo of a person. | https://unavatar.io/elon-musk | -| `timezone` | *OptionalNullable[str]* | :heavy_minus_sign: | The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. | Europe/London | -| `source` | *OptionalNullable[str]* | :heavy_minus_sign: | When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. | lever | -| `source_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). | 12345 | -| `record_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | https://app.intercom.io/contacts/12345 | -| `jobs` | List[[models.EmployeeJobInput](../../models/employeejobinput.md)] | :heavy_minus_sign: | N/A | | -| `compensations` | List[[models.EmployeeCompensationInput](../../models/employeecompensationinput.md)] | :heavy_minus_sign: | N/A | | -| `works_remote` | *OptionalNullable[bool]* | :heavy_minus_sign: | Indicates if the employee works from a remote location. | true | -| `addresses` | List[[models.Address](../../models/address.md)] | :heavy_minus_sign: | N/A | | -| `phone_numbers` | List[[models.PhoneNumber](../../models/phonenumber.md)] | :heavy_minus_sign: | N/A | | -| `emails` | List[[models.Email](../../models/email.md)] | :heavy_minus_sign: | N/A | | -| `custom_fields` | List[[models.CustomField](../../models/customfield.md)] | :heavy_minus_sign: | N/A | | -| `social_links` | List[[models.SocialLink](../../models/sociallink.md)] | :heavy_minus_sign: | N/A | | -| `bank_accounts` | List[[models.BankAccount2](../../models/bankaccount2.md)] | :heavy_minus_sign: | N/A | | -| `tax_code` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | 1111 | -| `tax_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | 234-32-0000 | -| `dietary_preference` | *OptionalNullable[str]* | :heavy_minus_sign: | Indicate the employee's dietary preference. | Veggie | -| `food_allergies` | List[*str*] | :heavy_minus_sign: | Indicate the employee's food allergies. | [
"No allergies"
] | -| `probation_period` | [Optional[models.ProbationPeriod]](../../models/probationperiod.md) | :heavy_minus_sign: | N/A | | -| `tags` | List[*str*] | :heavy_minus_sign: | N/A | [
"New"
] | -| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | -| `deleted` | *OptionalNullable[bool]* | :heavy_minus_sign: | Flag to indicate if the object is deleted. | true | -| `pass_through` | List[[models.PassThroughBody](../../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | -| `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 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The first name of the employee. | John | +| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The last name of the employee. | Doe | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The display name of the employee. | John Doe | +| `emails` | List[[models.Email](../../models/email.md)] | :heavy_minus_sign: | Email addresses of the employee. | | +| `employee_number` | *OptionalNullable[str]* | :heavy_minus_sign: | The employee number or identifier. | EMP-001 | +| `job_title` | *OptionalNullable[str]* | :heavy_minus_sign: | The job title of the employee. | Senior Accountant | +| `status` | [OptionalNullable[models.EmployeeStatus]](../../models/employeestatus.md) | :heavy_minus_sign: | The status of the employee. | active | +| `is_contractor` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the employee is a contractor. | false | +| `department` | [OptionalNullable[models.LinkedDepartmentInput]](../../models/linkeddepartmentinput.md) | :heavy_minus_sign: | N/A | | +| `location` | [OptionalNullable[models.LinkedLocationInput]](../../models/linkedlocationinput.md) | :heavy_minus_sign: | N/A | | +| `manager` | [Optional[models.AccountingEmployeeManager]](../../models/accountingemployeemanager.md) | :heavy_minus_sign: | The manager of the employee. | | +| `hire_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee was hired. | 2020-01-15 | +| `termination_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the employee was terminated. | 2025-12-31 | +| `gender` | [OptionalNullable[models.Gender]](../../models/gender.md) | :heavy_minus_sign: | The gender represents the gender identity of a person. | male | +| `birth_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date of birth of the employee. | 1990-05-20 | +| `subsidiary` | [OptionalNullable[models.LinkedSubsidiaryInput]](../../models/linkedsubsidiaryinput.md) | :heavy_minus_sign: | N/A | | +| `tracking_categories` | List[[Nullable[models.LinkedTrackingCategory]](../../models/linkedtrackingcategory.md)] | :heavy_minus_sign: | A list of linked tracking categories. | | +| `currency` | [OptionalNullable[models.Currency]](../../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `notes` | *OptionalNullable[str]* | :heavy_minus_sign: | Notes about the employee. | Some notes about this employee | +| `addresses` | List[[models.Address](../../models/address.md)] | :heavy_minus_sign: | Addresses of the employee. | | +| `phone_numbers` | List[[models.PhoneNumber](../../models/phonenumber.md)] | :heavy_minus_sign: | Phone numbers of the employee. | | +| `custom_fields` | List[[models.CustomField](../../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `pass_through` | List[[models.PassThroughBody](../../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[models.HrisEmployeesUpdateResponse](../../models/hrisemployeesupdateresponse.md)** +**[models.AccountingEmployeesUpdateResponse](../../models/accountingemployeesupdateresponse.md)** ### Errors @@ -982,7 +461,7 @@ Delete Employee ### Example Usage - + ```python from apideck_unify import Apideck import os @@ -994,12 +473,12 @@ with Apideck( api_key=os.getenv("APIDECK_API_KEY", ""), ) as apideck: - res = apideck.hris.employees.delete(id="", service_id="salesforce", raw=False) + res = apideck.accounting.employees.delete(id="", service_id="salesforce", raw=False) - assert res.delete_employee_response is not None + assert res.delete_accounting_employee_response is not None # Handle response - print(res.delete_employee_response) + print(res.delete_accounting_employee_response) ``` @@ -1016,7 +495,7 @@ with Apideck( ### Response -**[models.HrisEmployeesDeleteResponse](../../models/hrisemployeesdeleteresponse.md)** +**[models.AccountingEmployeesDeleteResponse](../../models/accountingemployeesdeleteresponse.md)** ### Errors diff --git a/docs/sdks/expensecategories/README.md b/docs/sdks/expensecategories/README.md new file mode 100644 index 00000000..63891ca5 --- /dev/null +++ b/docs/sdks/expensecategories/README.md @@ -0,0 +1,375 @@ +# ExpenseCategories +(*accounting.expense_categories*) + +## Overview + +### Available Operations + +* [list](#list) - List Expense Categories +* [create](#create) - Create Expense Category +* [get](#get) - Get Expense Category +* [update](#update) - Update Expense Category +* [delete](#delete) - Delete Expense Category + +## list + +List Expense Categories + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +from apideck_unify.utils import parse_datetime +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.expense_categories.list(raw=False, service_id="salesforce", limit=20, fields="id,updated_at", filter_={ + "updated_since": parse_datetime("2020-09-30T07:43:32.000Z"), + "status": apideck_unify.ExpenseCategoriesFilterStatus.ACTIVE, + }) + + while res is not None: + # Handle items + + res = res.next() + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `filter_` | [Optional[models.ExpenseCategoriesFilter]](../../models/expensecategoriesfilter.md) | :heavy_minus_sign: | Apply filters | {
"updated_since": "2020-09-30T07:43:32.000Z",
"status": "active"
} | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingExpenseCategoriesAllResponse](../../models/accountingexpensecategoriesallresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## create + +Create Expense Category + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.expense_categories.create(name="Travel", raw=False, service_id="salesforce", display_id="123456", code="TRAVEL-001", description="Travel-related expenses including flights, hotels, and ground transportation.", status=apideck_unify.ExpenseCategoryStatus.ACTIVE, account={ + "id": "123456", + "name": "Bank account", + "nominal_code": "N091", + "code": "453", + "parent_id": "123456", + "display_id": "123456", + }, offset_account={ + "id": "123456", + "name": "Bank account", + "nominal_code": "N091", + "code": "453", + "parent_id": "123456", + "display_id": "123456", + }, tax_rate={ + "id": "123456", + "code": "N-T", + "rate": 10, + }, rate_required=False, default_rate=0.67, row_version="1-12345", pass_through=[ + { + "service_id": "", + "extend_paths": [ + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + ], + }, + ]) + + assert res.create_expense_category_response is not None + + # Handle response + print(res.create_expense_category_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | The name of the expense category. | Travel | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `code` | *OptionalNullable[str]* | :heavy_minus_sign: | The code or external identifier of the expense category. | TRAVEL-001 | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the expense category. | Travel-related expenses including flights, hotels, and ground transportation. | +| `status` | [OptionalNullable[models.ExpenseCategoryStatus]](../../models/expensecategorystatus.md) | :heavy_minus_sign: | The status of the expense category. | active | +| `account` | [OptionalNullable[models.LinkedLedgerAccount]](../../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `offset_account` | [OptionalNullable[models.LinkedLedgerAccount]](../../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `tax_rate` | [Optional[models.LinkedTaxRateInput]](../../models/linkedtaxrateinput.md) | :heavy_minus_sign: | N/A | | +| `rate_required` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). | false | +| `default_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Default rate when rate_required is true (e.g. 0.67 for mileage). | 0.67 | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `pass_through` | List[[models.PassThroughBody](../../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingExpenseCategoriesAddResponse](../../models/accountingexpensecategoriesaddresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get + +Get Expense Category + +### Example Usage + + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.expense_categories.get(id="", service_id="salesforce", raw=False, fields="id,updated_at") + + assert res.get_expense_category_response is not None + + # Handle response + print(res.get_expense_category_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingExpenseCategoriesOneResponse](../../models/accountingexpensecategoriesoneresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## update + +Update Expense Category + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.expense_categories.update(id="", name="Travel", service_id="salesforce", raw=False, display_id="123456", code="TRAVEL-001", description="Travel-related expenses including flights, hotels, and ground transportation.", status=apideck_unify.ExpenseCategoryStatus.ACTIVE, account={ + "id": "123456", + "name": "Bank account", + "nominal_code": "N091", + "code": "453", + "parent_id": "123456", + "display_id": "123456", + }, offset_account={ + "id": "123456", + "name": "Bank account", + "nominal_code": "N091", + "code": "453", + "parent_id": "123456", + "display_id": "123456", + }, tax_rate={ + "id": "123456", + "code": "N-T", + "rate": 10, + }, rate_required=False, default_rate=0.67, row_version="1-12345", pass_through=[ + { + "service_id": "", + "extend_paths": [ + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + ], + }, + ]) + + assert res.update_expense_category_response is not None + + # Handle response + print(res.update_expense_category_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `name` | *str* | :heavy_check_mark: | The name of the expense category. | Travel | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `code` | *OptionalNullable[str]* | :heavy_minus_sign: | The code or external identifier of the expense category. | TRAVEL-001 | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the expense category. | Travel-related expenses including flights, hotels, and ground transportation. | +| `status` | [OptionalNullable[models.ExpenseCategoryStatus]](../../models/expensecategorystatus.md) | :heavy_minus_sign: | The status of the expense category. | active | +| `account` | [OptionalNullable[models.LinkedLedgerAccount]](../../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `offset_account` | [OptionalNullable[models.LinkedLedgerAccount]](../../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `tax_rate` | [Optional[models.LinkedTaxRateInput]](../../models/linkedtaxrateinput.md) | :heavy_minus_sign: | N/A | | +| `rate_required` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). | false | +| `default_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Default rate when rate_required is true (e.g. 0.67 for mileage). | 0.67 | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `pass_through` | List[[models.PassThroughBody](../../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingExpenseCategoriesUpdateResponse](../../models/accountingexpensecategoriesupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete Expense Category + +### Example Usage + + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.expense_categories.delete(id="", service_id="salesforce", raw=False) + + assert res.delete_expense_category_response is not None + + # Handle response + print(res.delete_expense_category_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingExpenseCategoriesDeleteResponse](../../models/accountingexpensecategoriesdeleteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/expensereports/README.md b/docs/sdks/expensereports/README.md new file mode 100644 index 00000000..43102424 --- /dev/null +++ b/docs/sdks/expensereports/README.md @@ -0,0 +1,440 @@ +# ExpenseReports +(*accounting.expense_reports*) + +## Overview + +### Available Operations + +* [list](#list) - List Expense Reports +* [create](#create) - Create Expense Report +* [get](#get) - Get Expense Report +* [update](#update) - Update Expense Report +* [delete](#delete) - Delete Expense Report + +## list + +List Expense Reports + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +from apideck_unify.utils import parse_datetime +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.expense_reports.list(raw=False, service_id="salesforce", limit=20, fields="id,updated_at", filter_={ + "updated_since": parse_datetime("2020-09-30T07:43:32.000Z"), + "status": apideck_unify.ExpenseReportsFilterStatus.SUBMITTED, + }) + + while res is not None: + # Handle items + + res = res.next() + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `filter_` | [Optional[models.ExpenseReportsFilter]](../../models/expensereportsfilter.md) | :heavy_minus_sign: | Apply filters | {
"updated_since": "2020-09-30T07:43:32.000Z",
"status": "submitted"
} | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingExpenseReportsAllResponse](../../models/accountingexpensereportsallresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## create + +Create Expense Report + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +from apideck_unify.utils import parse_datetime +from datetime import date +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.expense_reports.create(employee={ + "id": "12345", + "display_name": "John Doe", + }, transaction_date=parse_datetime("2021-05-01T12:00:00.000Z"), line_items=[], raw=False, service_id="salesforce", display_id="123456", number="ER-001", title="Q1 Business Travel", status=apideck_unify.ExpenseReportStatus.SUBMITTED, posting_date=date.fromisoformat("2024-06-01"), due_date=date.fromisoformat("2024-06-15"), currency=apideck_unify.Currency.USD, currency_rate=0.69, sub_total=250, total_tax=25, total_amount=1250.75, reimbursable_amount=1100, memo="Business travel expenses for Q1 client meetings", department={ + "display_id": "123456", + "name": "Acme Inc.", + }, location={ + "id": "123456", + "display_id": "123456", + "name": "New York Office", + }, account=None, accounting_period={ + "id": "12345", + "name": "Q1 2024", + }, subsidiary={ + "display_id": "123456", + "name": "Acme Inc.", + }, tracking_categories=[ + { + "id": "123456", + "code": "100", + "name": "New York", + "parent_id": "123456", + "parent_name": "New York", + }, + ], tax_inclusive=True, approved_by={ + "id": "12345", + "display_name": "Jane Smith", + }, custom_fields=[ + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": "Uses Salesforce and Marketo", + }, + ], row_version="1-12345", pass_through=[ + { + "service_id": "", + "extend_paths": [ + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + ], + }, + ]) + + assert res.create_expense_report_response is not None + + # Handle response + print(res.create_expense_report_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `employee` | [models.ExpenseReportEmployee](../../models/expensereportemployee.md) | :heavy_check_mark: | The employee who submitted the expense report. | | +| `transaction_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `line_items` | List[[models.ExpenseReportLineItemInput](../../models/expensereportlineiteminput.md)] | :heavy_check_mark: | Expense line items linked to this expense report. | | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `number` | *OptionalNullable[str]* | :heavy_minus_sign: | The expense report number. | ER-001 | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Title or purpose of the expense report. | Q1 Business Travel | +| `status` | [OptionalNullable[models.ExpenseReportStatus]](../../models/expensereportstatus.md) | :heavy_minus_sign: | The status of the expense report. | submitted | +| `posting_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the expense report was posted to the general ledger. | 2024-06-01 | +| `due_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date when reimbursement is due. | 2024-06-15 | +| `currency` | [OptionalNullable[models.Currency]](../../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currency_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `sub_total` | *OptionalNullable[float]* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `total_tax` | *OptionalNullable[float]* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `total_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | Total amount of all expense lines including tax. | 1250.75 | +| `reimbursable_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | Total reimbursable amount (may differ from total if some expenses are non-reimbursable). | 1100 | +| `memo` | *OptionalNullable[str]* | :heavy_minus_sign: | The memo of the expense report. | Business travel expenses for Q1 client meetings | +| `department` | [OptionalNullable[models.LinkedDepartmentInput]](../../models/linkeddepartmentinput.md) | :heavy_minus_sign: | N/A | | +| `location` | [OptionalNullable[models.LinkedLocationInput]](../../models/linkedlocationinput.md) | :heavy_minus_sign: | N/A | | +| `account` | [OptionalNullable[models.LinkedLedgerAccount]](../../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `accounting_period` | [OptionalNullable[models.AccountingPeriod]](../../models/accountingperiod.md) | :heavy_minus_sign: | The accounting period the expense report is posted to. | | +| `subsidiary` | [OptionalNullable[models.LinkedSubsidiaryInput]](../../models/linkedsubsidiaryinput.md) | :heavy_minus_sign: | N/A | | +| `tracking_categories` | List[[Nullable[models.LinkedTrackingCategory]](../../models/linkedtrackingcategory.md)] | :heavy_minus_sign: | A list of linked tracking categories. | | +| `tax_inclusive` | *OptionalNullable[bool]* | :heavy_minus_sign: | Amounts are including tax | true | +| `approved_by` | [OptionalNullable[models.ApprovedBy]](../../models/approvedby.md) | :heavy_minus_sign: | The person who approved the expense report. | | +| `custom_fields` | List[[models.CustomField](../../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `pass_through` | List[[models.PassThroughBody](../../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingExpenseReportsAddResponse](../../models/accountingexpensereportsaddresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get + +Get Expense Report + +### Example Usage + + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.expense_reports.get(id="", service_id="salesforce", raw=False, fields="id,updated_at") + + assert res.get_expense_report_response is not None + + # Handle response + print(res.get_expense_report_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingExpenseReportsOneResponse](../../models/accountingexpensereportsoneresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## update + +Update Expense Report + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +from apideck_unify.utils import parse_datetime +from datetime import date +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.expense_reports.update(id="", employee={ + "id": "12345", + "display_name": "John Doe", + }, transaction_date=parse_datetime("2021-05-01T12:00:00.000Z"), line_items=[], service_id="salesforce", raw=False, display_id="123456", number="ER-001", title="Q1 Business Travel", status=apideck_unify.ExpenseReportStatus.SUBMITTED, posting_date=date.fromisoformat("2024-06-01"), due_date=date.fromisoformat("2024-06-15"), currency=apideck_unify.Currency.USD, currency_rate=0.69, sub_total=250, total_tax=25, total_amount=1250.75, reimbursable_amount=1100, memo="Business travel expenses for Q1 client meetings", department={ + "display_id": "123456", + "name": "Acme Inc.", + }, location={ + "id": "123456", + "display_id": "123456", + "name": "New York Office", + }, account={ + "id": "123456", + "name": "Bank account", + "nominal_code": "N091", + "code": "453", + "parent_id": "123456", + "display_id": "123456", + }, accounting_period={ + "id": "12345", + "name": "Q1 2024", + }, subsidiary={ + "display_id": "123456", + "name": "Acme Inc.", + }, tracking_categories=None, tax_inclusive=True, approved_by={ + "id": "12345", + "display_name": "Jane Smith", + }, custom_fields=[ + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": "Uses Salesforce and Marketo", + }, + ], row_version="1-12345", pass_through=[ + { + "service_id": "", + "extend_paths": [ + { + "path": "$.nested.property", + "value": { + "TaxClassificationRef": { + "value": "EUC-99990201-V1-00020000", + }, + }, + }, + ], + }, + ]) + + assert res.update_expense_report_response is not None + + # Handle response + print(res.update_expense_report_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `employee` | [models.ExpenseReportEmployee](../../models/expensereportemployee.md) | :heavy_check_mark: | The employee who submitted the expense report. | | +| `transaction_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2021-05-01T12:00:00.000Z | +| `line_items` | List[[models.ExpenseReportLineItemInput](../../models/expensereportlineiteminput.md)] | :heavy_check_mark: | Expense line items linked to this expense report. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Id to be displayed. | 123456 | +| `number` | *OptionalNullable[str]* | :heavy_minus_sign: | The expense report number. | ER-001 | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Title or purpose of the expense report. | Q1 Business Travel | +| `status` | [OptionalNullable[models.ExpenseReportStatus]](../../models/expensereportstatus.md) | :heavy_minus_sign: | The status of the expense report. | submitted | +| `posting_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | The date the expense report was posted to the general ledger. | 2024-06-01 | +| `due_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | Date when reimbursement is due. | 2024-06-15 | +| `currency` | [OptionalNullable[models.Currency]](../../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `currency_rate` | *OptionalNullable[float]* | :heavy_minus_sign: | Currency Exchange Rate at the time entity was recorded/generated. | 0.69 | +| `sub_total` | *OptionalNullable[float]* | :heavy_minus_sign: | Subtotal amount, normally before tax. | 250 | +| `total_tax` | *OptionalNullable[float]* | :heavy_minus_sign: | Total tax amount applied to this transaction. | 25 | +| `total_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | Total amount of all expense lines including tax. | 1250.75 | +| `reimbursable_amount` | *OptionalNullable[float]* | :heavy_minus_sign: | Total reimbursable amount (may differ from total if some expenses are non-reimbursable). | 1100 | +| `memo` | *OptionalNullable[str]* | :heavy_minus_sign: | The memo of the expense report. | Business travel expenses for Q1 client meetings | +| `department` | [OptionalNullable[models.LinkedDepartmentInput]](../../models/linkeddepartmentinput.md) | :heavy_minus_sign: | N/A | | +| `location` | [OptionalNullable[models.LinkedLocationInput]](../../models/linkedlocationinput.md) | :heavy_minus_sign: | N/A | | +| `account` | [OptionalNullable[models.LinkedLedgerAccount]](../../models/linkedledgeraccount.md) | :heavy_minus_sign: | N/A | | +| `accounting_period` | [OptionalNullable[models.AccountingPeriod]](../../models/accountingperiod.md) | :heavy_minus_sign: | The accounting period the expense report is posted to. | | +| `subsidiary` | [OptionalNullable[models.LinkedSubsidiaryInput]](../../models/linkedsubsidiaryinput.md) | :heavy_minus_sign: | N/A | | +| `tracking_categories` | List[[Nullable[models.LinkedTrackingCategory]](../../models/linkedtrackingcategory.md)] | :heavy_minus_sign: | A list of linked tracking categories. | | +| `tax_inclusive` | *OptionalNullable[bool]* | :heavy_minus_sign: | Amounts are including tax | true | +| `approved_by` | [OptionalNullable[models.ApprovedBy]](../../models/approvedby.md) | :heavy_minus_sign: | The person who approved the expense report. | | +| `custom_fields` | List[[models.CustomField](../../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `row_version` | *OptionalNullable[str]* | :heavy_minus_sign: | A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. | 1-12345 | +| `pass_through` | List[[models.PassThroughBody](../../models/passthroughbody.md)] | :heavy_minus_sign: | The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingExpenseReportsUpdateResponse](../../models/accountingexpensereportsupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete Expense Report + +### Example Usage + + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.expense_reports.delete(id="", service_id="salesforce", raw=False) + + assert res.delete_expense_report_response is not None + + # Handle response + print(res.delete_expense_report_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingExpenseReportsDeleteResponse](../../models/accountingexpensereportsdeleteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3edabf2b..08932085 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "apideck-unify" -version = "0.30.2" +version = "0.30.3" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" diff --git a/src/apideck_unify/_version.py b/src/apideck_unify/_version.py index 2c9dd09f..74f583d1 100644 --- a/src/apideck_unify/_version.py +++ b/src/apideck_unify/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "apideck-unify" -__version__: str = "0.30.2" -__openapi_doc_version__: str = "10.23.19" +__version__: str = "0.30.3" +__openapi_doc_version__: str = "10.23.21" __gen_version__: str = "2.753.1" -__user_agent__: str = "speakeasy-sdk/python 0.30.2 2.753.1 10.23.19 apideck-unify" +__user_agent__: str = "speakeasy-sdk/python 0.30.3 2.753.1 10.23.21 apideck-unify" try: if __package__ is not None: diff --git a/src/apideck_unify/accounting.py b/src/apideck_unify/accounting.py index 8e932e47..9391e0de 100644 --- a/src/apideck_unify/accounting.py +++ b/src/apideck_unify/accounting.py @@ -16,6 +16,9 @@ from apideck_unify.creditnotes import CreditNotes from apideck_unify.customers import Customers from apideck_unify.departments import Departments +from apideck_unify.employees import Employees +from apideck_unify.expensecategories import ExpenseCategories +from apideck_unify.expensereports import ExpenseReports from apideck_unify.expenses import Expenses from apideck_unify.invoiceitems import InvoiceItems from apideck_unify.invoices import Invoices @@ -64,6 +67,9 @@ class Accounting(BaseSDK): categories: Categories quotes: Quotes projects: Projects + employees: Employees + expense_categories: ExpenseCategories + expense_reports: ExpenseReports def __init__( self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None @@ -138,3 +144,10 @@ def _init_sdks(self): self.categories = Categories(self.sdk_configuration, parent_ref=self.parent_ref) self.quotes = Quotes(self.sdk_configuration, parent_ref=self.parent_ref) self.projects = Projects(self.sdk_configuration, parent_ref=self.parent_ref) + self.employees = Employees(self.sdk_configuration, parent_ref=self.parent_ref) + self.expense_categories = ExpenseCategories( + self.sdk_configuration, parent_ref=self.parent_ref + ) + self.expense_reports = ExpenseReports( + self.sdk_configuration, parent_ref=self.parent_ref + ) diff --git a/src/apideck_unify/apideck_employees.py b/src/apideck_unify/apideck_employees.py new file mode 100644 index 00000000..773a65c4 --- /dev/null +++ b/src/apideck_unify/apideck_employees.py @@ -0,0 +1,2471 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from apideck_unify import models, utils +from apideck_unify._hooks import HookContext +from apideck_unify.types import Nullable, OptionalNullable, UNSET +from apideck_unify.utils import get_security_from_env +from apideck_unify.utils.unmarshal_json_response import unmarshal_json_response +from datetime import date +from jsonpath import JSONPath +from typing import Any, Dict, List, Mapping, Optional, Union + + +class ApideckEmployees(BaseSDK): + def list( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 20, + filter_: Optional[ + Union[models.EmployeesFilter, models.EmployeesFilterTypedDict] + ] = None, + sort: Optional[ + Union[models.EmployeesSort, models.EmployeesSortTypedDict] + ] = None, + pass_through: Optional[Dict[str, Any]] = None, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.HrisEmployeesAllResponse]: + r"""List Employees + + Apideck operates as a stateless Unified API, which means that the list endpoint only provides a portion of the employee model. This is due to the fact that most HRIS systems do not readily provide all data in every call. However, you can access the complete employee model through an employee detail call. + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 + :param filter_: Apply filters + :param sort: Apply sorting + :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :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.HrisEmployeesAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + filter_=utils.get_pydantic_model(filter_, Optional[models.EmployeesFilter]), + sort=utils.get_pydantic_model(sort, Optional[models.EmployeesSort]), + pass_through=pass_through, + fields=fields, + ) + + req = self._build_request( + method="GET", + path="/hris/employees", + 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, + _globals=models.HrisEmployeesAllGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="hris.employeesAll", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.HrisEmployeesAllResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.meta.cursors.next").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + filter_=filter_, + sort=sort, + pass_through=pass_through, + fields=fields, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.HrisEmployeesAllResponse( + get_employees_response=unmarshal_json_response( + Optional[models.GetEmployeesResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.HrisEmployeesAllResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + raise models.APIError("Unexpected response received", http_res) + + async def list_async( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 20, + filter_: Optional[ + Union[models.EmployeesFilter, models.EmployeesFilterTypedDict] + ] = None, + sort: Optional[ + Union[models.EmployeesSort, models.EmployeesSortTypedDict] + ] = None, + pass_through: Optional[Dict[str, Any]] = None, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.HrisEmployeesAllResponse]: + r"""List Employees + + Apideck operates as a stateless Unified API, which means that the list endpoint only provides a portion of the employee model. This is due to the fact that most HRIS systems do not readily provide all data in every call. However, you can access the complete employee model through an employee detail call. + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 + :param filter_: Apply filters + :param sort: Apply sorting + :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :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.HrisEmployeesAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + filter_=utils.get_pydantic_model(filter_, Optional[models.EmployeesFilter]), + sort=utils.get_pydantic_model(sort, Optional[models.EmployeesSort]), + pass_through=pass_through, + fields=fields, + ) + + req = self._build_request_async( + method="GET", + path="/hris/employees", + 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, + _globals=models.HrisEmployeesAllGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="hris.employeesAll", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.HrisEmployeesAllResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.meta.cursors.next").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + filter_=filter_, + sort=sort, + pass_through=pass_through, + fields=fields, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.HrisEmployeesAllResponse( + get_employees_response=unmarshal_json_response( + Optional[models.GetEmployeesResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.HrisEmployeesAllResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + raise models.APIError("Unexpected response received", http_res) + + def create( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + id: OptionalNullable[str] = UNSET, + first_name: OptionalNullable[str] = UNSET, + last_name: OptionalNullable[str] = UNSET, + middle_name: OptionalNullable[str] = UNSET, + display_name: OptionalNullable[str] = UNSET, + preferred_name: OptionalNullable[str] = UNSET, + initials: OptionalNullable[str] = UNSET, + salutation: OptionalNullable[str] = UNSET, + title: OptionalNullable[str] = UNSET, + marital_status: OptionalNullable[str] = UNSET, + partner: Optional[ + Union[models.PersonInput, models.PersonInputTypedDict] + ] = None, + division: OptionalNullable[str] = UNSET, + division_id: OptionalNullable[str] = UNSET, + department: OptionalNullable[str] = UNSET, + department_id: OptionalNullable[str] = UNSET, + department_name: OptionalNullable[str] = UNSET, + team: OptionalNullable[Union[models.Team, models.TeamTypedDict]] = UNSET, + company_id: OptionalNullable[str] = UNSET, + company_name: OptionalNullable[str] = UNSET, + employment_start_date: OptionalNullable[str] = UNSET, + employment_end_date: OptionalNullable[str] = UNSET, + leaving_reason: OptionalNullable[models.LeavingReason] = UNSET, + employee_number: OptionalNullable[str] = UNSET, + employment_status: OptionalNullable[models.EmploymentStatus] = UNSET, + employment_role: Optional[ + Union[models.EmploymentRole, models.EmploymentRoleTypedDict] + ] = None, + ethnicity: OptionalNullable[str] = UNSET, + manager: Optional[Union[models.Manager, models.ManagerTypedDict]] = None, + direct_reports: OptionalNullable[List[str]] = UNSET, + social_security_number: OptionalNullable[str] = UNSET, + birthday: OptionalNullable[date] = UNSET, + deceased_on: OptionalNullable[date] = UNSET, + country_of_birth: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + gender: OptionalNullable[models.Gender] = UNSET, + pronouns: OptionalNullable[str] = UNSET, + preferred_language: OptionalNullable[str] = UNSET, + languages: Optional[List[Nullable[str]]] = None, + nationalities: Optional[List[Nullable[str]]] = None, + photo_url: OptionalNullable[str] = UNSET, + timezone: OptionalNullable[str] = UNSET, + source: OptionalNullable[str] = UNSET, + source_id: OptionalNullable[str] = UNSET, + record_url: OptionalNullable[str] = UNSET, + jobs: OptionalNullable[ + Union[List[models.EmployeeJobInput], List[models.EmployeeJobInputTypedDict]] + ] = UNSET, + compensations: OptionalNullable[ + Union[ + List[models.EmployeeCompensationInput], + List[models.EmployeeCompensationInputTypedDict], + ] + ] = UNSET, + works_remote: OptionalNullable[bool] = UNSET, + addresses: Optional[ + Union[List[models.Address], List[models.AddressTypedDict]] + ] = None, + phone_numbers: Optional[ + Union[List[models.PhoneNumber], List[models.PhoneNumberTypedDict]] + ] = None, + emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + social_links: Optional[ + Union[List[models.SocialLink], List[models.SocialLinkTypedDict]] + ] = None, + bank_accounts: Optional[ + Union[List[models.BankAccount2], List[models.BankAccount2TypedDict]] + ] = None, + tax_code: OptionalNullable[str] = UNSET, + tax_id: OptionalNullable[str] = UNSET, + dietary_preference: OptionalNullable[str] = UNSET, + food_allergies: OptionalNullable[List[str]] = UNSET, + probation_period: Optional[ + Union[models.ProbationPeriod, models.ProbationPeriodTypedDict] + ] = None, + tags: OptionalNullable[List[str]] = UNSET, + row_version: OptionalNullable[str] = UNSET, + deleted: OptionalNullable[bool] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.HrisEmployeesAddResponse: + r"""Create Employee + + Create Employee + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param id: A unique identifier for an object. + :param first_name: The first name of the person. + :param last_name: The last name of the person. + :param middle_name: Middle name of the person. + :param display_name: The name used to display the employee, often a combination of their first and last names. + :param preferred_name: The name the employee prefers to be addressed by, which may be different from their legal name. + :param initials: The initials of the person, usually derived from their first, middle, and last names. + :param salutation: A formal salutation for the person. For example, 'Mr', 'Mrs' + :param title: The job title of the person. + :param marital_status: The marital status of the employee. + :param partner: + :param division: The division the person is currently in. Usually a collection of departments or teams or regions. + :param division_id: Unique identifier of the division this employee belongs to. + :param department: The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. + :param department_id: Unique identifier of the department ID this employee belongs to. + :param department_name: Name of the department this employee belongs to. + :param team: The team the person is currently in. + :param company_id: The unique identifier of the company. + :param company_name: The name of the company. + :param employment_start_date: A Start Date is the date that the employee started working at the company + :param employment_end_date: An End Date is the date that the employee ended working at the company + :param leaving_reason: The reason because the employment ended. + :param employee_number: An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. + :param employment_status: The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. + :param employment_role: + :param ethnicity: The ethnicity of the employee + :param manager: + :param direct_reports: Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. + :param social_security_number: A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. + :param birthday: The date of birth of the person. + :param deceased_on: The date the person deceased. + :param country_of_birth: Country code according to ISO 3166-1 alpha-2. + :param description: A description of the object. + :param gender: The gender represents the gender identity of a person. + :param pronouns: The preferred pronouns of the person. + :param preferred_language: language code according to ISO 639-1. For the United States - EN + :param languages: + :param nationalities: + :param photo_url: The URL of the photo of a person. + :param timezone: The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. + :param source: When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. + :param source_id: Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). + :param record_url: + :param jobs: + :param compensations: + :param works_remote: Indicates if the employee works from a remote location. + :param addresses: + :param phone_numbers: + :param emails: + :param custom_fields: + :param social_links: + :param bank_accounts: + :param tax_code: + :param tax_id: + :param dietary_preference: Indicate the employee's dietary preference. + :param food_allergies: Indicate the employee's food allergies. + :param probation_period: + :param tags: + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param deleted: Flag to indicate if the object is deleted. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.HrisEmployeesAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + employee=models.EmployeeInput( + id=id, + first_name=first_name, + last_name=last_name, + middle_name=middle_name, + display_name=display_name, + preferred_name=preferred_name, + initials=initials, + salutation=salutation, + title=title, + marital_status=marital_status, + partner=utils.get_pydantic_model(partner, Optional[models.PersonInput]), + division=division, + division_id=division_id, + department=department, + department_id=department_id, + department_name=department_name, + team=utils.get_pydantic_model(team, OptionalNullable[models.Team]), + company_id=company_id, + company_name=company_name, + employment_start_date=employment_start_date, + employment_end_date=employment_end_date, + leaving_reason=leaving_reason, + employee_number=employee_number, + employment_status=employment_status, + employment_role=utils.get_pydantic_model( + employment_role, Optional[models.EmploymentRole] + ), + ethnicity=ethnicity, + manager=utils.get_pydantic_model(manager, Optional[models.Manager]), + direct_reports=direct_reports, + social_security_number=social_security_number, + birthday=birthday, + deceased_on=deceased_on, + country_of_birth=country_of_birth, + description=description, + gender=gender, + pronouns=pronouns, + preferred_language=preferred_language, + languages=languages, + nationalities=nationalities, + photo_url=photo_url, + timezone=timezone, + source=source, + source_id=source_id, + record_url=record_url, + jobs=utils.get_pydantic_model( + jobs, OptionalNullable[List[models.EmployeeJobInput]] + ), + compensations=utils.get_pydantic_model( + compensations, + OptionalNullable[List[models.EmployeeCompensationInput]], + ), + works_remote=works_remote, + addresses=utils.get_pydantic_model( + addresses, Optional[List[models.Address]] + ), + phone_numbers=utils.get_pydantic_model( + phone_numbers, Optional[List[models.PhoneNumber]] + ), + emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + social_links=utils.get_pydantic_model( + social_links, Optional[List[models.SocialLink]] + ), + bank_accounts=utils.get_pydantic_model( + bank_accounts, Optional[List[models.BankAccount2]] + ), + tax_code=tax_code, + tax_id=tax_id, + dietary_preference=dietary_preference, + food_allergies=food_allergies, + probation_period=utils.get_pydantic_model( + probation_period, Optional[models.ProbationPeriod] + ), + tags=tags, + row_version=row_version, + deleted=deleted, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/hris/employees", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.HrisEmployeesAddGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.employee, False, False, "json", models.EmployeeInput + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="hris.employeesAdd", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.HrisEmployeesAddResponse( + create_employee_response=unmarshal_json_response( + Optional[models.CreateEmployeeResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.HrisEmployeesAddResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def create_async( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + id: OptionalNullable[str] = UNSET, + first_name: OptionalNullable[str] = UNSET, + last_name: OptionalNullable[str] = UNSET, + middle_name: OptionalNullable[str] = UNSET, + display_name: OptionalNullable[str] = UNSET, + preferred_name: OptionalNullable[str] = UNSET, + initials: OptionalNullable[str] = UNSET, + salutation: OptionalNullable[str] = UNSET, + title: OptionalNullable[str] = UNSET, + marital_status: OptionalNullable[str] = UNSET, + partner: Optional[ + Union[models.PersonInput, models.PersonInputTypedDict] + ] = None, + division: OptionalNullable[str] = UNSET, + division_id: OptionalNullable[str] = UNSET, + department: OptionalNullable[str] = UNSET, + department_id: OptionalNullable[str] = UNSET, + department_name: OptionalNullable[str] = UNSET, + team: OptionalNullable[Union[models.Team, models.TeamTypedDict]] = UNSET, + company_id: OptionalNullable[str] = UNSET, + company_name: OptionalNullable[str] = UNSET, + employment_start_date: OptionalNullable[str] = UNSET, + employment_end_date: OptionalNullable[str] = UNSET, + leaving_reason: OptionalNullable[models.LeavingReason] = UNSET, + employee_number: OptionalNullable[str] = UNSET, + employment_status: OptionalNullable[models.EmploymentStatus] = UNSET, + employment_role: Optional[ + Union[models.EmploymentRole, models.EmploymentRoleTypedDict] + ] = None, + ethnicity: OptionalNullable[str] = UNSET, + manager: Optional[Union[models.Manager, models.ManagerTypedDict]] = None, + direct_reports: OptionalNullable[List[str]] = UNSET, + social_security_number: OptionalNullable[str] = UNSET, + birthday: OptionalNullable[date] = UNSET, + deceased_on: OptionalNullable[date] = UNSET, + country_of_birth: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + gender: OptionalNullable[models.Gender] = UNSET, + pronouns: OptionalNullable[str] = UNSET, + preferred_language: OptionalNullable[str] = UNSET, + languages: Optional[List[Nullable[str]]] = None, + nationalities: Optional[List[Nullable[str]]] = None, + photo_url: OptionalNullable[str] = UNSET, + timezone: OptionalNullable[str] = UNSET, + source: OptionalNullable[str] = UNSET, + source_id: OptionalNullable[str] = UNSET, + record_url: OptionalNullable[str] = UNSET, + jobs: OptionalNullable[ + Union[List[models.EmployeeJobInput], List[models.EmployeeJobInputTypedDict]] + ] = UNSET, + compensations: OptionalNullable[ + Union[ + List[models.EmployeeCompensationInput], + List[models.EmployeeCompensationInputTypedDict], + ] + ] = UNSET, + works_remote: OptionalNullable[bool] = UNSET, + addresses: Optional[ + Union[List[models.Address], List[models.AddressTypedDict]] + ] = None, + phone_numbers: Optional[ + Union[List[models.PhoneNumber], List[models.PhoneNumberTypedDict]] + ] = None, + emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + social_links: Optional[ + Union[List[models.SocialLink], List[models.SocialLinkTypedDict]] + ] = None, + bank_accounts: Optional[ + Union[List[models.BankAccount2], List[models.BankAccount2TypedDict]] + ] = None, + tax_code: OptionalNullable[str] = UNSET, + tax_id: OptionalNullable[str] = UNSET, + dietary_preference: OptionalNullable[str] = UNSET, + food_allergies: OptionalNullable[List[str]] = UNSET, + probation_period: Optional[ + Union[models.ProbationPeriod, models.ProbationPeriodTypedDict] + ] = None, + tags: OptionalNullable[List[str]] = UNSET, + row_version: OptionalNullable[str] = UNSET, + deleted: OptionalNullable[bool] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.HrisEmployeesAddResponse: + r"""Create Employee + + Create Employee + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param id: A unique identifier for an object. + :param first_name: The first name of the person. + :param last_name: The last name of the person. + :param middle_name: Middle name of the person. + :param display_name: The name used to display the employee, often a combination of their first and last names. + :param preferred_name: The name the employee prefers to be addressed by, which may be different from their legal name. + :param initials: The initials of the person, usually derived from their first, middle, and last names. + :param salutation: A formal salutation for the person. For example, 'Mr', 'Mrs' + :param title: The job title of the person. + :param marital_status: The marital status of the employee. + :param partner: + :param division: The division the person is currently in. Usually a collection of departments or teams or regions. + :param division_id: Unique identifier of the division this employee belongs to. + :param department: The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. + :param department_id: Unique identifier of the department ID this employee belongs to. + :param department_name: Name of the department this employee belongs to. + :param team: The team the person is currently in. + :param company_id: The unique identifier of the company. + :param company_name: The name of the company. + :param employment_start_date: A Start Date is the date that the employee started working at the company + :param employment_end_date: An End Date is the date that the employee ended working at the company + :param leaving_reason: The reason because the employment ended. + :param employee_number: An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. + :param employment_status: The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. + :param employment_role: + :param ethnicity: The ethnicity of the employee + :param manager: + :param direct_reports: Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. + :param social_security_number: A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. + :param birthday: The date of birth of the person. + :param deceased_on: The date the person deceased. + :param country_of_birth: Country code according to ISO 3166-1 alpha-2. + :param description: A description of the object. + :param gender: The gender represents the gender identity of a person. + :param pronouns: The preferred pronouns of the person. + :param preferred_language: language code according to ISO 639-1. For the United States - EN + :param languages: + :param nationalities: + :param photo_url: The URL of the photo of a person. + :param timezone: The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. + :param source: When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. + :param source_id: Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). + :param record_url: + :param jobs: + :param compensations: + :param works_remote: Indicates if the employee works from a remote location. + :param addresses: + :param phone_numbers: + :param emails: + :param custom_fields: + :param social_links: + :param bank_accounts: + :param tax_code: + :param tax_id: + :param dietary_preference: Indicate the employee's dietary preference. + :param food_allergies: Indicate the employee's food allergies. + :param probation_period: + :param tags: + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param deleted: Flag to indicate if the object is deleted. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.HrisEmployeesAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + employee=models.EmployeeInput( + id=id, + first_name=first_name, + last_name=last_name, + middle_name=middle_name, + display_name=display_name, + preferred_name=preferred_name, + initials=initials, + salutation=salutation, + title=title, + marital_status=marital_status, + partner=utils.get_pydantic_model(partner, Optional[models.PersonInput]), + division=division, + division_id=division_id, + department=department, + department_id=department_id, + department_name=department_name, + team=utils.get_pydantic_model(team, OptionalNullable[models.Team]), + company_id=company_id, + company_name=company_name, + employment_start_date=employment_start_date, + employment_end_date=employment_end_date, + leaving_reason=leaving_reason, + employee_number=employee_number, + employment_status=employment_status, + employment_role=utils.get_pydantic_model( + employment_role, Optional[models.EmploymentRole] + ), + ethnicity=ethnicity, + manager=utils.get_pydantic_model(manager, Optional[models.Manager]), + direct_reports=direct_reports, + social_security_number=social_security_number, + birthday=birthday, + deceased_on=deceased_on, + country_of_birth=country_of_birth, + description=description, + gender=gender, + pronouns=pronouns, + preferred_language=preferred_language, + languages=languages, + nationalities=nationalities, + photo_url=photo_url, + timezone=timezone, + source=source, + source_id=source_id, + record_url=record_url, + jobs=utils.get_pydantic_model( + jobs, OptionalNullable[List[models.EmployeeJobInput]] + ), + compensations=utils.get_pydantic_model( + compensations, + OptionalNullable[List[models.EmployeeCompensationInput]], + ), + works_remote=works_remote, + addresses=utils.get_pydantic_model( + addresses, Optional[List[models.Address]] + ), + phone_numbers=utils.get_pydantic_model( + phone_numbers, Optional[List[models.PhoneNumber]] + ), + emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + social_links=utils.get_pydantic_model( + social_links, Optional[List[models.SocialLink]] + ), + bank_accounts=utils.get_pydantic_model( + bank_accounts, Optional[List[models.BankAccount2]] + ), + tax_code=tax_code, + tax_id=tax_id, + dietary_preference=dietary_preference, + food_allergies=food_allergies, + probation_period=utils.get_pydantic_model( + probation_period, Optional[models.ProbationPeriod] + ), + tags=tags, + row_version=row_version, + deleted=deleted, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/hris/employees", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.HrisEmployeesAddGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.employee, False, False, "json", models.EmployeeInput + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="hris.employeesAdd", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.HrisEmployeesAddResponse( + create_employee_response=unmarshal_json_response( + Optional[models.CreateEmployeeResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.HrisEmployeesAddResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + def get( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + fields: OptionalNullable[str] = UNSET, + filter_: Optional[ + Union[models.EmployeesOneFilter, models.EmployeesOneFilterTypedDict] + ] = None, + pass_through: Optional[Dict[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.HrisEmployeesOneResponse: + r"""Get Employee + + Get Employee + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param filter_: Apply filters + :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads + :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.HrisEmployeesOneRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + fields=fields, + filter_=utils.get_pydantic_model( + filter_, Optional[models.EmployeesOneFilter] + ), + pass_through=pass_through, + ) + + req = self._build_request( + method="GET", + path="/hris/employees/{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, + _globals=models.HrisEmployeesOneGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="hris.employeesOne", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.HrisEmployeesOneResponse( + get_employee_response=unmarshal_json_response( + Optional[models.GetEmployeeResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.HrisEmployeesOneResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def get_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + fields: OptionalNullable[str] = UNSET, + filter_: Optional[ + Union[models.EmployeesOneFilter, models.EmployeesOneFilterTypedDict] + ] = None, + pass_through: Optional[Dict[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.HrisEmployeesOneResponse: + r"""Get Employee + + Get Employee + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param filter_: Apply filters + :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads + :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.HrisEmployeesOneRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + fields=fields, + filter_=utils.get_pydantic_model( + filter_, Optional[models.EmployeesOneFilter] + ), + pass_through=pass_through, + ) + + req = self._build_request_async( + method="GET", + path="/hris/employees/{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, + _globals=models.HrisEmployeesOneGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="hris.employeesOne", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.HrisEmployeesOneResponse( + get_employee_response=unmarshal_json_response( + Optional[models.GetEmployeeResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.HrisEmployeesOneResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + def update( + self, + *, + id_param: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + id: OptionalNullable[str] = UNSET, + first_name: OptionalNullable[str] = UNSET, + last_name: OptionalNullable[str] = UNSET, + middle_name: OptionalNullable[str] = UNSET, + display_name: OptionalNullable[str] = UNSET, + preferred_name: OptionalNullable[str] = UNSET, + initials: OptionalNullable[str] = UNSET, + salutation: OptionalNullable[str] = UNSET, + title: OptionalNullable[str] = UNSET, + marital_status: OptionalNullable[str] = UNSET, + partner: Optional[ + Union[models.PersonInput, models.PersonInputTypedDict] + ] = None, + division: OptionalNullable[str] = UNSET, + division_id: OptionalNullable[str] = UNSET, + department: OptionalNullable[str] = UNSET, + department_id: OptionalNullable[str] = UNSET, + department_name: OptionalNullable[str] = UNSET, + team: OptionalNullable[Union[models.Team, models.TeamTypedDict]] = UNSET, + company_id: OptionalNullable[str] = UNSET, + company_name: OptionalNullable[str] = UNSET, + employment_start_date: OptionalNullable[str] = UNSET, + employment_end_date: OptionalNullable[str] = UNSET, + leaving_reason: OptionalNullable[models.LeavingReason] = UNSET, + employee_number: OptionalNullable[str] = UNSET, + employment_status: OptionalNullable[models.EmploymentStatus] = UNSET, + employment_role: Optional[ + Union[models.EmploymentRole, models.EmploymentRoleTypedDict] + ] = None, + ethnicity: OptionalNullable[str] = UNSET, + manager: Optional[Union[models.Manager, models.ManagerTypedDict]] = None, + direct_reports: OptionalNullable[List[str]] = UNSET, + social_security_number: OptionalNullable[str] = UNSET, + birthday: OptionalNullable[date] = UNSET, + deceased_on: OptionalNullable[date] = UNSET, + country_of_birth: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + gender: OptionalNullable[models.Gender] = UNSET, + pronouns: OptionalNullable[str] = UNSET, + preferred_language: OptionalNullable[str] = UNSET, + languages: Optional[List[Nullable[str]]] = None, + nationalities: Optional[List[Nullable[str]]] = None, + photo_url: OptionalNullable[str] = UNSET, + timezone: OptionalNullable[str] = UNSET, + source: OptionalNullable[str] = UNSET, + source_id: OptionalNullable[str] = UNSET, + record_url: OptionalNullable[str] = UNSET, + jobs: OptionalNullable[ + Union[List[models.EmployeeJobInput], List[models.EmployeeJobInputTypedDict]] + ] = UNSET, + compensations: OptionalNullable[ + Union[ + List[models.EmployeeCompensationInput], + List[models.EmployeeCompensationInputTypedDict], + ] + ] = UNSET, + works_remote: OptionalNullable[bool] = UNSET, + addresses: Optional[ + Union[List[models.Address], List[models.AddressTypedDict]] + ] = None, + phone_numbers: Optional[ + Union[List[models.PhoneNumber], List[models.PhoneNumberTypedDict]] + ] = None, + emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + social_links: Optional[ + Union[List[models.SocialLink], List[models.SocialLinkTypedDict]] + ] = None, + bank_accounts: Optional[ + Union[List[models.BankAccount2], List[models.BankAccount2TypedDict]] + ] = None, + tax_code: OptionalNullable[str] = UNSET, + tax_id: OptionalNullable[str] = UNSET, + dietary_preference: OptionalNullable[str] = UNSET, + food_allergies: OptionalNullable[List[str]] = UNSET, + probation_period: Optional[ + Union[models.ProbationPeriod, models.ProbationPeriodTypedDict] + ] = None, + tags: OptionalNullable[List[str]] = UNSET, + row_version: OptionalNullable[str] = UNSET, + deleted: OptionalNullable[bool] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.HrisEmployeesUpdateResponse: + r"""Update Employee + + Update Employee + + :param id_param: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param id: A unique identifier for an object. + :param first_name: The first name of the person. + :param last_name: The last name of the person. + :param middle_name: Middle name of the person. + :param display_name: The name used to display the employee, often a combination of their first and last names. + :param preferred_name: The name the employee prefers to be addressed by, which may be different from their legal name. + :param initials: The initials of the person, usually derived from their first, middle, and last names. + :param salutation: A formal salutation for the person. For example, 'Mr', 'Mrs' + :param title: The job title of the person. + :param marital_status: The marital status of the employee. + :param partner: + :param division: The division the person is currently in. Usually a collection of departments or teams or regions. + :param division_id: Unique identifier of the division this employee belongs to. + :param department: The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. + :param department_id: Unique identifier of the department ID this employee belongs to. + :param department_name: Name of the department this employee belongs to. + :param team: The team the person is currently in. + :param company_id: The unique identifier of the company. + :param company_name: The name of the company. + :param employment_start_date: A Start Date is the date that the employee started working at the company + :param employment_end_date: An End Date is the date that the employee ended working at the company + :param leaving_reason: The reason because the employment ended. + :param employee_number: An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. + :param employment_status: The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. + :param employment_role: + :param ethnicity: The ethnicity of the employee + :param manager: + :param direct_reports: Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. + :param social_security_number: A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. + :param birthday: The date of birth of the person. + :param deceased_on: The date the person deceased. + :param country_of_birth: Country code according to ISO 3166-1 alpha-2. + :param description: A description of the object. + :param gender: The gender represents the gender identity of a person. + :param pronouns: The preferred pronouns of the person. + :param preferred_language: language code according to ISO 639-1. For the United States - EN + :param languages: + :param nationalities: + :param photo_url: The URL of the photo of a person. + :param timezone: The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. + :param source: When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. + :param source_id: Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). + :param record_url: + :param jobs: + :param compensations: + :param works_remote: Indicates if the employee works from a remote location. + :param addresses: + :param phone_numbers: + :param emails: + :param custom_fields: + :param social_links: + :param bank_accounts: + :param tax_code: + :param tax_id: + :param dietary_preference: Indicate the employee's dietary preference. + :param food_allergies: Indicate the employee's food allergies. + :param probation_period: + :param tags: + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param deleted: Flag to indicate if the object is deleted. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.HrisEmployeesUpdateRequest( + id_param=id_param, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + employee=models.EmployeeInput( + id=id, + first_name=first_name, + last_name=last_name, + middle_name=middle_name, + display_name=display_name, + preferred_name=preferred_name, + initials=initials, + salutation=salutation, + title=title, + marital_status=marital_status, + partner=utils.get_pydantic_model(partner, Optional[models.PersonInput]), + division=division, + division_id=division_id, + department=department, + department_id=department_id, + department_name=department_name, + team=utils.get_pydantic_model(team, OptionalNullable[models.Team]), + company_id=company_id, + company_name=company_name, + employment_start_date=employment_start_date, + employment_end_date=employment_end_date, + leaving_reason=leaving_reason, + employee_number=employee_number, + employment_status=employment_status, + employment_role=utils.get_pydantic_model( + employment_role, Optional[models.EmploymentRole] + ), + ethnicity=ethnicity, + manager=utils.get_pydantic_model(manager, Optional[models.Manager]), + direct_reports=direct_reports, + social_security_number=social_security_number, + birthday=birthday, + deceased_on=deceased_on, + country_of_birth=country_of_birth, + description=description, + gender=gender, + pronouns=pronouns, + preferred_language=preferred_language, + languages=languages, + nationalities=nationalities, + photo_url=photo_url, + timezone=timezone, + source=source, + source_id=source_id, + record_url=record_url, + jobs=utils.get_pydantic_model( + jobs, OptionalNullable[List[models.EmployeeJobInput]] + ), + compensations=utils.get_pydantic_model( + compensations, + OptionalNullable[List[models.EmployeeCompensationInput]], + ), + works_remote=works_remote, + addresses=utils.get_pydantic_model( + addresses, Optional[List[models.Address]] + ), + phone_numbers=utils.get_pydantic_model( + phone_numbers, Optional[List[models.PhoneNumber]] + ), + emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + social_links=utils.get_pydantic_model( + social_links, Optional[List[models.SocialLink]] + ), + bank_accounts=utils.get_pydantic_model( + bank_accounts, Optional[List[models.BankAccount2]] + ), + tax_code=tax_code, + tax_id=tax_id, + dietary_preference=dietary_preference, + food_allergies=food_allergies, + probation_period=utils.get_pydantic_model( + probation_period, Optional[models.ProbationPeriod] + ), + tags=tags, + row_version=row_version, + deleted=deleted, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request( + method="PATCH", + path="/hris/employees/{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, + _globals=models.HrisEmployeesUpdateGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.employee, False, False, "json", models.EmployeeInput + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="hris.employeesUpdate", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.HrisEmployeesUpdateResponse( + update_employee_response=unmarshal_json_response( + Optional[models.UpdateEmployeeResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.HrisEmployeesUpdateResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def update_async( + self, + *, + id_param: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + id: OptionalNullable[str] = UNSET, + first_name: OptionalNullable[str] = UNSET, + last_name: OptionalNullable[str] = UNSET, + middle_name: OptionalNullable[str] = UNSET, + display_name: OptionalNullable[str] = UNSET, + preferred_name: OptionalNullable[str] = UNSET, + initials: OptionalNullable[str] = UNSET, + salutation: OptionalNullable[str] = UNSET, + title: OptionalNullable[str] = UNSET, + marital_status: OptionalNullable[str] = UNSET, + partner: Optional[ + Union[models.PersonInput, models.PersonInputTypedDict] + ] = None, + division: OptionalNullable[str] = UNSET, + division_id: OptionalNullable[str] = UNSET, + department: OptionalNullable[str] = UNSET, + department_id: OptionalNullable[str] = UNSET, + department_name: OptionalNullable[str] = UNSET, + team: OptionalNullable[Union[models.Team, models.TeamTypedDict]] = UNSET, + company_id: OptionalNullable[str] = UNSET, + company_name: OptionalNullable[str] = UNSET, + employment_start_date: OptionalNullable[str] = UNSET, + employment_end_date: OptionalNullable[str] = UNSET, + leaving_reason: OptionalNullable[models.LeavingReason] = UNSET, + employee_number: OptionalNullable[str] = UNSET, + employment_status: OptionalNullable[models.EmploymentStatus] = UNSET, + employment_role: Optional[ + Union[models.EmploymentRole, models.EmploymentRoleTypedDict] + ] = None, + ethnicity: OptionalNullable[str] = UNSET, + manager: Optional[Union[models.Manager, models.ManagerTypedDict]] = None, + direct_reports: OptionalNullable[List[str]] = UNSET, + social_security_number: OptionalNullable[str] = UNSET, + birthday: OptionalNullable[date] = UNSET, + deceased_on: OptionalNullable[date] = UNSET, + country_of_birth: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + gender: OptionalNullable[models.Gender] = UNSET, + pronouns: OptionalNullable[str] = UNSET, + preferred_language: OptionalNullable[str] = UNSET, + languages: Optional[List[Nullable[str]]] = None, + nationalities: Optional[List[Nullable[str]]] = None, + photo_url: OptionalNullable[str] = UNSET, + timezone: OptionalNullable[str] = UNSET, + source: OptionalNullable[str] = UNSET, + source_id: OptionalNullable[str] = UNSET, + record_url: OptionalNullable[str] = UNSET, + jobs: OptionalNullable[ + Union[List[models.EmployeeJobInput], List[models.EmployeeJobInputTypedDict]] + ] = UNSET, + compensations: OptionalNullable[ + Union[ + List[models.EmployeeCompensationInput], + List[models.EmployeeCompensationInputTypedDict], + ] + ] = UNSET, + works_remote: OptionalNullable[bool] = UNSET, + addresses: Optional[ + Union[List[models.Address], List[models.AddressTypedDict]] + ] = None, + phone_numbers: Optional[ + Union[List[models.PhoneNumber], List[models.PhoneNumberTypedDict]] + ] = None, + emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + social_links: Optional[ + Union[List[models.SocialLink], List[models.SocialLinkTypedDict]] + ] = None, + bank_accounts: Optional[ + Union[List[models.BankAccount2], List[models.BankAccount2TypedDict]] + ] = None, + tax_code: OptionalNullable[str] = UNSET, + tax_id: OptionalNullable[str] = UNSET, + dietary_preference: OptionalNullable[str] = UNSET, + food_allergies: OptionalNullable[List[str]] = UNSET, + probation_period: Optional[ + Union[models.ProbationPeriod, models.ProbationPeriodTypedDict] + ] = None, + tags: OptionalNullable[List[str]] = UNSET, + row_version: OptionalNullable[str] = UNSET, + deleted: OptionalNullable[bool] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.HrisEmployeesUpdateResponse: + r"""Update Employee + + Update Employee + + :param id_param: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param id: A unique identifier for an object. + :param first_name: The first name of the person. + :param last_name: The last name of the person. + :param middle_name: Middle name of the person. + :param display_name: The name used to display the employee, often a combination of their first and last names. + :param preferred_name: The name the employee prefers to be addressed by, which may be different from their legal name. + :param initials: The initials of the person, usually derived from their first, middle, and last names. + :param salutation: A formal salutation for the person. For example, 'Mr', 'Mrs' + :param title: The job title of the person. + :param marital_status: The marital status of the employee. + :param partner: + :param division: The division the person is currently in. Usually a collection of departments or teams or regions. + :param division_id: Unique identifier of the division this employee belongs to. + :param department: The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. + :param department_id: Unique identifier of the department ID this employee belongs to. + :param department_name: Name of the department this employee belongs to. + :param team: The team the person is currently in. + :param company_id: The unique identifier of the company. + :param company_name: The name of the company. + :param employment_start_date: A Start Date is the date that the employee started working at the company + :param employment_end_date: An End Date is the date that the employee ended working at the company + :param leaving_reason: The reason because the employment ended. + :param employee_number: An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. + :param employment_status: The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. + :param employment_role: + :param ethnicity: The ethnicity of the employee + :param manager: + :param direct_reports: Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. + :param social_security_number: A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. + :param birthday: The date of birth of the person. + :param deceased_on: The date the person deceased. + :param country_of_birth: Country code according to ISO 3166-1 alpha-2. + :param description: A description of the object. + :param gender: The gender represents the gender identity of a person. + :param pronouns: The preferred pronouns of the person. + :param preferred_language: language code according to ISO 639-1. For the United States - EN + :param languages: + :param nationalities: + :param photo_url: The URL of the photo of a person. + :param timezone: The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. + :param source: When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. + :param source_id: Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). + :param record_url: + :param jobs: + :param compensations: + :param works_remote: Indicates if the employee works from a remote location. + :param addresses: + :param phone_numbers: + :param emails: + :param custom_fields: + :param social_links: + :param bank_accounts: + :param tax_code: + :param tax_id: + :param dietary_preference: Indicate the employee's dietary preference. + :param food_allergies: Indicate the employee's food allergies. + :param probation_period: + :param tags: + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param deleted: Flag to indicate if the object is deleted. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.HrisEmployeesUpdateRequest( + id_param=id_param, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + employee=models.EmployeeInput( + id=id, + first_name=first_name, + last_name=last_name, + middle_name=middle_name, + display_name=display_name, + preferred_name=preferred_name, + initials=initials, + salutation=salutation, + title=title, + marital_status=marital_status, + partner=utils.get_pydantic_model(partner, Optional[models.PersonInput]), + division=division, + division_id=division_id, + department=department, + department_id=department_id, + department_name=department_name, + team=utils.get_pydantic_model(team, OptionalNullable[models.Team]), + company_id=company_id, + company_name=company_name, + employment_start_date=employment_start_date, + employment_end_date=employment_end_date, + leaving_reason=leaving_reason, + employee_number=employee_number, + employment_status=employment_status, + employment_role=utils.get_pydantic_model( + employment_role, Optional[models.EmploymentRole] + ), + ethnicity=ethnicity, + manager=utils.get_pydantic_model(manager, Optional[models.Manager]), + direct_reports=direct_reports, + social_security_number=social_security_number, + birthday=birthday, + deceased_on=deceased_on, + country_of_birth=country_of_birth, + description=description, + gender=gender, + pronouns=pronouns, + preferred_language=preferred_language, + languages=languages, + nationalities=nationalities, + photo_url=photo_url, + timezone=timezone, + source=source, + source_id=source_id, + record_url=record_url, + jobs=utils.get_pydantic_model( + jobs, OptionalNullable[List[models.EmployeeJobInput]] + ), + compensations=utils.get_pydantic_model( + compensations, + OptionalNullable[List[models.EmployeeCompensationInput]], + ), + works_remote=works_remote, + addresses=utils.get_pydantic_model( + addresses, Optional[List[models.Address]] + ), + phone_numbers=utils.get_pydantic_model( + phone_numbers, Optional[List[models.PhoneNumber]] + ), + emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + social_links=utils.get_pydantic_model( + social_links, Optional[List[models.SocialLink]] + ), + bank_accounts=utils.get_pydantic_model( + bank_accounts, Optional[List[models.BankAccount2]] + ), + tax_code=tax_code, + tax_id=tax_id, + dietary_preference=dietary_preference, + food_allergies=food_allergies, + probation_period=utils.get_pydantic_model( + probation_period, Optional[models.ProbationPeriod] + ), + tags=tags, + row_version=row_version, + deleted=deleted, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/hris/employees/{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, + _globals=models.HrisEmployeesUpdateGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.employee, False, False, "json", models.EmployeeInput + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="hris.employeesUpdate", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.HrisEmployeesUpdateResponse( + update_employee_response=unmarshal_json_response( + Optional[models.UpdateEmployeeResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.HrisEmployeesUpdateResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + def delete( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.HrisEmployeesDeleteResponse: + r"""Delete Employee + + Delete Employee + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :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.HrisEmployeesDeleteRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + ) + + req = self._build_request( + method="DELETE", + path="/hris/employees/{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, + _globals=models.HrisEmployeesDeleteGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="hris.employeesDelete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.HrisEmployeesDeleteResponse( + delete_employee_response=unmarshal_json_response( + Optional[models.DeleteEmployeeResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.HrisEmployeesDeleteResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.HrisEmployeesDeleteResponse: + r"""Delete Employee + + Delete Employee + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :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.HrisEmployeesDeleteRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + ) + + req = self._build_request_async( + method="DELETE", + path="/hris/employees/{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, + _globals=models.HrisEmployeesDeleteGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="hris.employeesDelete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.HrisEmployeesDeleteResponse( + delete_employee_response=unmarshal_json_response( + Optional[models.DeleteEmployeeResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.HrisEmployeesDeleteResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) diff --git a/src/apideck_unify/employees.py b/src/apideck_unify/employees.py index 738c90c2..080960b2 100644 --- a/src/apideck_unify/employees.py +++ b/src/apideck_unify/employees.py @@ -21,22 +21,21 @@ def list( service_id: Optional[str] = None, cursor: OptionalNullable[str] = UNSET, limit: Optional[int] = 20, + fields: OptionalNullable[str] = UNSET, filter_: Optional[ - Union[models.EmployeesFilter, models.EmployeesFilterTypedDict] - ] = None, - sort: Optional[ - Union[models.EmployeesSort, models.EmployeesSortTypedDict] + Union[ + models.AccountingEmployeesFilter, + models.AccountingEmployeesFilterTypedDict, + ] ] = None, - pass_through: Optional[Dict[str, Any]] = None, - fields: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.HrisEmployeesAllResponse]: + ) -> Optional[models.AccountingEmployeesAllResponse]: r"""List Employees - Apideck operates as a stateless Unified API, which means that the list endpoint only provides a portion of the employee model. This is due to the fact that most HRIS systems do not readily provide all data in every call. However, you can access the complete employee model through an employee detail call. + List Employees :param raw: Include raw response. Mostly used for debugging purposes :param consumer_id: ID of the consumer which you want to get or push data from @@ -44,10 +43,8 @@ def list( :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 - :param filter_: Apply filters - :param sort: Apply sorting - :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param filter_: Apply filters :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 @@ -63,22 +60,22 @@ def list( else: base_url = self._get_url(base_url, url_variables) - request = models.HrisEmployeesAllRequest( + request = models.AccountingEmployeesAllRequest( raw=raw, consumer_id=consumer_id, app_id=app_id, service_id=service_id, cursor=cursor, limit=limit, - filter_=utils.get_pydantic_model(filter_, Optional[models.EmployeesFilter]), - sort=utils.get_pydantic_model(sort, Optional[models.EmployeesSort]), - pass_through=pass_through, fields=fields, + filter_=utils.get_pydantic_model( + filter_, Optional[models.AccountingEmployeesFilter] + ), ) req = self._build_request( method="GET", - path="/hris/employees", + path="/accounting/employees", base_url=base_url, url_variables=url_variables, request=request, @@ -88,7 +85,7 @@ def list( user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, - _globals=models.HrisEmployeesAllGlobals( + _globals=models.AccountingEmployeesAllGlobals( consumer_id=self.sdk_configuration.globals.consumer_id, app_id=self.sdk_configuration.globals.app_id, ), @@ -112,7 +109,7 @@ def list( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="hris.employeesAll", + operation_id="accounting.employeesAll", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -123,7 +120,7 @@ def list( retry_config=retry_config, ) - def next_func() -> Optional[models.HrisEmployeesAllResponse]: + def next_func() -> Optional[models.AccountingEmployeesAllResponse]: body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) next_cursor = JSONPath("$.meta.cursors.next").parse(body) @@ -141,18 +138,16 @@ def next_func() -> Optional[models.HrisEmployeesAllResponse]: service_id=service_id, cursor=next_cursor, limit=limit, - filter_=filter_, - sort=sort, - pass_through=pass_through, fields=fields, + filter_=filter_, retries=retries, ) response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return models.HrisEmployeesAllResponse( - get_employees_response=unmarshal_json_response( - Optional[models.GetEmployeesResponse], http_res + return models.AccountingEmployeesAllResponse( + get_accounting_employees_response=unmarshal_json_response( + Optional[models.GetAccountingEmployeesResponse], http_res ), http_meta=models.HTTPMetadata(request=req, response=http_res), next=next_func, @@ -189,7 +184,7 @@ def next_func() -> Optional[models.HrisEmployeesAllResponse]: 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, "default", "application/json"): - return models.HrisEmployeesAllResponse( + return models.AccountingEmployeesAllResponse( unexpected_error_response=unmarshal_json_response( Optional[models.UnexpectedErrorResponse], http_res ), @@ -208,22 +203,21 @@ async def list_async( service_id: Optional[str] = None, cursor: OptionalNullable[str] = UNSET, limit: Optional[int] = 20, + fields: OptionalNullable[str] = UNSET, filter_: Optional[ - Union[models.EmployeesFilter, models.EmployeesFilterTypedDict] - ] = None, - sort: Optional[ - Union[models.EmployeesSort, models.EmployeesSortTypedDict] + Union[ + models.AccountingEmployeesFilter, + models.AccountingEmployeesFilterTypedDict, + ] ] = None, - pass_through: Optional[Dict[str, Any]] = None, - fields: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.HrisEmployeesAllResponse]: + ) -> Optional[models.AccountingEmployeesAllResponse]: r"""List Employees - Apideck operates as a stateless Unified API, which means that the list endpoint only provides a portion of the employee model. This is due to the fact that most HRIS systems do not readily provide all data in every call. However, you can access the complete employee model through an employee detail call. + List Employees :param raw: Include raw response. Mostly used for debugging purposes :param consumer_id: ID of the consumer which you want to get or push data from @@ -231,10 +225,8 @@ async def list_async( :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 - :param filter_: Apply filters - :param sort: Apply sorting - :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param filter_: Apply filters :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 @@ -250,22 +242,22 @@ async def list_async( else: base_url = self._get_url(base_url, url_variables) - request = models.HrisEmployeesAllRequest( + request = models.AccountingEmployeesAllRequest( raw=raw, consumer_id=consumer_id, app_id=app_id, service_id=service_id, cursor=cursor, limit=limit, - filter_=utils.get_pydantic_model(filter_, Optional[models.EmployeesFilter]), - sort=utils.get_pydantic_model(sort, Optional[models.EmployeesSort]), - pass_through=pass_through, fields=fields, + filter_=utils.get_pydantic_model( + filter_, Optional[models.AccountingEmployeesFilter] + ), ) req = self._build_request_async( method="GET", - path="/hris/employees", + path="/accounting/employees", base_url=base_url, url_variables=url_variables, request=request, @@ -275,7 +267,7 @@ async def list_async( user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, - _globals=models.HrisEmployeesAllGlobals( + _globals=models.AccountingEmployeesAllGlobals( consumer_id=self.sdk_configuration.globals.consumer_id, app_id=self.sdk_configuration.globals.app_id, ), @@ -299,7 +291,7 @@ async def list_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="hris.employeesAll", + operation_id="accounting.employeesAll", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -310,7 +302,7 @@ async def list_async( retry_config=retry_config, ) - def next_func() -> Optional[models.HrisEmployeesAllResponse]: + def next_func() -> Optional[models.AccountingEmployeesAllResponse]: body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) next_cursor = JSONPath("$.meta.cursors.next").parse(body) @@ -328,18 +320,16 @@ def next_func() -> Optional[models.HrisEmployeesAllResponse]: service_id=service_id, cursor=next_cursor, limit=limit, - filter_=filter_, - sort=sort, - pass_through=pass_through, fields=fields, + filter_=filter_, retries=retries, ) response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return models.HrisEmployeesAllResponse( - get_employees_response=unmarshal_json_response( - Optional[models.GetEmployeesResponse], http_res + return models.AccountingEmployeesAllResponse( + get_accounting_employees_response=unmarshal_json_response( + Optional[models.GetAccountingEmployeesResponse], http_res ), http_meta=models.HTTPMetadata(request=req, response=http_res), next=next_func, @@ -376,7 +366,7 @@ def next_func() -> Optional[models.HrisEmployeesAllResponse]: 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, "default", "application/json"): - return models.HrisEmployeesAllResponse( + return models.AccountingEmployeesAllResponse( unexpected_error_response=unmarshal_json_response( Optional[models.UnexpectedErrorResponse], http_res ), @@ -393,89 +383,52 @@ def create( consumer_id: Optional[str] = None, app_id: Optional[str] = None, service_id: Optional[str] = None, - id: OptionalNullable[str] = UNSET, + display_id: OptionalNullable[str] = UNSET, first_name: OptionalNullable[str] = UNSET, last_name: OptionalNullable[str] = UNSET, - middle_name: OptionalNullable[str] = UNSET, display_name: OptionalNullable[str] = UNSET, - preferred_name: OptionalNullable[str] = UNSET, - initials: OptionalNullable[str] = UNSET, - salutation: OptionalNullable[str] = UNSET, - title: OptionalNullable[str] = UNSET, - marital_status: OptionalNullable[str] = UNSET, - partner: Optional[ - Union[models.PersonInput, models.PersonInputTypedDict] - ] = None, - division: OptionalNullable[str] = UNSET, - division_id: OptionalNullable[str] = UNSET, - department: OptionalNullable[str] = UNSET, - department_id: OptionalNullable[str] = UNSET, - department_name: OptionalNullable[str] = UNSET, - team: OptionalNullable[Union[models.Team, models.TeamTypedDict]] = UNSET, - company_id: OptionalNullable[str] = UNSET, - company_name: OptionalNullable[str] = UNSET, - employment_start_date: OptionalNullable[str] = UNSET, - employment_end_date: OptionalNullable[str] = UNSET, - leaving_reason: OptionalNullable[models.LeavingReason] = UNSET, + emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, employee_number: OptionalNullable[str] = UNSET, - employment_status: OptionalNullable[models.EmploymentStatus] = UNSET, - employment_role: Optional[ - Union[models.EmploymentRole, models.EmploymentRoleTypedDict] + job_title: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.EmployeeStatus] = UNSET, + is_contractor: OptionalNullable[bool] = UNSET, + department: OptionalNullable[ + Union[models.LinkedDepartmentInput, models.LinkedDepartmentInputTypedDict] + ] = UNSET, + location: OptionalNullable[ + Union[models.LinkedLocationInput, models.LinkedLocationInputTypedDict] + ] = UNSET, + manager: Optional[ + Union[ + models.AccountingEmployeeManager, + models.AccountingEmployeeManagerTypedDict, + ] ] = None, - ethnicity: OptionalNullable[str] = UNSET, - manager: Optional[Union[models.Manager, models.ManagerTypedDict]] = None, - direct_reports: OptionalNullable[List[str]] = UNSET, - social_security_number: OptionalNullable[str] = UNSET, - birthday: OptionalNullable[date] = UNSET, - deceased_on: OptionalNullable[date] = UNSET, - country_of_birth: OptionalNullable[str] = UNSET, - description: OptionalNullable[str] = UNSET, + hire_date: OptionalNullable[date] = UNSET, + termination_date: OptionalNullable[date] = UNSET, gender: OptionalNullable[models.Gender] = UNSET, - pronouns: OptionalNullable[str] = UNSET, - preferred_language: OptionalNullable[str] = UNSET, - languages: Optional[List[Nullable[str]]] = None, - nationalities: Optional[List[Nullable[str]]] = None, - photo_url: OptionalNullable[str] = UNSET, - timezone: OptionalNullable[str] = UNSET, - source: OptionalNullable[str] = UNSET, - source_id: OptionalNullable[str] = UNSET, - record_url: OptionalNullable[str] = UNSET, - jobs: OptionalNullable[ - Union[List[models.EmployeeJobInput], List[models.EmployeeJobInputTypedDict]] + birth_date: OptionalNullable[date] = UNSET, + subsidiary: OptionalNullable[ + Union[models.LinkedSubsidiaryInput, models.LinkedSubsidiaryInputTypedDict] ] = UNSET, - compensations: OptionalNullable[ + tracking_categories: OptionalNullable[ Union[ - List[models.EmployeeCompensationInput], - List[models.EmployeeCompensationInputTypedDict], + List[Nullable[models.LinkedTrackingCategory]], + List[Nullable[models.LinkedTrackingCategoryTypedDict]], ] ] = UNSET, - works_remote: OptionalNullable[bool] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + notes: OptionalNullable[str] = UNSET, addresses: Optional[ Union[List[models.Address], List[models.AddressTypedDict]] ] = None, phone_numbers: Optional[ Union[List[models.PhoneNumber], List[models.PhoneNumberTypedDict]] ] = None, - emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, custom_fields: Optional[ Union[List[models.CustomField], List[models.CustomFieldTypedDict]] ] = None, - social_links: Optional[ - Union[List[models.SocialLink], List[models.SocialLinkTypedDict]] - ] = None, - bank_accounts: Optional[ - Union[List[models.BankAccount2], List[models.BankAccount2TypedDict]] - ] = None, - tax_code: OptionalNullable[str] = UNSET, - tax_id: OptionalNullable[str] = UNSET, - dietary_preference: OptionalNullable[str] = UNSET, - food_allergies: OptionalNullable[List[str]] = UNSET, - probation_period: Optional[ - Union[models.ProbationPeriod, models.ProbationPeriodTypedDict] - ] = None, - tags: OptionalNullable[List[str]] = UNSET, row_version: OptionalNullable[str] = UNSET, - deleted: OptionalNullable[bool] = UNSET, pass_through: Optional[ Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] ] = None, @@ -483,7 +436,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.HrisEmployeesAddResponse: + ) -> models.AccountingEmployeesAddResponse: r"""Create Employee Create Employee @@ -492,66 +445,30 @@ def create( :param consumer_id: ID of the consumer which you want to get or push data from :param app_id: The ID of your Unify application :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. - :param id: A unique identifier for an object. - :param first_name: The first name of the person. - :param last_name: The last name of the person. - :param middle_name: Middle name of the person. - :param display_name: The name used to display the employee, often a combination of their first and last names. - :param preferred_name: The name the employee prefers to be addressed by, which may be different from their legal name. - :param initials: The initials of the person, usually derived from their first, middle, and last names. - :param salutation: A formal salutation for the person. For example, 'Mr', 'Mrs' - :param title: The job title of the person. - :param marital_status: The marital status of the employee. - :param partner: - :param division: The division the person is currently in. Usually a collection of departments or teams or regions. - :param division_id: Unique identifier of the division this employee belongs to. - :param department: The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. - :param department_id: Unique identifier of the department ID this employee belongs to. - :param department_name: Name of the department this employee belongs to. - :param team: The team the person is currently in. - :param company_id: The unique identifier of the company. - :param company_name: The name of the company. - :param employment_start_date: A Start Date is the date that the employee started working at the company - :param employment_end_date: An End Date is the date that the employee ended working at the company - :param leaving_reason: The reason because the employment ended. - :param employee_number: An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. - :param employment_status: The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. - :param employment_role: - :param ethnicity: The ethnicity of the employee - :param manager: - :param direct_reports: Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. - :param social_security_number: A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. - :param birthday: The date of birth of the person. - :param deceased_on: The date the person deceased. - :param country_of_birth: Country code according to ISO 3166-1 alpha-2. - :param description: A description of the object. + :param display_id: Id to be displayed. + :param first_name: The first name of the employee. + :param last_name: The last name of the employee. + :param display_name: The display name of the employee. + :param emails: Email addresses of the employee. + :param employee_number: The employee number or identifier. + :param job_title: The job title of the employee. + :param status: The status of the employee. + :param is_contractor: Whether the employee is a contractor. + :param department: + :param location: + :param manager: The manager of the employee. + :param hire_date: The date the employee was hired. + :param termination_date: The date the employee was terminated. :param gender: The gender represents the gender identity of a person. - :param pronouns: The preferred pronouns of the person. - :param preferred_language: language code according to ISO 639-1. For the United States - EN - :param languages: - :param nationalities: - :param photo_url: The URL of the photo of a person. - :param timezone: The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. - :param source: When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. - :param source_id: Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). - :param record_url: - :param jobs: - :param compensations: - :param works_remote: Indicates if the employee works from a remote location. - :param addresses: - :param phone_numbers: - :param emails: + :param birth_date: The date of birth of the employee. + :param subsidiary: + :param tracking_categories: A list of linked tracking categories. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param notes: Notes about the employee. + :param addresses: Addresses of the employee. + :param phone_numbers: Phone numbers of the employee. :param custom_fields: - :param social_links: - :param bank_accounts: - :param tax_code: - :param tax_id: - :param dietary_preference: Indicate the employee's dietary preference. - :param food_allergies: Indicate the employee's food allergies. - :param probation_period: - :param tags: :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. - :param deleted: Flag to indicate if the object is deleted. :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -568,91 +485,53 @@ def create( else: base_url = self._get_url(base_url, url_variables) - request = models.HrisEmployeesAddRequest( + request = models.AccountingEmployeesAddRequest( raw=raw, consumer_id=consumer_id, app_id=app_id, service_id=service_id, - employee=models.EmployeeInput( - id=id, + accounting_employee=models.AccountingEmployeeInput( + display_id=display_id, first_name=first_name, last_name=last_name, - middle_name=middle_name, display_name=display_name, - preferred_name=preferred_name, - initials=initials, - salutation=salutation, - title=title, - marital_status=marital_status, - partner=utils.get_pydantic_model(partner, Optional[models.PersonInput]), - division=division, - division_id=division_id, - department=department, - department_id=department_id, - department_name=department_name, - team=utils.get_pydantic_model(team, OptionalNullable[models.Team]), - company_id=company_id, - company_name=company_name, - employment_start_date=employment_start_date, - employment_end_date=employment_end_date, - leaving_reason=leaving_reason, + emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), employee_number=employee_number, - employment_status=employment_status, - employment_role=utils.get_pydantic_model( - employment_role, Optional[models.EmploymentRole] - ), - ethnicity=ethnicity, - manager=utils.get_pydantic_model(manager, Optional[models.Manager]), - direct_reports=direct_reports, - social_security_number=social_security_number, - birthday=birthday, - deceased_on=deceased_on, - country_of_birth=country_of_birth, - description=description, + job_title=job_title, + status=status, + is_contractor=is_contractor, + department=utils.get_pydantic_model( + department, OptionalNullable[models.LinkedDepartmentInput] + ), + location=utils.get_pydantic_model( + location, OptionalNullable[models.LinkedLocationInput] + ), + manager=utils.get_pydantic_model( + manager, Optional[models.AccountingEmployeeManager] + ), + hire_date=hire_date, + termination_date=termination_date, gender=gender, - pronouns=pronouns, - preferred_language=preferred_language, - languages=languages, - nationalities=nationalities, - photo_url=photo_url, - timezone=timezone, - source=source, - source_id=source_id, - record_url=record_url, - jobs=utils.get_pydantic_model( - jobs, OptionalNullable[List[models.EmployeeJobInput]] - ), - compensations=utils.get_pydantic_model( - compensations, - OptionalNullable[List[models.EmployeeCompensationInput]], - ), - works_remote=works_remote, + birth_date=birth_date, + subsidiary=utils.get_pydantic_model( + subsidiary, OptionalNullable[models.LinkedSubsidiaryInput] + ), + tracking_categories=utils.get_pydantic_model( + tracking_categories, + OptionalNullable[List[Nullable[models.LinkedTrackingCategory]]], + ), + currency=currency, + notes=notes, addresses=utils.get_pydantic_model( addresses, Optional[List[models.Address]] ), phone_numbers=utils.get_pydantic_model( phone_numbers, Optional[List[models.PhoneNumber]] ), - emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), custom_fields=utils.get_pydantic_model( custom_fields, Optional[List[models.CustomField]] ), - social_links=utils.get_pydantic_model( - social_links, Optional[List[models.SocialLink]] - ), - bank_accounts=utils.get_pydantic_model( - bank_accounts, Optional[List[models.BankAccount2]] - ), - tax_code=tax_code, - tax_id=tax_id, - dietary_preference=dietary_preference, - food_allergies=food_allergies, - probation_period=utils.get_pydantic_model( - probation_period, Optional[models.ProbationPeriod] - ), - tags=tags, row_version=row_version, - deleted=deleted, pass_through=utils.get_pydantic_model( pass_through, Optional[List[models.PassThroughBody]] ), @@ -661,7 +540,7 @@ def create( req = self._build_request( method="POST", - path="/hris/employees", + path="/accounting/employees", base_url=base_url, url_variables=url_variables, request=request, @@ -671,13 +550,17 @@ def create( user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, - _globals=models.HrisEmployeesAddGlobals( + _globals=models.AccountingEmployeesAddGlobals( consumer_id=self.sdk_configuration.globals.consumer_id, app_id=self.sdk_configuration.globals.app_id, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.employee, False, False, "json", models.EmployeeInput + request.accounting_employee, + False, + False, + "json", + models.AccountingEmployeeInput, ), timeout_ms=timeout_ms, ) @@ -698,7 +581,7 @@ def create( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="hris.employeesAdd", + operation_id="accounting.employeesAdd", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -711,9 +594,9 @@ def create( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return models.HrisEmployeesAddResponse( - create_employee_response=unmarshal_json_response( - Optional[models.CreateEmployeeResponse], http_res + return models.AccountingEmployeesAddResponse( + create_accounting_employee_response=unmarshal_json_response( + Optional[models.CreateAccountingEmployeeResponse], http_res ), http_meta=models.HTTPMetadata(request=req, response=http_res), ) @@ -749,7 +632,7 @@ def create( 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, "default", "application/json"): - return models.HrisEmployeesAddResponse( + return models.AccountingEmployeesAddResponse( unexpected_error_response=unmarshal_json_response( Optional[models.UnexpectedErrorResponse], http_res ), @@ -765,89 +648,52 @@ async def create_async( consumer_id: Optional[str] = None, app_id: Optional[str] = None, service_id: Optional[str] = None, - id: OptionalNullable[str] = UNSET, + display_id: OptionalNullable[str] = UNSET, first_name: OptionalNullable[str] = UNSET, last_name: OptionalNullable[str] = UNSET, - middle_name: OptionalNullable[str] = UNSET, display_name: OptionalNullable[str] = UNSET, - preferred_name: OptionalNullable[str] = UNSET, - initials: OptionalNullable[str] = UNSET, - salutation: OptionalNullable[str] = UNSET, - title: OptionalNullable[str] = UNSET, - marital_status: OptionalNullable[str] = UNSET, - partner: Optional[ - Union[models.PersonInput, models.PersonInputTypedDict] - ] = None, - division: OptionalNullable[str] = UNSET, - division_id: OptionalNullable[str] = UNSET, - department: OptionalNullable[str] = UNSET, - department_id: OptionalNullable[str] = UNSET, - department_name: OptionalNullable[str] = UNSET, - team: OptionalNullable[Union[models.Team, models.TeamTypedDict]] = UNSET, - company_id: OptionalNullable[str] = UNSET, - company_name: OptionalNullable[str] = UNSET, - employment_start_date: OptionalNullable[str] = UNSET, - employment_end_date: OptionalNullable[str] = UNSET, - leaving_reason: OptionalNullable[models.LeavingReason] = UNSET, + emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, employee_number: OptionalNullable[str] = UNSET, - employment_status: OptionalNullable[models.EmploymentStatus] = UNSET, - employment_role: Optional[ - Union[models.EmploymentRole, models.EmploymentRoleTypedDict] + job_title: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.EmployeeStatus] = UNSET, + is_contractor: OptionalNullable[bool] = UNSET, + department: OptionalNullable[ + Union[models.LinkedDepartmentInput, models.LinkedDepartmentInputTypedDict] + ] = UNSET, + location: OptionalNullable[ + Union[models.LinkedLocationInput, models.LinkedLocationInputTypedDict] + ] = UNSET, + manager: Optional[ + Union[ + models.AccountingEmployeeManager, + models.AccountingEmployeeManagerTypedDict, + ] ] = None, - ethnicity: OptionalNullable[str] = UNSET, - manager: Optional[Union[models.Manager, models.ManagerTypedDict]] = None, - direct_reports: OptionalNullable[List[str]] = UNSET, - social_security_number: OptionalNullable[str] = UNSET, - birthday: OptionalNullable[date] = UNSET, - deceased_on: OptionalNullable[date] = UNSET, - country_of_birth: OptionalNullable[str] = UNSET, - description: OptionalNullable[str] = UNSET, + hire_date: OptionalNullable[date] = UNSET, + termination_date: OptionalNullable[date] = UNSET, gender: OptionalNullable[models.Gender] = UNSET, - pronouns: OptionalNullable[str] = UNSET, - preferred_language: OptionalNullable[str] = UNSET, - languages: Optional[List[Nullable[str]]] = None, - nationalities: Optional[List[Nullable[str]]] = None, - photo_url: OptionalNullable[str] = UNSET, - timezone: OptionalNullable[str] = UNSET, - source: OptionalNullable[str] = UNSET, - source_id: OptionalNullable[str] = UNSET, - record_url: OptionalNullable[str] = UNSET, - jobs: OptionalNullable[ - Union[List[models.EmployeeJobInput], List[models.EmployeeJobInputTypedDict]] + birth_date: OptionalNullable[date] = UNSET, + subsidiary: OptionalNullable[ + Union[models.LinkedSubsidiaryInput, models.LinkedSubsidiaryInputTypedDict] ] = UNSET, - compensations: OptionalNullable[ + tracking_categories: OptionalNullable[ Union[ - List[models.EmployeeCompensationInput], - List[models.EmployeeCompensationInputTypedDict], + List[Nullable[models.LinkedTrackingCategory]], + List[Nullable[models.LinkedTrackingCategoryTypedDict]], ] ] = UNSET, - works_remote: OptionalNullable[bool] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + notes: OptionalNullable[str] = UNSET, addresses: Optional[ Union[List[models.Address], List[models.AddressTypedDict]] ] = None, phone_numbers: Optional[ Union[List[models.PhoneNumber], List[models.PhoneNumberTypedDict]] ] = None, - emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, custom_fields: Optional[ Union[List[models.CustomField], List[models.CustomFieldTypedDict]] ] = None, - social_links: Optional[ - Union[List[models.SocialLink], List[models.SocialLinkTypedDict]] - ] = None, - bank_accounts: Optional[ - Union[List[models.BankAccount2], List[models.BankAccount2TypedDict]] - ] = None, - tax_code: OptionalNullable[str] = UNSET, - tax_id: OptionalNullable[str] = UNSET, - dietary_preference: OptionalNullable[str] = UNSET, - food_allergies: OptionalNullable[List[str]] = UNSET, - probation_period: Optional[ - Union[models.ProbationPeriod, models.ProbationPeriodTypedDict] - ] = None, - tags: OptionalNullable[List[str]] = UNSET, row_version: OptionalNullable[str] = UNSET, - deleted: OptionalNullable[bool] = UNSET, pass_through: Optional[ Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] ] = None, @@ -855,7 +701,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.HrisEmployeesAddResponse: + ) -> models.AccountingEmployeesAddResponse: r"""Create Employee Create Employee @@ -864,66 +710,30 @@ async def create_async( :param consumer_id: ID of the consumer which you want to get or push data from :param app_id: The ID of your Unify application :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. - :param id: A unique identifier for an object. - :param first_name: The first name of the person. - :param last_name: The last name of the person. - :param middle_name: Middle name of the person. - :param display_name: The name used to display the employee, often a combination of their first and last names. - :param preferred_name: The name the employee prefers to be addressed by, which may be different from their legal name. - :param initials: The initials of the person, usually derived from their first, middle, and last names. - :param salutation: A formal salutation for the person. For example, 'Mr', 'Mrs' - :param title: The job title of the person. - :param marital_status: The marital status of the employee. - :param partner: - :param division: The division the person is currently in. Usually a collection of departments or teams or regions. - :param division_id: Unique identifier of the division this employee belongs to. - :param department: The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. - :param department_id: Unique identifier of the department ID this employee belongs to. - :param department_name: Name of the department this employee belongs to. - :param team: The team the person is currently in. - :param company_id: The unique identifier of the company. - :param company_name: The name of the company. - :param employment_start_date: A Start Date is the date that the employee started working at the company - :param employment_end_date: An End Date is the date that the employee ended working at the company - :param leaving_reason: The reason because the employment ended. - :param employee_number: An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. - :param employment_status: The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. - :param employment_role: - :param ethnicity: The ethnicity of the employee - :param manager: - :param direct_reports: Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. - :param social_security_number: A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. - :param birthday: The date of birth of the person. - :param deceased_on: The date the person deceased. - :param country_of_birth: Country code according to ISO 3166-1 alpha-2. - :param description: A description of the object. + :param display_id: Id to be displayed. + :param first_name: The first name of the employee. + :param last_name: The last name of the employee. + :param display_name: The display name of the employee. + :param emails: Email addresses of the employee. + :param employee_number: The employee number or identifier. + :param job_title: The job title of the employee. + :param status: The status of the employee. + :param is_contractor: Whether the employee is a contractor. + :param department: + :param location: + :param manager: The manager of the employee. + :param hire_date: The date the employee was hired. + :param termination_date: The date the employee was terminated. :param gender: The gender represents the gender identity of a person. - :param pronouns: The preferred pronouns of the person. - :param preferred_language: language code according to ISO 639-1. For the United States - EN - :param languages: - :param nationalities: - :param photo_url: The URL of the photo of a person. - :param timezone: The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. - :param source: When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. - :param source_id: Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). - :param record_url: - :param jobs: - :param compensations: - :param works_remote: Indicates if the employee works from a remote location. - :param addresses: - :param phone_numbers: - :param emails: + :param birth_date: The date of birth of the employee. + :param subsidiary: + :param tracking_categories: A list of linked tracking categories. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param notes: Notes about the employee. + :param addresses: Addresses of the employee. + :param phone_numbers: Phone numbers of the employee. :param custom_fields: - :param social_links: - :param bank_accounts: - :param tax_code: - :param tax_id: - :param dietary_preference: Indicate the employee's dietary preference. - :param food_allergies: Indicate the employee's food allergies. - :param probation_period: - :param tags: :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. - :param deleted: Flag to indicate if the object is deleted. :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -940,91 +750,53 @@ async def create_async( else: base_url = self._get_url(base_url, url_variables) - request = models.HrisEmployeesAddRequest( + request = models.AccountingEmployeesAddRequest( raw=raw, consumer_id=consumer_id, app_id=app_id, service_id=service_id, - employee=models.EmployeeInput( - id=id, + accounting_employee=models.AccountingEmployeeInput( + display_id=display_id, first_name=first_name, last_name=last_name, - middle_name=middle_name, display_name=display_name, - preferred_name=preferred_name, - initials=initials, - salutation=salutation, - title=title, - marital_status=marital_status, - partner=utils.get_pydantic_model(partner, Optional[models.PersonInput]), - division=division, - division_id=division_id, - department=department, - department_id=department_id, - department_name=department_name, - team=utils.get_pydantic_model(team, OptionalNullable[models.Team]), - company_id=company_id, - company_name=company_name, - employment_start_date=employment_start_date, - employment_end_date=employment_end_date, - leaving_reason=leaving_reason, + emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), employee_number=employee_number, - employment_status=employment_status, - employment_role=utils.get_pydantic_model( - employment_role, Optional[models.EmploymentRole] - ), - ethnicity=ethnicity, - manager=utils.get_pydantic_model(manager, Optional[models.Manager]), - direct_reports=direct_reports, - social_security_number=social_security_number, - birthday=birthday, - deceased_on=deceased_on, - country_of_birth=country_of_birth, - description=description, + job_title=job_title, + status=status, + is_contractor=is_contractor, + department=utils.get_pydantic_model( + department, OptionalNullable[models.LinkedDepartmentInput] + ), + location=utils.get_pydantic_model( + location, OptionalNullable[models.LinkedLocationInput] + ), + manager=utils.get_pydantic_model( + manager, Optional[models.AccountingEmployeeManager] + ), + hire_date=hire_date, + termination_date=termination_date, gender=gender, - pronouns=pronouns, - preferred_language=preferred_language, - languages=languages, - nationalities=nationalities, - photo_url=photo_url, - timezone=timezone, - source=source, - source_id=source_id, - record_url=record_url, - jobs=utils.get_pydantic_model( - jobs, OptionalNullable[List[models.EmployeeJobInput]] - ), - compensations=utils.get_pydantic_model( - compensations, - OptionalNullable[List[models.EmployeeCompensationInput]], - ), - works_remote=works_remote, + birth_date=birth_date, + subsidiary=utils.get_pydantic_model( + subsidiary, OptionalNullable[models.LinkedSubsidiaryInput] + ), + tracking_categories=utils.get_pydantic_model( + tracking_categories, + OptionalNullable[List[Nullable[models.LinkedTrackingCategory]]], + ), + currency=currency, + notes=notes, addresses=utils.get_pydantic_model( addresses, Optional[List[models.Address]] ), phone_numbers=utils.get_pydantic_model( phone_numbers, Optional[List[models.PhoneNumber]] ), - emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), custom_fields=utils.get_pydantic_model( custom_fields, Optional[List[models.CustomField]] ), - social_links=utils.get_pydantic_model( - social_links, Optional[List[models.SocialLink]] - ), - bank_accounts=utils.get_pydantic_model( - bank_accounts, Optional[List[models.BankAccount2]] - ), - tax_code=tax_code, - tax_id=tax_id, - dietary_preference=dietary_preference, - food_allergies=food_allergies, - probation_period=utils.get_pydantic_model( - probation_period, Optional[models.ProbationPeriod] - ), - tags=tags, row_version=row_version, - deleted=deleted, pass_through=utils.get_pydantic_model( pass_through, Optional[List[models.PassThroughBody]] ), @@ -1033,7 +805,7 @@ async def create_async( req = self._build_request_async( method="POST", - path="/hris/employees", + path="/accounting/employees", base_url=base_url, url_variables=url_variables, request=request, @@ -1043,13 +815,17 @@ async def create_async( user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, - _globals=models.HrisEmployeesAddGlobals( + _globals=models.AccountingEmployeesAddGlobals( consumer_id=self.sdk_configuration.globals.consumer_id, app_id=self.sdk_configuration.globals.app_id, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.employee, False, False, "json", models.EmployeeInput + request.accounting_employee, + False, + False, + "json", + models.AccountingEmployeeInput, ), timeout_ms=timeout_ms, ) @@ -1070,7 +846,7 @@ async def create_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="hris.employeesAdd", + operation_id="accounting.employeesAdd", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -1083,9 +859,9 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return models.HrisEmployeesAddResponse( - create_employee_response=unmarshal_json_response( - Optional[models.CreateEmployeeResponse], http_res + return models.AccountingEmployeesAddResponse( + create_accounting_employee_response=unmarshal_json_response( + Optional[models.CreateAccountingEmployeeResponse], http_res ), http_meta=models.HTTPMetadata(request=req, response=http_res), ) @@ -1121,7 +897,7 @@ async def create_async( 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, "default", "application/json"): - return models.HrisEmployeesAddResponse( + return models.AccountingEmployeesAddResponse( unexpected_error_response=unmarshal_json_response( Optional[models.UnexpectedErrorResponse], http_res ), @@ -1139,15 +915,11 @@ def get( service_id: Optional[str] = None, raw: Optional[bool] = False, fields: OptionalNullable[str] = UNSET, - filter_: Optional[ - Union[models.EmployeesOneFilter, models.EmployeesOneFilterTypedDict] - ] = None, - pass_through: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.HrisEmployeesOneResponse: + ) -> models.AccountingEmployeesOneResponse: r"""Get Employee Get Employee @@ -1158,8 +930,6 @@ def get( :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. :param raw: Include raw response. Mostly used for debugging purposes :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. - :param filter_: Apply filters - :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads :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 @@ -1175,22 +945,18 @@ def get( else: base_url = self._get_url(base_url, url_variables) - request = models.HrisEmployeesOneRequest( + request = models.AccountingEmployeesOneRequest( id=id, consumer_id=consumer_id, app_id=app_id, service_id=service_id, raw=raw, fields=fields, - filter_=utils.get_pydantic_model( - filter_, Optional[models.EmployeesOneFilter] - ), - pass_through=pass_through, ) req = self._build_request( method="GET", - path="/hris/employees/{id}", + path="/accounting/employees/{id}", base_url=base_url, url_variables=url_variables, request=request, @@ -1200,7 +966,7 @@ def get( user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, - _globals=models.HrisEmployeesOneGlobals( + _globals=models.AccountingEmployeesOneGlobals( consumer_id=self.sdk_configuration.globals.consumer_id, app_id=self.sdk_configuration.globals.app_id, ), @@ -1224,7 +990,7 @@ def get( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="hris.employeesOne", + operation_id="accounting.employeesOne", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -1237,9 +1003,9 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return models.HrisEmployeesOneResponse( - get_employee_response=unmarshal_json_response( - Optional[models.GetEmployeeResponse], http_res + return models.AccountingEmployeesOneResponse( + get_accounting_employee_response=unmarshal_json_response( + Optional[models.GetAccountingEmployeeResponse], http_res ), http_meta=models.HTTPMetadata(request=req, response=http_res), ) @@ -1275,7 +1041,7 @@ def get( 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, "default", "application/json"): - return models.HrisEmployeesOneResponse( + return models.AccountingEmployeesOneResponse( unexpected_error_response=unmarshal_json_response( Optional[models.UnexpectedErrorResponse], http_res ), @@ -1293,15 +1059,11 @@ async def get_async( service_id: Optional[str] = None, raw: Optional[bool] = False, fields: OptionalNullable[str] = UNSET, - filter_: Optional[ - Union[models.EmployeesOneFilter, models.EmployeesOneFilterTypedDict] - ] = None, - pass_through: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.HrisEmployeesOneResponse: + ) -> models.AccountingEmployeesOneResponse: r"""Get Employee Get Employee @@ -1312,8 +1074,6 @@ async def get_async( :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. :param raw: Include raw response. Mostly used for debugging purposes :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. - :param filter_: Apply filters - :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads :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 @@ -1329,22 +1089,18 @@ async def get_async( else: base_url = self._get_url(base_url, url_variables) - request = models.HrisEmployeesOneRequest( + request = models.AccountingEmployeesOneRequest( id=id, consumer_id=consumer_id, app_id=app_id, service_id=service_id, raw=raw, fields=fields, - filter_=utils.get_pydantic_model( - filter_, Optional[models.EmployeesOneFilter] - ), - pass_through=pass_through, ) req = self._build_request_async( method="GET", - path="/hris/employees/{id}", + path="/accounting/employees/{id}", base_url=base_url, url_variables=url_variables, request=request, @@ -1354,7 +1110,7 @@ async def get_async( user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, - _globals=models.HrisEmployeesOneGlobals( + _globals=models.AccountingEmployeesOneGlobals( consumer_id=self.sdk_configuration.globals.consumer_id, app_id=self.sdk_configuration.globals.app_id, ), @@ -1378,7 +1134,7 @@ async def get_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="hris.employeesOne", + operation_id="accounting.employeesOne", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -1391,9 +1147,9 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return models.HrisEmployeesOneResponse( - get_employee_response=unmarshal_json_response( - Optional[models.GetEmployeeResponse], http_res + return models.AccountingEmployeesOneResponse( + get_accounting_employee_response=unmarshal_json_response( + Optional[models.GetAccountingEmployeeResponse], http_res ), http_meta=models.HTTPMetadata(request=req, response=http_res), ) @@ -1429,7 +1185,7 @@ async def get_async( 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, "default", "application/json"): - return models.HrisEmployeesOneResponse( + return models.AccountingEmployeesOneResponse( unexpected_error_response=unmarshal_json_response( Optional[models.UnexpectedErrorResponse], http_res ), @@ -1441,94 +1197,57 @@ async def get_async( def update( self, *, - id_param: str, + id: str, consumer_id: Optional[str] = None, app_id: Optional[str] = None, service_id: Optional[str] = None, raw: Optional[bool] = False, - id: OptionalNullable[str] = UNSET, + display_id: OptionalNullable[str] = UNSET, first_name: OptionalNullable[str] = UNSET, last_name: OptionalNullable[str] = UNSET, - middle_name: OptionalNullable[str] = UNSET, display_name: OptionalNullable[str] = UNSET, - preferred_name: OptionalNullable[str] = UNSET, - initials: OptionalNullable[str] = UNSET, - salutation: OptionalNullable[str] = UNSET, - title: OptionalNullable[str] = UNSET, - marital_status: OptionalNullable[str] = UNSET, - partner: Optional[ - Union[models.PersonInput, models.PersonInputTypedDict] - ] = None, - division: OptionalNullable[str] = UNSET, - division_id: OptionalNullable[str] = UNSET, - department: OptionalNullable[str] = UNSET, - department_id: OptionalNullable[str] = UNSET, - department_name: OptionalNullable[str] = UNSET, - team: OptionalNullable[Union[models.Team, models.TeamTypedDict]] = UNSET, - company_id: OptionalNullable[str] = UNSET, - company_name: OptionalNullable[str] = UNSET, - employment_start_date: OptionalNullable[str] = UNSET, - employment_end_date: OptionalNullable[str] = UNSET, - leaving_reason: OptionalNullable[models.LeavingReason] = UNSET, + emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, employee_number: OptionalNullable[str] = UNSET, - employment_status: OptionalNullable[models.EmploymentStatus] = UNSET, - employment_role: Optional[ - Union[models.EmploymentRole, models.EmploymentRoleTypedDict] + job_title: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.EmployeeStatus] = UNSET, + is_contractor: OptionalNullable[bool] = UNSET, + department: OptionalNullable[ + Union[models.LinkedDepartmentInput, models.LinkedDepartmentInputTypedDict] + ] = UNSET, + location: OptionalNullable[ + Union[models.LinkedLocationInput, models.LinkedLocationInputTypedDict] + ] = UNSET, + manager: Optional[ + Union[ + models.AccountingEmployeeManager, + models.AccountingEmployeeManagerTypedDict, + ] ] = None, - ethnicity: OptionalNullable[str] = UNSET, - manager: Optional[Union[models.Manager, models.ManagerTypedDict]] = None, - direct_reports: OptionalNullable[List[str]] = UNSET, - social_security_number: OptionalNullable[str] = UNSET, - birthday: OptionalNullable[date] = UNSET, - deceased_on: OptionalNullable[date] = UNSET, - country_of_birth: OptionalNullable[str] = UNSET, - description: OptionalNullable[str] = UNSET, + hire_date: OptionalNullable[date] = UNSET, + termination_date: OptionalNullable[date] = UNSET, gender: OptionalNullable[models.Gender] = UNSET, - pronouns: OptionalNullable[str] = UNSET, - preferred_language: OptionalNullable[str] = UNSET, - languages: Optional[List[Nullable[str]]] = None, - nationalities: Optional[List[Nullable[str]]] = None, - photo_url: OptionalNullable[str] = UNSET, - timezone: OptionalNullable[str] = UNSET, - source: OptionalNullable[str] = UNSET, - source_id: OptionalNullable[str] = UNSET, - record_url: OptionalNullable[str] = UNSET, - jobs: OptionalNullable[ - Union[List[models.EmployeeJobInput], List[models.EmployeeJobInputTypedDict]] + birth_date: OptionalNullable[date] = UNSET, + subsidiary: OptionalNullable[ + Union[models.LinkedSubsidiaryInput, models.LinkedSubsidiaryInputTypedDict] ] = UNSET, - compensations: OptionalNullable[ + tracking_categories: OptionalNullable[ Union[ - List[models.EmployeeCompensationInput], - List[models.EmployeeCompensationInputTypedDict], + List[Nullable[models.LinkedTrackingCategory]], + List[Nullable[models.LinkedTrackingCategoryTypedDict]], ] ] = UNSET, - works_remote: OptionalNullable[bool] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + notes: OptionalNullable[str] = UNSET, addresses: Optional[ Union[List[models.Address], List[models.AddressTypedDict]] ] = None, phone_numbers: Optional[ Union[List[models.PhoneNumber], List[models.PhoneNumberTypedDict]] ] = None, - emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, custom_fields: Optional[ Union[List[models.CustomField], List[models.CustomFieldTypedDict]] ] = None, - social_links: Optional[ - Union[List[models.SocialLink], List[models.SocialLinkTypedDict]] - ] = None, - bank_accounts: Optional[ - Union[List[models.BankAccount2], List[models.BankAccount2TypedDict]] - ] = None, - tax_code: OptionalNullable[str] = UNSET, - tax_id: OptionalNullable[str] = UNSET, - dietary_preference: OptionalNullable[str] = UNSET, - food_allergies: OptionalNullable[List[str]] = UNSET, - probation_period: Optional[ - Union[models.ProbationPeriod, models.ProbationPeriodTypedDict] - ] = None, - tags: OptionalNullable[List[str]] = UNSET, row_version: OptionalNullable[str] = UNSET, - deleted: OptionalNullable[bool] = UNSET, pass_through: Optional[ Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] ] = None, @@ -1536,76 +1255,40 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.HrisEmployeesUpdateResponse: + ) -> models.AccountingEmployeesUpdateResponse: r"""Update Employee Update Employee - :param id_param: ID of the record you are acting upon. + :param id: ID of the record you are acting upon. :param consumer_id: ID of the consumer which you want to get or push data from :param app_id: The ID of your Unify application :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. :param raw: Include raw response. Mostly used for debugging purposes - :param id: A unique identifier for an object. - :param first_name: The first name of the person. - :param last_name: The last name of the person. - :param middle_name: Middle name of the person. - :param display_name: The name used to display the employee, often a combination of their first and last names. - :param preferred_name: The name the employee prefers to be addressed by, which may be different from their legal name. - :param initials: The initials of the person, usually derived from their first, middle, and last names. - :param salutation: A formal salutation for the person. For example, 'Mr', 'Mrs' - :param title: The job title of the person. - :param marital_status: The marital status of the employee. - :param partner: - :param division: The division the person is currently in. Usually a collection of departments or teams or regions. - :param division_id: Unique identifier of the division this employee belongs to. - :param department: The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. - :param department_id: Unique identifier of the department ID this employee belongs to. - :param department_name: Name of the department this employee belongs to. - :param team: The team the person is currently in. - :param company_id: The unique identifier of the company. - :param company_name: The name of the company. - :param employment_start_date: A Start Date is the date that the employee started working at the company - :param employment_end_date: An End Date is the date that the employee ended working at the company - :param leaving_reason: The reason because the employment ended. - :param employee_number: An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. - :param employment_status: The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. - :param employment_role: - :param ethnicity: The ethnicity of the employee - :param manager: - :param direct_reports: Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. - :param social_security_number: A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. - :param birthday: The date of birth of the person. - :param deceased_on: The date the person deceased. - :param country_of_birth: Country code according to ISO 3166-1 alpha-2. - :param description: A description of the object. + :param display_id: Id to be displayed. + :param first_name: The first name of the employee. + :param last_name: The last name of the employee. + :param display_name: The display name of the employee. + :param emails: Email addresses of the employee. + :param employee_number: The employee number or identifier. + :param job_title: The job title of the employee. + :param status: The status of the employee. + :param is_contractor: Whether the employee is a contractor. + :param department: + :param location: + :param manager: The manager of the employee. + :param hire_date: The date the employee was hired. + :param termination_date: The date the employee was terminated. :param gender: The gender represents the gender identity of a person. - :param pronouns: The preferred pronouns of the person. - :param preferred_language: language code according to ISO 639-1. For the United States - EN - :param languages: - :param nationalities: - :param photo_url: The URL of the photo of a person. - :param timezone: The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. - :param source: When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. - :param source_id: Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). - :param record_url: - :param jobs: - :param compensations: - :param works_remote: Indicates if the employee works from a remote location. - :param addresses: - :param phone_numbers: - :param emails: + :param birth_date: The date of birth of the employee. + :param subsidiary: + :param tracking_categories: A list of linked tracking categories. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param notes: Notes about the employee. + :param addresses: Addresses of the employee. + :param phone_numbers: Phone numbers of the employee. :param custom_fields: - :param social_links: - :param bank_accounts: - :param tax_code: - :param tax_id: - :param dietary_preference: Indicate the employee's dietary preference. - :param food_allergies: Indicate the employee's food allergies. - :param probation_period: - :param tags: :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. - :param deleted: Flag to indicate if the object is deleted. :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1622,92 +1305,54 @@ def update( else: base_url = self._get_url(base_url, url_variables) - request = models.HrisEmployeesUpdateRequest( - id_param=id_param, + request = models.AccountingEmployeesUpdateRequest( + id=id, consumer_id=consumer_id, app_id=app_id, service_id=service_id, raw=raw, - employee=models.EmployeeInput( - id=id, + accounting_employee=models.AccountingEmployeeInput( + display_id=display_id, first_name=first_name, last_name=last_name, - middle_name=middle_name, display_name=display_name, - preferred_name=preferred_name, - initials=initials, - salutation=salutation, - title=title, - marital_status=marital_status, - partner=utils.get_pydantic_model(partner, Optional[models.PersonInput]), - division=division, - division_id=division_id, - department=department, - department_id=department_id, - department_name=department_name, - team=utils.get_pydantic_model(team, OptionalNullable[models.Team]), - company_id=company_id, - company_name=company_name, - employment_start_date=employment_start_date, - employment_end_date=employment_end_date, - leaving_reason=leaving_reason, + emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), employee_number=employee_number, - employment_status=employment_status, - employment_role=utils.get_pydantic_model( - employment_role, Optional[models.EmploymentRole] - ), - ethnicity=ethnicity, - manager=utils.get_pydantic_model(manager, Optional[models.Manager]), - direct_reports=direct_reports, - social_security_number=social_security_number, - birthday=birthday, - deceased_on=deceased_on, - country_of_birth=country_of_birth, - description=description, + job_title=job_title, + status=status, + is_contractor=is_contractor, + department=utils.get_pydantic_model( + department, OptionalNullable[models.LinkedDepartmentInput] + ), + location=utils.get_pydantic_model( + location, OptionalNullable[models.LinkedLocationInput] + ), + manager=utils.get_pydantic_model( + manager, Optional[models.AccountingEmployeeManager] + ), + hire_date=hire_date, + termination_date=termination_date, gender=gender, - pronouns=pronouns, - preferred_language=preferred_language, - languages=languages, - nationalities=nationalities, - photo_url=photo_url, - timezone=timezone, - source=source, - source_id=source_id, - record_url=record_url, - jobs=utils.get_pydantic_model( - jobs, OptionalNullable[List[models.EmployeeJobInput]] - ), - compensations=utils.get_pydantic_model( - compensations, - OptionalNullable[List[models.EmployeeCompensationInput]], - ), - works_remote=works_remote, + birth_date=birth_date, + subsidiary=utils.get_pydantic_model( + subsidiary, OptionalNullable[models.LinkedSubsidiaryInput] + ), + tracking_categories=utils.get_pydantic_model( + tracking_categories, + OptionalNullable[List[Nullable[models.LinkedTrackingCategory]]], + ), + currency=currency, + notes=notes, addresses=utils.get_pydantic_model( addresses, Optional[List[models.Address]] ), phone_numbers=utils.get_pydantic_model( phone_numbers, Optional[List[models.PhoneNumber]] ), - emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), custom_fields=utils.get_pydantic_model( custom_fields, Optional[List[models.CustomField]] ), - social_links=utils.get_pydantic_model( - social_links, Optional[List[models.SocialLink]] - ), - bank_accounts=utils.get_pydantic_model( - bank_accounts, Optional[List[models.BankAccount2]] - ), - tax_code=tax_code, - tax_id=tax_id, - dietary_preference=dietary_preference, - food_allergies=food_allergies, - probation_period=utils.get_pydantic_model( - probation_period, Optional[models.ProbationPeriod] - ), - tags=tags, row_version=row_version, - deleted=deleted, pass_through=utils.get_pydantic_model( pass_through, Optional[List[models.PassThroughBody]] ), @@ -1716,7 +1361,7 @@ def update( req = self._build_request( method="PATCH", - path="/hris/employees/{id}", + path="/accounting/employees/{id}", base_url=base_url, url_variables=url_variables, request=request, @@ -1726,13 +1371,17 @@ def update( user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, - _globals=models.HrisEmployeesUpdateGlobals( + _globals=models.AccountingEmployeesUpdateGlobals( consumer_id=self.sdk_configuration.globals.consumer_id, app_id=self.sdk_configuration.globals.app_id, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.employee, False, False, "json", models.EmployeeInput + request.accounting_employee, + False, + False, + "json", + models.AccountingEmployeeInput, ), timeout_ms=timeout_ms, ) @@ -1753,7 +1402,7 @@ def update( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="hris.employeesUpdate", + operation_id="accounting.employeesUpdate", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -1766,9 +1415,9 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return models.HrisEmployeesUpdateResponse( - update_employee_response=unmarshal_json_response( - Optional[models.UpdateEmployeeResponse], http_res + return models.AccountingEmployeesUpdateResponse( + update_accounting_employee_response=unmarshal_json_response( + Optional[models.UpdateAccountingEmployeeResponse], http_res ), http_meta=models.HTTPMetadata(request=req, response=http_res), ) @@ -1804,7 +1453,7 @@ def update( 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, "default", "application/json"): - return models.HrisEmployeesUpdateResponse( + return models.AccountingEmployeesUpdateResponse( unexpected_error_response=unmarshal_json_response( Optional[models.UnexpectedErrorResponse], http_res ), @@ -1816,94 +1465,57 @@ def update( async def update_async( self, *, - id_param: str, + id: str, consumer_id: Optional[str] = None, app_id: Optional[str] = None, service_id: Optional[str] = None, raw: Optional[bool] = False, - id: OptionalNullable[str] = UNSET, + display_id: OptionalNullable[str] = UNSET, first_name: OptionalNullable[str] = UNSET, last_name: OptionalNullable[str] = UNSET, - middle_name: OptionalNullable[str] = UNSET, display_name: OptionalNullable[str] = UNSET, - preferred_name: OptionalNullable[str] = UNSET, - initials: OptionalNullable[str] = UNSET, - salutation: OptionalNullable[str] = UNSET, - title: OptionalNullable[str] = UNSET, - marital_status: OptionalNullable[str] = UNSET, - partner: Optional[ - Union[models.PersonInput, models.PersonInputTypedDict] - ] = None, - division: OptionalNullable[str] = UNSET, - division_id: OptionalNullable[str] = UNSET, - department: OptionalNullable[str] = UNSET, - department_id: OptionalNullable[str] = UNSET, - department_name: OptionalNullable[str] = UNSET, - team: OptionalNullable[Union[models.Team, models.TeamTypedDict]] = UNSET, - company_id: OptionalNullable[str] = UNSET, - company_name: OptionalNullable[str] = UNSET, - employment_start_date: OptionalNullable[str] = UNSET, - employment_end_date: OptionalNullable[str] = UNSET, - leaving_reason: OptionalNullable[models.LeavingReason] = UNSET, + emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, employee_number: OptionalNullable[str] = UNSET, - employment_status: OptionalNullable[models.EmploymentStatus] = UNSET, - employment_role: Optional[ - Union[models.EmploymentRole, models.EmploymentRoleTypedDict] + job_title: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.EmployeeStatus] = UNSET, + is_contractor: OptionalNullable[bool] = UNSET, + department: OptionalNullable[ + Union[models.LinkedDepartmentInput, models.LinkedDepartmentInputTypedDict] + ] = UNSET, + location: OptionalNullable[ + Union[models.LinkedLocationInput, models.LinkedLocationInputTypedDict] + ] = UNSET, + manager: Optional[ + Union[ + models.AccountingEmployeeManager, + models.AccountingEmployeeManagerTypedDict, + ] ] = None, - ethnicity: OptionalNullable[str] = UNSET, - manager: Optional[Union[models.Manager, models.ManagerTypedDict]] = None, - direct_reports: OptionalNullable[List[str]] = UNSET, - social_security_number: OptionalNullable[str] = UNSET, - birthday: OptionalNullable[date] = UNSET, - deceased_on: OptionalNullable[date] = UNSET, - country_of_birth: OptionalNullable[str] = UNSET, - description: OptionalNullable[str] = UNSET, + hire_date: OptionalNullable[date] = UNSET, + termination_date: OptionalNullable[date] = UNSET, gender: OptionalNullable[models.Gender] = UNSET, - pronouns: OptionalNullable[str] = UNSET, - preferred_language: OptionalNullable[str] = UNSET, - languages: Optional[List[Nullable[str]]] = None, - nationalities: Optional[List[Nullable[str]]] = None, - photo_url: OptionalNullable[str] = UNSET, - timezone: OptionalNullable[str] = UNSET, - source: OptionalNullable[str] = UNSET, - source_id: OptionalNullable[str] = UNSET, - record_url: OptionalNullable[str] = UNSET, - jobs: OptionalNullable[ - Union[List[models.EmployeeJobInput], List[models.EmployeeJobInputTypedDict]] + birth_date: OptionalNullable[date] = UNSET, + subsidiary: OptionalNullable[ + Union[models.LinkedSubsidiaryInput, models.LinkedSubsidiaryInputTypedDict] ] = UNSET, - compensations: OptionalNullable[ + tracking_categories: OptionalNullable[ Union[ - List[models.EmployeeCompensationInput], - List[models.EmployeeCompensationInputTypedDict], + List[Nullable[models.LinkedTrackingCategory]], + List[Nullable[models.LinkedTrackingCategoryTypedDict]], ] ] = UNSET, - works_remote: OptionalNullable[bool] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + notes: OptionalNullable[str] = UNSET, addresses: Optional[ Union[List[models.Address], List[models.AddressTypedDict]] ] = None, phone_numbers: Optional[ Union[List[models.PhoneNumber], List[models.PhoneNumberTypedDict]] ] = None, - emails: Optional[Union[List[models.Email], List[models.EmailTypedDict]]] = None, custom_fields: Optional[ Union[List[models.CustomField], List[models.CustomFieldTypedDict]] ] = None, - social_links: Optional[ - Union[List[models.SocialLink], List[models.SocialLinkTypedDict]] - ] = None, - bank_accounts: Optional[ - Union[List[models.BankAccount2], List[models.BankAccount2TypedDict]] - ] = None, - tax_code: OptionalNullable[str] = UNSET, - tax_id: OptionalNullable[str] = UNSET, - dietary_preference: OptionalNullable[str] = UNSET, - food_allergies: OptionalNullable[List[str]] = UNSET, - probation_period: Optional[ - Union[models.ProbationPeriod, models.ProbationPeriodTypedDict] - ] = None, - tags: OptionalNullable[List[str]] = UNSET, row_version: OptionalNullable[str] = UNSET, - deleted: OptionalNullable[bool] = UNSET, pass_through: Optional[ Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] ] = None, @@ -1911,76 +1523,40 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.HrisEmployeesUpdateResponse: + ) -> models.AccountingEmployeesUpdateResponse: r"""Update Employee Update Employee - :param id_param: ID of the record you are acting upon. + :param id: ID of the record you are acting upon. :param consumer_id: ID of the consumer which you want to get or push data from :param app_id: The ID of your Unify application :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. :param raw: Include raw response. Mostly used for debugging purposes - :param id: A unique identifier for an object. - :param first_name: The first name of the person. - :param last_name: The last name of the person. - :param middle_name: Middle name of the person. - :param display_name: The name used to display the employee, often a combination of their first and last names. - :param preferred_name: The name the employee prefers to be addressed by, which may be different from their legal name. - :param initials: The initials of the person, usually derived from their first, middle, and last names. - :param salutation: A formal salutation for the person. For example, 'Mr', 'Mrs' - :param title: The job title of the person. - :param marital_status: The marital status of the employee. - :param partner: - :param division: The division the person is currently in. Usually a collection of departments or teams or regions. - :param division_id: Unique identifier of the division this employee belongs to. - :param department: The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. - :param department_id: Unique identifier of the department ID this employee belongs to. - :param department_name: Name of the department this employee belongs to. - :param team: The team the person is currently in. - :param company_id: The unique identifier of the company. - :param company_name: The name of the company. - :param employment_start_date: A Start Date is the date that the employee started working at the company - :param employment_end_date: An End Date is the date that the employee ended working at the company - :param leaving_reason: The reason because the employment ended. - :param employee_number: An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. - :param employment_status: The employment status of the employee, indicating whether they are currently employed, inactive, terminated, or in another status. - :param employment_role: - :param ethnicity: The ethnicity of the employee - :param manager: - :param direct_reports: Direct reports is an array of ids that reflect the individuals in an organizational hierarchy who are directly supervised by this specific employee. - :param social_security_number: A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions. - :param birthday: The date of birth of the person. - :param deceased_on: The date the person deceased. - :param country_of_birth: Country code according to ISO 3166-1 alpha-2. - :param description: A description of the object. + :param display_id: Id to be displayed. + :param first_name: The first name of the employee. + :param last_name: The last name of the employee. + :param display_name: The display name of the employee. + :param emails: Email addresses of the employee. + :param employee_number: The employee number or identifier. + :param job_title: The job title of the employee. + :param status: The status of the employee. + :param is_contractor: Whether the employee is a contractor. + :param department: + :param location: + :param manager: The manager of the employee. + :param hire_date: The date the employee was hired. + :param termination_date: The date the employee was terminated. :param gender: The gender represents the gender identity of a person. - :param pronouns: The preferred pronouns of the person. - :param preferred_language: language code according to ISO 639-1. For the United States - EN - :param languages: - :param nationalities: - :param photo_url: The URL of the photo of a person. - :param timezone: The time zone related to the resource. The value is a string containing a standard time zone identifier, e.g. Europe/London. - :param source: When the employee is imported as a new hire, this field indicates what system (e.g. the name of the ATS) this employee was imported from. - :param source_id: Unique identifier of the employee in the system this employee was imported from (e.g. the ID in the ATS). - :param record_url: - :param jobs: - :param compensations: - :param works_remote: Indicates if the employee works from a remote location. - :param addresses: - :param phone_numbers: - :param emails: + :param birth_date: The date of birth of the employee. + :param subsidiary: + :param tracking_categories: A list of linked tracking categories. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param notes: Notes about the employee. + :param addresses: Addresses of the employee. + :param phone_numbers: Phone numbers of the employee. :param custom_fields: - :param social_links: - :param bank_accounts: - :param tax_code: - :param tax_id: - :param dietary_preference: Indicate the employee's dietary preference. - :param food_allergies: Indicate the employee's food allergies. - :param probation_period: - :param tags: :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. - :param deleted: Flag to indicate if the object is deleted. :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1997,92 +1573,54 @@ async def update_async( else: base_url = self._get_url(base_url, url_variables) - request = models.HrisEmployeesUpdateRequest( - id_param=id_param, + request = models.AccountingEmployeesUpdateRequest( + id=id, consumer_id=consumer_id, app_id=app_id, service_id=service_id, raw=raw, - employee=models.EmployeeInput( - id=id, + accounting_employee=models.AccountingEmployeeInput( + display_id=display_id, first_name=first_name, last_name=last_name, - middle_name=middle_name, display_name=display_name, - preferred_name=preferred_name, - initials=initials, - salutation=salutation, - title=title, - marital_status=marital_status, - partner=utils.get_pydantic_model(partner, Optional[models.PersonInput]), - division=division, - division_id=division_id, - department=department, - department_id=department_id, - department_name=department_name, - team=utils.get_pydantic_model(team, OptionalNullable[models.Team]), - company_id=company_id, - company_name=company_name, - employment_start_date=employment_start_date, - employment_end_date=employment_end_date, - leaving_reason=leaving_reason, + emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), employee_number=employee_number, - employment_status=employment_status, - employment_role=utils.get_pydantic_model( - employment_role, Optional[models.EmploymentRole] - ), - ethnicity=ethnicity, - manager=utils.get_pydantic_model(manager, Optional[models.Manager]), - direct_reports=direct_reports, - social_security_number=social_security_number, - birthday=birthday, - deceased_on=deceased_on, - country_of_birth=country_of_birth, - description=description, + job_title=job_title, + status=status, + is_contractor=is_contractor, + department=utils.get_pydantic_model( + department, OptionalNullable[models.LinkedDepartmentInput] + ), + location=utils.get_pydantic_model( + location, OptionalNullable[models.LinkedLocationInput] + ), + manager=utils.get_pydantic_model( + manager, Optional[models.AccountingEmployeeManager] + ), + hire_date=hire_date, + termination_date=termination_date, gender=gender, - pronouns=pronouns, - preferred_language=preferred_language, - languages=languages, - nationalities=nationalities, - photo_url=photo_url, - timezone=timezone, - source=source, - source_id=source_id, - record_url=record_url, - jobs=utils.get_pydantic_model( - jobs, OptionalNullable[List[models.EmployeeJobInput]] - ), - compensations=utils.get_pydantic_model( - compensations, - OptionalNullable[List[models.EmployeeCompensationInput]], - ), - works_remote=works_remote, + birth_date=birth_date, + subsidiary=utils.get_pydantic_model( + subsidiary, OptionalNullable[models.LinkedSubsidiaryInput] + ), + tracking_categories=utils.get_pydantic_model( + tracking_categories, + OptionalNullable[List[Nullable[models.LinkedTrackingCategory]]], + ), + currency=currency, + notes=notes, addresses=utils.get_pydantic_model( addresses, Optional[List[models.Address]] ), phone_numbers=utils.get_pydantic_model( phone_numbers, Optional[List[models.PhoneNumber]] ), - emails=utils.get_pydantic_model(emails, Optional[List[models.Email]]), custom_fields=utils.get_pydantic_model( custom_fields, Optional[List[models.CustomField]] ), - social_links=utils.get_pydantic_model( - social_links, Optional[List[models.SocialLink]] - ), - bank_accounts=utils.get_pydantic_model( - bank_accounts, Optional[List[models.BankAccount2]] - ), - tax_code=tax_code, - tax_id=tax_id, - dietary_preference=dietary_preference, - food_allergies=food_allergies, - probation_period=utils.get_pydantic_model( - probation_period, Optional[models.ProbationPeriod] - ), - tags=tags, row_version=row_version, - deleted=deleted, pass_through=utils.get_pydantic_model( pass_through, Optional[List[models.PassThroughBody]] ), @@ -2091,7 +1629,7 @@ async def update_async( req = self._build_request_async( method="PATCH", - path="/hris/employees/{id}", + path="/accounting/employees/{id}", base_url=base_url, url_variables=url_variables, request=request, @@ -2101,13 +1639,17 @@ async def update_async( user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, - _globals=models.HrisEmployeesUpdateGlobals( + _globals=models.AccountingEmployeesUpdateGlobals( consumer_id=self.sdk_configuration.globals.consumer_id, app_id=self.sdk_configuration.globals.app_id, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.employee, False, False, "json", models.EmployeeInput + request.accounting_employee, + False, + False, + "json", + models.AccountingEmployeeInput, ), timeout_ms=timeout_ms, ) @@ -2128,7 +1670,7 @@ async def update_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="hris.employeesUpdate", + operation_id="accounting.employeesUpdate", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -2141,9 +1683,9 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return models.HrisEmployeesUpdateResponse( - update_employee_response=unmarshal_json_response( - Optional[models.UpdateEmployeeResponse], http_res + return models.AccountingEmployeesUpdateResponse( + update_accounting_employee_response=unmarshal_json_response( + Optional[models.UpdateAccountingEmployeeResponse], http_res ), http_meta=models.HTTPMetadata(request=req, response=http_res), ) @@ -2179,7 +1721,7 @@ async def update_async( 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, "default", "application/json"): - return models.HrisEmployeesUpdateResponse( + return models.AccountingEmployeesUpdateResponse( unexpected_error_response=unmarshal_json_response( Optional[models.UnexpectedErrorResponse], http_res ), @@ -2200,7 +1742,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.HrisEmployeesDeleteResponse: + ) -> models.AccountingEmployeesDeleteResponse: r"""Delete Employee Delete Employee @@ -2225,7 +1767,7 @@ def delete( else: base_url = self._get_url(base_url, url_variables) - request = models.HrisEmployeesDeleteRequest( + request = models.AccountingEmployeesDeleteRequest( id=id, consumer_id=consumer_id, app_id=app_id, @@ -2235,7 +1777,7 @@ def delete( req = self._build_request( method="DELETE", - path="/hris/employees/{id}", + path="/accounting/employees/{id}", base_url=base_url, url_variables=url_variables, request=request, @@ -2245,7 +1787,7 @@ def delete( user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, - _globals=models.HrisEmployeesDeleteGlobals( + _globals=models.AccountingEmployeesDeleteGlobals( consumer_id=self.sdk_configuration.globals.consumer_id, app_id=self.sdk_configuration.globals.app_id, ), @@ -2269,7 +1811,7 @@ def delete( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="hris.employeesDelete", + operation_id="accounting.employeesDelete", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -2282,9 +1824,9 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return models.HrisEmployeesDeleteResponse( - delete_employee_response=unmarshal_json_response( - Optional[models.DeleteEmployeeResponse], http_res + return models.AccountingEmployeesDeleteResponse( + delete_accounting_employee_response=unmarshal_json_response( + Optional[models.DeleteAccountingEmployeeResponse], http_res ), http_meta=models.HTTPMetadata(request=req, response=http_res), ) @@ -2320,7 +1862,7 @@ def delete( 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, "default", "application/json"): - return models.HrisEmployeesDeleteResponse( + return models.AccountingEmployeesDeleteResponse( unexpected_error_response=unmarshal_json_response( Optional[models.UnexpectedErrorResponse], http_res ), @@ -2341,7 +1883,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.HrisEmployeesDeleteResponse: + ) -> models.AccountingEmployeesDeleteResponse: r"""Delete Employee Delete Employee @@ -2366,7 +1908,7 @@ async def delete_async( else: base_url = self._get_url(base_url, url_variables) - request = models.HrisEmployeesDeleteRequest( + request = models.AccountingEmployeesDeleteRequest( id=id, consumer_id=consumer_id, app_id=app_id, @@ -2376,7 +1918,7 @@ async def delete_async( req = self._build_request_async( method="DELETE", - path="/hris/employees/{id}", + path="/accounting/employees/{id}", base_url=base_url, url_variables=url_variables, request=request, @@ -2386,7 +1928,7 @@ async def delete_async( user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, - _globals=models.HrisEmployeesDeleteGlobals( + _globals=models.AccountingEmployeesDeleteGlobals( consumer_id=self.sdk_configuration.globals.consumer_id, app_id=self.sdk_configuration.globals.app_id, ), @@ -2410,7 +1952,7 @@ async def delete_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="hris.employeesDelete", + operation_id="accounting.employeesDelete", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -2423,9 +1965,9 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return models.HrisEmployeesDeleteResponse( - delete_employee_response=unmarshal_json_response( - Optional[models.DeleteEmployeeResponse], http_res + return models.AccountingEmployeesDeleteResponse( + delete_accounting_employee_response=unmarshal_json_response( + Optional[models.DeleteAccountingEmployeeResponse], http_res ), http_meta=models.HTTPMetadata(request=req, response=http_res), ) @@ -2461,7 +2003,7 @@ async def delete_async( 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, "default", "application/json"): - return models.HrisEmployeesDeleteResponse( + return models.AccountingEmployeesDeleteResponse( unexpected_error_response=unmarshal_json_response( Optional[models.UnexpectedErrorResponse], http_res ), diff --git a/src/apideck_unify/expensecategories.py b/src/apideck_unify/expensecategories.py new file mode 100644 index 00000000..d36b46ea --- /dev/null +++ b/src/apideck_unify/expensecategories.py @@ -0,0 +1,1746 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from apideck_unify import models, utils +from apideck_unify._hooks import HookContext +from apideck_unify.types import OptionalNullable, UNSET +from apideck_unify.utils import get_security_from_env +from apideck_unify.utils.unmarshal_json_response import unmarshal_json_response +from jsonpath import JSONPath +from typing import Any, Dict, List, Mapping, Optional, Union + + +class ExpenseCategories(BaseSDK): + def list( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 20, + fields: OptionalNullable[str] = UNSET, + filter_: Optional[ + Union[ + models.ExpenseCategoriesFilter, models.ExpenseCategoriesFilterTypedDict + ] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.AccountingExpenseCategoriesAllResponse]: + r"""List Expense Categories + + List Expense Categories + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param filter_: Apply filters + :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.AccountingExpenseCategoriesAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + fields=fields, + filter_=utils.get_pydantic_model( + filter_, Optional[models.ExpenseCategoriesFilter] + ), + ) + + req = self._build_request( + method="GET", + path="/accounting/expense-categories", + 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, + _globals=models.AccountingExpenseCategoriesAllGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.expenseCategoriesAll", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.AccountingExpenseCategoriesAllResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.meta.cursors.next").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + fields=fields, + filter_=filter_, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseCategoriesAllResponse( + get_expense_categories_response=unmarshal_json_response( + Optional[models.GetExpenseCategoriesResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseCategoriesAllResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + raise models.APIError("Unexpected response received", http_res) + + async def list_async( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 20, + fields: OptionalNullable[str] = UNSET, + filter_: Optional[ + Union[ + models.ExpenseCategoriesFilter, models.ExpenseCategoriesFilterTypedDict + ] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.AccountingExpenseCategoriesAllResponse]: + r"""List Expense Categories + + List Expense Categories + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param filter_: Apply filters + :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.AccountingExpenseCategoriesAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + fields=fields, + filter_=utils.get_pydantic_model( + filter_, Optional[models.ExpenseCategoriesFilter] + ), + ) + + req = self._build_request_async( + method="GET", + path="/accounting/expense-categories", + 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, + _globals=models.AccountingExpenseCategoriesAllGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="accounting.expenseCategoriesAll", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.AccountingExpenseCategoriesAllResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.meta.cursors.next").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + fields=fields, + filter_=filter_, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseCategoriesAllResponse( + get_expense_categories_response=unmarshal_json_response( + Optional[models.GetExpenseCategoriesResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseCategoriesAllResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + raise models.APIError("Unexpected response received", http_res) + + def create( + self, + *, + name: str, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + display_id: OptionalNullable[str] = UNSET, + code: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.ExpenseCategoryStatus] = UNSET, + account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + offset_account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + tax_rate: Optional[ + Union[models.LinkedTaxRateInput, models.LinkedTaxRateInputTypedDict] + ] = None, + rate_required: OptionalNullable[bool] = UNSET, + default_rate: OptionalNullable[float] = UNSET, + row_version: OptionalNullable[str] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseCategoriesAddResponse: + r"""Create Expense Category + + Create Expense Category + + :param name: The name of the expense category. + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param display_id: Id to be displayed. + :param code: The code or external identifier of the expense category. + :param description: The description of the expense category. + :param status: The status of the expense category. + :param account: + :param offset_account: + :param tax_rate: + :param rate_required: Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). + :param default_rate: Default rate when rate_required is true (e.g. 0.67 for mileage). + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.AccountingExpenseCategoriesAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + expense_category=models.ExpenseCategoryInput( + display_id=display_id, + name=name, + code=code, + description=description, + status=status, + account=utils.get_pydantic_model( + account, OptionalNullable[models.LinkedLedgerAccount] + ), + offset_account=utils.get_pydantic_model( + offset_account, OptionalNullable[models.LinkedLedgerAccount] + ), + tax_rate=utils.get_pydantic_model( + tax_rate, Optional[models.LinkedTaxRateInput] + ), + rate_required=rate_required, + default_rate=default_rate, + row_version=row_version, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/accounting/expense-categories", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingExpenseCategoriesAddGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.expense_category, + False, + False, + "json", + models.ExpenseCategoryInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.expenseCategoriesAdd", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.AccountingExpenseCategoriesAddResponse( + create_expense_category_response=unmarshal_json_response( + Optional[models.CreateExpenseCategoryResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseCategoriesAddResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def create_async( + self, + *, + name: str, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + display_id: OptionalNullable[str] = UNSET, + code: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.ExpenseCategoryStatus] = UNSET, + account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + offset_account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + tax_rate: Optional[ + Union[models.LinkedTaxRateInput, models.LinkedTaxRateInputTypedDict] + ] = None, + rate_required: OptionalNullable[bool] = UNSET, + default_rate: OptionalNullable[float] = UNSET, + row_version: OptionalNullable[str] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseCategoriesAddResponse: + r"""Create Expense Category + + Create Expense Category + + :param name: The name of the expense category. + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param display_id: Id to be displayed. + :param code: The code or external identifier of the expense category. + :param description: The description of the expense category. + :param status: The status of the expense category. + :param account: + :param offset_account: + :param tax_rate: + :param rate_required: Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). + :param default_rate: Default rate when rate_required is true (e.g. 0.67 for mileage). + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.AccountingExpenseCategoriesAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + expense_category=models.ExpenseCategoryInput( + display_id=display_id, + name=name, + code=code, + description=description, + status=status, + account=utils.get_pydantic_model( + account, OptionalNullable[models.LinkedLedgerAccount] + ), + offset_account=utils.get_pydantic_model( + offset_account, OptionalNullable[models.LinkedLedgerAccount] + ), + tax_rate=utils.get_pydantic_model( + tax_rate, Optional[models.LinkedTaxRateInput] + ), + rate_required=rate_required, + default_rate=default_rate, + row_version=row_version, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/accounting/expense-categories", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingExpenseCategoriesAddGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.expense_category, + False, + False, + "json", + models.ExpenseCategoryInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="accounting.expenseCategoriesAdd", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.AccountingExpenseCategoriesAddResponse( + create_expense_category_response=unmarshal_json_response( + Optional[models.CreateExpenseCategoryResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseCategoriesAddResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + def get( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseCategoriesOneResponse: + r"""Get Expense Category + + Get Expense Category + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :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.AccountingExpenseCategoriesOneRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + fields=fields, + ) + + req = self._build_request( + method="GET", + path="/accounting/expense-categories/{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, + _globals=models.AccountingExpenseCategoriesOneGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.expenseCategoriesOne", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseCategoriesOneResponse( + get_expense_category_response=unmarshal_json_response( + Optional[models.GetExpenseCategoryResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseCategoriesOneResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def get_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseCategoriesOneResponse: + r"""Get Expense Category + + Get Expense Category + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :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.AccountingExpenseCategoriesOneRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + fields=fields, + ) + + req = self._build_request_async( + method="GET", + path="/accounting/expense-categories/{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, + _globals=models.AccountingExpenseCategoriesOneGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="accounting.expenseCategoriesOne", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseCategoriesOneResponse( + get_expense_category_response=unmarshal_json_response( + Optional[models.GetExpenseCategoryResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseCategoriesOneResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + def update( + self, + *, + id: str, + name: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + display_id: OptionalNullable[str] = UNSET, + code: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.ExpenseCategoryStatus] = UNSET, + account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + offset_account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + tax_rate: Optional[ + Union[models.LinkedTaxRateInput, models.LinkedTaxRateInputTypedDict] + ] = None, + rate_required: OptionalNullable[bool] = UNSET, + default_rate: OptionalNullable[float] = UNSET, + row_version: OptionalNullable[str] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseCategoriesUpdateResponse: + r"""Update Expense Category + + Update Expense Category + + :param id: ID of the record you are acting upon. + :param name: The name of the expense category. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param display_id: Id to be displayed. + :param code: The code or external identifier of the expense category. + :param description: The description of the expense category. + :param status: The status of the expense category. + :param account: + :param offset_account: + :param tax_rate: + :param rate_required: Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). + :param default_rate: Default rate when rate_required is true (e.g. 0.67 for mileage). + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.AccountingExpenseCategoriesUpdateRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + expense_category=models.ExpenseCategoryInput( + display_id=display_id, + name=name, + code=code, + description=description, + status=status, + account=utils.get_pydantic_model( + account, OptionalNullable[models.LinkedLedgerAccount] + ), + offset_account=utils.get_pydantic_model( + offset_account, OptionalNullable[models.LinkedLedgerAccount] + ), + tax_rate=utils.get_pydantic_model( + tax_rate, Optional[models.LinkedTaxRateInput] + ), + rate_required=rate_required, + default_rate=default_rate, + row_version=row_version, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request( + method="PATCH", + path="/accounting/expense-categories/{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, + _globals=models.AccountingExpenseCategoriesUpdateGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.expense_category, + False, + False, + "json", + models.ExpenseCategoryInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.expenseCategoriesUpdate", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseCategoriesUpdateResponse( + update_expense_category_response=unmarshal_json_response( + Optional[models.UpdateExpenseCategoryResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseCategoriesUpdateResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def update_async( + self, + *, + id: str, + name: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + display_id: OptionalNullable[str] = UNSET, + code: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.ExpenseCategoryStatus] = UNSET, + account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + offset_account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + tax_rate: Optional[ + Union[models.LinkedTaxRateInput, models.LinkedTaxRateInputTypedDict] + ] = None, + rate_required: OptionalNullable[bool] = UNSET, + default_rate: OptionalNullable[float] = UNSET, + row_version: OptionalNullable[str] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseCategoriesUpdateResponse: + r"""Update Expense Category + + Update Expense Category + + :param id: ID of the record you are acting upon. + :param name: The name of the expense category. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param display_id: Id to be displayed. + :param code: The code or external identifier of the expense category. + :param description: The description of the expense category. + :param status: The status of the expense category. + :param account: + :param offset_account: + :param tax_rate: + :param rate_required: Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile). + :param default_rate: Default rate when rate_required is true (e.g. 0.67 for mileage). + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.AccountingExpenseCategoriesUpdateRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + expense_category=models.ExpenseCategoryInput( + display_id=display_id, + name=name, + code=code, + description=description, + status=status, + account=utils.get_pydantic_model( + account, OptionalNullable[models.LinkedLedgerAccount] + ), + offset_account=utils.get_pydantic_model( + offset_account, OptionalNullable[models.LinkedLedgerAccount] + ), + tax_rate=utils.get_pydantic_model( + tax_rate, Optional[models.LinkedTaxRateInput] + ), + rate_required=rate_required, + default_rate=default_rate, + row_version=row_version, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/accounting/expense-categories/{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, + _globals=models.AccountingExpenseCategoriesUpdateGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.expense_category, + False, + False, + "json", + models.ExpenseCategoryInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="accounting.expenseCategoriesUpdate", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseCategoriesUpdateResponse( + update_expense_category_response=unmarshal_json_response( + Optional[models.UpdateExpenseCategoryResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseCategoriesUpdateResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + def delete( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseCategoriesDeleteResponse: + r"""Delete Expense Category + + Delete Expense Category + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :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.AccountingExpenseCategoriesDeleteRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + ) + + req = self._build_request( + method="DELETE", + path="/accounting/expense-categories/{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, + _globals=models.AccountingExpenseCategoriesDeleteGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.expenseCategoriesDelete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseCategoriesDeleteResponse( + delete_expense_category_response=unmarshal_json_response( + Optional[models.DeleteExpenseCategoryResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseCategoriesDeleteResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseCategoriesDeleteResponse: + r"""Delete Expense Category + + Delete Expense Category + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :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.AccountingExpenseCategoriesDeleteRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + ) + + req = self._build_request_async( + method="DELETE", + path="/accounting/expense-categories/{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, + _globals=models.AccountingExpenseCategoriesDeleteGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="accounting.expenseCategoriesDelete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseCategoriesDeleteResponse( + delete_expense_category_response=unmarshal_json_response( + Optional[models.DeleteExpenseCategoryResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseCategoriesDeleteResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) diff --git a/src/apideck_unify/expensereports.py b/src/apideck_unify/expensereports.py new file mode 100644 index 00000000..902eac7c --- /dev/null +++ b/src/apideck_unify/expensereports.py @@ -0,0 +1,2039 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from apideck_unify import models, utils +from apideck_unify._hooks import HookContext +from apideck_unify.types import Nullable, OptionalNullable, UNSET +from apideck_unify.utils import get_security_from_env +from apideck_unify.utils.unmarshal_json_response import unmarshal_json_response +from datetime import date, datetime +from jsonpath import JSONPath +from typing import Any, Dict, List, Mapping, Optional, Union + + +class ExpenseReports(BaseSDK): + def list( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 20, + fields: OptionalNullable[str] = UNSET, + filter_: Optional[ + Union[models.ExpenseReportsFilter, models.ExpenseReportsFilterTypedDict] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.AccountingExpenseReportsAllResponse]: + r"""List Expense Reports + + List Expense Reports + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param filter_: Apply filters + :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.AccountingExpenseReportsAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + fields=fields, + filter_=utils.get_pydantic_model( + filter_, Optional[models.ExpenseReportsFilter] + ), + ) + + req = self._build_request( + method="GET", + path="/accounting/expense-reports", + 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, + _globals=models.AccountingExpenseReportsAllGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.expenseReportsAll", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.AccountingExpenseReportsAllResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.meta.cursors.next").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + fields=fields, + filter_=filter_, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseReportsAllResponse( + get_expense_reports_response=unmarshal_json_response( + Optional[models.GetExpenseReportsResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseReportsAllResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + raise models.APIError("Unexpected response received", http_res) + + async def list_async( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 20, + fields: OptionalNullable[str] = UNSET, + filter_: Optional[ + Union[models.ExpenseReportsFilter, models.ExpenseReportsFilterTypedDict] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.AccountingExpenseReportsAllResponse]: + r"""List Expense Reports + + List Expense Reports + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param filter_: Apply filters + :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.AccountingExpenseReportsAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + fields=fields, + filter_=utils.get_pydantic_model( + filter_, Optional[models.ExpenseReportsFilter] + ), + ) + + req = self._build_request_async( + method="GET", + path="/accounting/expense-reports", + 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, + _globals=models.AccountingExpenseReportsAllGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="accounting.expenseReportsAll", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.AccountingExpenseReportsAllResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.meta.cursors.next").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + fields=fields, + filter_=filter_, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseReportsAllResponse( + get_expense_reports_response=unmarshal_json_response( + Optional[models.GetExpenseReportsResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseReportsAllResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + raise models.APIError("Unexpected response received", http_res) + + def create( + self, + *, + employee: Union[ + models.ExpenseReportEmployee, models.ExpenseReportEmployeeTypedDict + ], + transaction_date: Nullable[datetime], + line_items: Union[ + List[models.ExpenseReportLineItemInput], + List[models.ExpenseReportLineItemInputTypedDict], + ], + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + display_id: OptionalNullable[str] = UNSET, + number: OptionalNullable[str] = UNSET, + title: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.ExpenseReportStatus] = UNSET, + posting_date: OptionalNullable[date] = UNSET, + due_date: OptionalNullable[date] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + currency_rate: OptionalNullable[float] = UNSET, + sub_total: OptionalNullable[float] = UNSET, + total_tax: OptionalNullable[float] = UNSET, + total_amount: OptionalNullable[float] = UNSET, + reimbursable_amount: OptionalNullable[float] = UNSET, + memo: OptionalNullable[str] = UNSET, + department: OptionalNullable[ + Union[models.LinkedDepartmentInput, models.LinkedDepartmentInputTypedDict] + ] = UNSET, + location: OptionalNullable[ + Union[models.LinkedLocationInput, models.LinkedLocationInputTypedDict] + ] = UNSET, + account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + accounting_period: OptionalNullable[ + Union[models.AccountingPeriod, models.AccountingPeriodTypedDict] + ] = UNSET, + subsidiary: OptionalNullable[ + Union[models.LinkedSubsidiaryInput, models.LinkedSubsidiaryInputTypedDict] + ] = UNSET, + tracking_categories: OptionalNullable[ + Union[ + List[Nullable[models.LinkedTrackingCategory]], + List[Nullable[models.LinkedTrackingCategoryTypedDict]], + ] + ] = UNSET, + tax_inclusive: OptionalNullable[bool] = UNSET, + approved_by: OptionalNullable[ + Union[models.ApprovedBy, models.ApprovedByTypedDict] + ] = UNSET, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + row_version: OptionalNullable[str] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseReportsAddResponse: + r"""Create Expense Report + + Create Expense Report + + :param employee: The employee who submitted the expense report. + :param transaction_date: The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + :param line_items: Expense line items linked to this expense report. + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param display_id: Id to be displayed. + :param number: The expense report number. + :param title: Title or purpose of the expense report. + :param status: The status of the expense report. + :param posting_date: The date the expense report was posted to the general ledger. + :param due_date: Date when reimbursement is due. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param currency_rate: Currency Exchange Rate at the time entity was recorded/generated. + :param sub_total: Subtotal amount, normally before tax. + :param total_tax: Total tax amount applied to this transaction. + :param total_amount: Total amount of all expense lines including tax. + :param reimbursable_amount: Total reimbursable amount (may differ from total if some expenses are non-reimbursable). + :param memo: The memo of the expense report. + :param department: + :param location: + :param account: + :param accounting_period: The accounting period the expense report is posted to. + :param subsidiary: + :param tracking_categories: A list of linked tracking categories. + :param tax_inclusive: Amounts are including tax + :param approved_by: The person who approved the expense report. + :param custom_fields: + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.AccountingExpenseReportsAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + expense_report=models.ExpenseReportInput( + display_id=display_id, + number=number, + title=title, + employee=utils.get_pydantic_model( + employee, models.ExpenseReportEmployee + ), + status=status, + transaction_date=transaction_date, + posting_date=posting_date, + due_date=due_date, + currency=currency, + currency_rate=currency_rate, + sub_total=sub_total, + total_tax=total_tax, + total_amount=total_amount, + reimbursable_amount=reimbursable_amount, + memo=memo, + department=utils.get_pydantic_model( + department, OptionalNullable[models.LinkedDepartmentInput] + ), + location=utils.get_pydantic_model( + location, OptionalNullable[models.LinkedLocationInput] + ), + account=utils.get_pydantic_model( + account, OptionalNullable[models.LinkedLedgerAccount] + ), + accounting_period=utils.get_pydantic_model( + accounting_period, OptionalNullable[models.AccountingPeriod] + ), + line_items=utils.get_pydantic_model( + line_items, List[models.ExpenseReportLineItemInput] + ), + subsidiary=utils.get_pydantic_model( + subsidiary, OptionalNullable[models.LinkedSubsidiaryInput] + ), + tracking_categories=utils.get_pydantic_model( + tracking_categories, + OptionalNullable[List[Nullable[models.LinkedTrackingCategory]]], + ), + tax_inclusive=tax_inclusive, + approved_by=utils.get_pydantic_model( + approved_by, OptionalNullable[models.ApprovedBy] + ), + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + row_version=row_version, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/accounting/expense-reports", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingExpenseReportsAddGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.expense_report, False, False, "json", models.ExpenseReportInput + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.expenseReportsAdd", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.AccountingExpenseReportsAddResponse( + create_expense_report_response=unmarshal_json_response( + Optional[models.CreateExpenseReportResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseReportsAddResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def create_async( + self, + *, + employee: Union[ + models.ExpenseReportEmployee, models.ExpenseReportEmployeeTypedDict + ], + transaction_date: Nullable[datetime], + line_items: Union[ + List[models.ExpenseReportLineItemInput], + List[models.ExpenseReportLineItemInputTypedDict], + ], + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + display_id: OptionalNullable[str] = UNSET, + number: OptionalNullable[str] = UNSET, + title: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.ExpenseReportStatus] = UNSET, + posting_date: OptionalNullable[date] = UNSET, + due_date: OptionalNullable[date] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + currency_rate: OptionalNullable[float] = UNSET, + sub_total: OptionalNullable[float] = UNSET, + total_tax: OptionalNullable[float] = UNSET, + total_amount: OptionalNullable[float] = UNSET, + reimbursable_amount: OptionalNullable[float] = UNSET, + memo: OptionalNullable[str] = UNSET, + department: OptionalNullable[ + Union[models.LinkedDepartmentInput, models.LinkedDepartmentInputTypedDict] + ] = UNSET, + location: OptionalNullable[ + Union[models.LinkedLocationInput, models.LinkedLocationInputTypedDict] + ] = UNSET, + account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + accounting_period: OptionalNullable[ + Union[models.AccountingPeriod, models.AccountingPeriodTypedDict] + ] = UNSET, + subsidiary: OptionalNullable[ + Union[models.LinkedSubsidiaryInput, models.LinkedSubsidiaryInputTypedDict] + ] = UNSET, + tracking_categories: OptionalNullable[ + Union[ + List[Nullable[models.LinkedTrackingCategory]], + List[Nullable[models.LinkedTrackingCategoryTypedDict]], + ] + ] = UNSET, + tax_inclusive: OptionalNullable[bool] = UNSET, + approved_by: OptionalNullable[ + Union[models.ApprovedBy, models.ApprovedByTypedDict] + ] = UNSET, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + row_version: OptionalNullable[str] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseReportsAddResponse: + r"""Create Expense Report + + Create Expense Report + + :param employee: The employee who submitted the expense report. + :param transaction_date: The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + :param line_items: Expense line items linked to this expense report. + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param display_id: Id to be displayed. + :param number: The expense report number. + :param title: Title or purpose of the expense report. + :param status: The status of the expense report. + :param posting_date: The date the expense report was posted to the general ledger. + :param due_date: Date when reimbursement is due. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param currency_rate: Currency Exchange Rate at the time entity was recorded/generated. + :param sub_total: Subtotal amount, normally before tax. + :param total_tax: Total tax amount applied to this transaction. + :param total_amount: Total amount of all expense lines including tax. + :param reimbursable_amount: Total reimbursable amount (may differ from total if some expenses are non-reimbursable). + :param memo: The memo of the expense report. + :param department: + :param location: + :param account: + :param accounting_period: The accounting period the expense report is posted to. + :param subsidiary: + :param tracking_categories: A list of linked tracking categories. + :param tax_inclusive: Amounts are including tax + :param approved_by: The person who approved the expense report. + :param custom_fields: + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.AccountingExpenseReportsAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + expense_report=models.ExpenseReportInput( + display_id=display_id, + number=number, + title=title, + employee=utils.get_pydantic_model( + employee, models.ExpenseReportEmployee + ), + status=status, + transaction_date=transaction_date, + posting_date=posting_date, + due_date=due_date, + currency=currency, + currency_rate=currency_rate, + sub_total=sub_total, + total_tax=total_tax, + total_amount=total_amount, + reimbursable_amount=reimbursable_amount, + memo=memo, + department=utils.get_pydantic_model( + department, OptionalNullable[models.LinkedDepartmentInput] + ), + location=utils.get_pydantic_model( + location, OptionalNullable[models.LinkedLocationInput] + ), + account=utils.get_pydantic_model( + account, OptionalNullable[models.LinkedLedgerAccount] + ), + accounting_period=utils.get_pydantic_model( + accounting_period, OptionalNullable[models.AccountingPeriod] + ), + line_items=utils.get_pydantic_model( + line_items, List[models.ExpenseReportLineItemInput] + ), + subsidiary=utils.get_pydantic_model( + subsidiary, OptionalNullable[models.LinkedSubsidiaryInput] + ), + tracking_categories=utils.get_pydantic_model( + tracking_categories, + OptionalNullable[List[Nullable[models.LinkedTrackingCategory]]], + ), + tax_inclusive=tax_inclusive, + approved_by=utils.get_pydantic_model( + approved_by, OptionalNullable[models.ApprovedBy] + ), + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + row_version=row_version, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/accounting/expense-reports", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingExpenseReportsAddGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.expense_report, False, False, "json", models.ExpenseReportInput + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="accounting.expenseReportsAdd", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.AccountingExpenseReportsAddResponse( + create_expense_report_response=unmarshal_json_response( + Optional[models.CreateExpenseReportResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseReportsAddResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + def get( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseReportsOneResponse: + r"""Get Expense Report + + Get Expense Report + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :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.AccountingExpenseReportsOneRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + fields=fields, + ) + + req = self._build_request( + method="GET", + path="/accounting/expense-reports/{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, + _globals=models.AccountingExpenseReportsOneGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.expenseReportsOne", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseReportsOneResponse( + get_expense_report_response=unmarshal_json_response( + Optional[models.GetExpenseReportResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseReportsOneResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def get_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseReportsOneResponse: + r"""Get Expense Report + + Get Expense Report + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :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.AccountingExpenseReportsOneRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + fields=fields, + ) + + req = self._build_request_async( + method="GET", + path="/accounting/expense-reports/{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, + _globals=models.AccountingExpenseReportsOneGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="accounting.expenseReportsOne", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseReportsOneResponse( + get_expense_report_response=unmarshal_json_response( + Optional[models.GetExpenseReportResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseReportsOneResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + def update( + self, + *, + id: str, + employee: Union[ + models.ExpenseReportEmployee, models.ExpenseReportEmployeeTypedDict + ], + transaction_date: Nullable[datetime], + line_items: Union[ + List[models.ExpenseReportLineItemInput], + List[models.ExpenseReportLineItemInputTypedDict], + ], + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + display_id: OptionalNullable[str] = UNSET, + number: OptionalNullable[str] = UNSET, + title: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.ExpenseReportStatus] = UNSET, + posting_date: OptionalNullable[date] = UNSET, + due_date: OptionalNullable[date] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + currency_rate: OptionalNullable[float] = UNSET, + sub_total: OptionalNullable[float] = UNSET, + total_tax: OptionalNullable[float] = UNSET, + total_amount: OptionalNullable[float] = UNSET, + reimbursable_amount: OptionalNullable[float] = UNSET, + memo: OptionalNullable[str] = UNSET, + department: OptionalNullable[ + Union[models.LinkedDepartmentInput, models.LinkedDepartmentInputTypedDict] + ] = UNSET, + location: OptionalNullable[ + Union[models.LinkedLocationInput, models.LinkedLocationInputTypedDict] + ] = UNSET, + account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + accounting_period: OptionalNullable[ + Union[models.AccountingPeriod, models.AccountingPeriodTypedDict] + ] = UNSET, + subsidiary: OptionalNullable[ + Union[models.LinkedSubsidiaryInput, models.LinkedSubsidiaryInputTypedDict] + ] = UNSET, + tracking_categories: OptionalNullable[ + Union[ + List[Nullable[models.LinkedTrackingCategory]], + List[Nullable[models.LinkedTrackingCategoryTypedDict]], + ] + ] = UNSET, + tax_inclusive: OptionalNullable[bool] = UNSET, + approved_by: OptionalNullable[ + Union[models.ApprovedBy, models.ApprovedByTypedDict] + ] = UNSET, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + row_version: OptionalNullable[str] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseReportsUpdateResponse: + r"""Update Expense Report + + Update Expense Report + + :param id: ID of the record you are acting upon. + :param employee: The employee who submitted the expense report. + :param transaction_date: The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + :param line_items: Expense line items linked to this expense report. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param display_id: Id to be displayed. + :param number: The expense report number. + :param title: Title or purpose of the expense report. + :param status: The status of the expense report. + :param posting_date: The date the expense report was posted to the general ledger. + :param due_date: Date when reimbursement is due. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param currency_rate: Currency Exchange Rate at the time entity was recorded/generated. + :param sub_total: Subtotal amount, normally before tax. + :param total_tax: Total tax amount applied to this transaction. + :param total_amount: Total amount of all expense lines including tax. + :param reimbursable_amount: Total reimbursable amount (may differ from total if some expenses are non-reimbursable). + :param memo: The memo of the expense report. + :param department: + :param location: + :param account: + :param accounting_period: The accounting period the expense report is posted to. + :param subsidiary: + :param tracking_categories: A list of linked tracking categories. + :param tax_inclusive: Amounts are including tax + :param approved_by: The person who approved the expense report. + :param custom_fields: + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.AccountingExpenseReportsUpdateRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + expense_report=models.ExpenseReportInput( + display_id=display_id, + number=number, + title=title, + employee=utils.get_pydantic_model( + employee, models.ExpenseReportEmployee + ), + status=status, + transaction_date=transaction_date, + posting_date=posting_date, + due_date=due_date, + currency=currency, + currency_rate=currency_rate, + sub_total=sub_total, + total_tax=total_tax, + total_amount=total_amount, + reimbursable_amount=reimbursable_amount, + memo=memo, + department=utils.get_pydantic_model( + department, OptionalNullable[models.LinkedDepartmentInput] + ), + location=utils.get_pydantic_model( + location, OptionalNullable[models.LinkedLocationInput] + ), + account=utils.get_pydantic_model( + account, OptionalNullable[models.LinkedLedgerAccount] + ), + accounting_period=utils.get_pydantic_model( + accounting_period, OptionalNullable[models.AccountingPeriod] + ), + line_items=utils.get_pydantic_model( + line_items, List[models.ExpenseReportLineItemInput] + ), + subsidiary=utils.get_pydantic_model( + subsidiary, OptionalNullable[models.LinkedSubsidiaryInput] + ), + tracking_categories=utils.get_pydantic_model( + tracking_categories, + OptionalNullable[List[Nullable[models.LinkedTrackingCategory]]], + ), + tax_inclusive=tax_inclusive, + approved_by=utils.get_pydantic_model( + approved_by, OptionalNullable[models.ApprovedBy] + ), + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + row_version=row_version, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request( + method="PATCH", + path="/accounting/expense-reports/{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, + _globals=models.AccountingExpenseReportsUpdateGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.expense_report, False, False, "json", models.ExpenseReportInput + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.expenseReportsUpdate", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseReportsUpdateResponse( + update_expense_report_response=unmarshal_json_response( + Optional[models.UpdateExpenseReportResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseReportsUpdateResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def update_async( + self, + *, + id: str, + employee: Union[ + models.ExpenseReportEmployee, models.ExpenseReportEmployeeTypedDict + ], + transaction_date: Nullable[datetime], + line_items: Union[ + List[models.ExpenseReportLineItemInput], + List[models.ExpenseReportLineItemInputTypedDict], + ], + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + display_id: OptionalNullable[str] = UNSET, + number: OptionalNullable[str] = UNSET, + title: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.ExpenseReportStatus] = UNSET, + posting_date: OptionalNullable[date] = UNSET, + due_date: OptionalNullable[date] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + currency_rate: OptionalNullable[float] = UNSET, + sub_total: OptionalNullable[float] = UNSET, + total_tax: OptionalNullable[float] = UNSET, + total_amount: OptionalNullable[float] = UNSET, + reimbursable_amount: OptionalNullable[float] = UNSET, + memo: OptionalNullable[str] = UNSET, + department: OptionalNullable[ + Union[models.LinkedDepartmentInput, models.LinkedDepartmentInputTypedDict] + ] = UNSET, + location: OptionalNullable[ + Union[models.LinkedLocationInput, models.LinkedLocationInputTypedDict] + ] = UNSET, + account: OptionalNullable[ + Union[models.LinkedLedgerAccount, models.LinkedLedgerAccountTypedDict] + ] = UNSET, + accounting_period: OptionalNullable[ + Union[models.AccountingPeriod, models.AccountingPeriodTypedDict] + ] = UNSET, + subsidiary: OptionalNullable[ + Union[models.LinkedSubsidiaryInput, models.LinkedSubsidiaryInputTypedDict] + ] = UNSET, + tracking_categories: OptionalNullable[ + Union[ + List[Nullable[models.LinkedTrackingCategory]], + List[Nullable[models.LinkedTrackingCategoryTypedDict]], + ] + ] = UNSET, + tax_inclusive: OptionalNullable[bool] = UNSET, + approved_by: OptionalNullable[ + Union[models.ApprovedBy, models.ApprovedByTypedDict] + ] = UNSET, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + row_version: OptionalNullable[str] = UNSET, + pass_through: Optional[ + Union[List[models.PassThroughBody], List[models.PassThroughBodyTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseReportsUpdateResponse: + r"""Update Expense Report + + Update Expense Report + + :param id: ID of the record you are acting upon. + :param employee: The employee who submitted the expense report. + :param transaction_date: The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD + :param line_items: Expense line items linked to this expense report. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param display_id: Id to be displayed. + :param number: The expense report number. + :param title: Title or purpose of the expense report. + :param status: The status of the expense report. + :param posting_date: The date the expense report was posted to the general ledger. + :param due_date: Date when reimbursement is due. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param currency_rate: Currency Exchange Rate at the time entity was recorded/generated. + :param sub_total: Subtotal amount, normally before tax. + :param total_tax: Total tax amount applied to this transaction. + :param total_amount: Total amount of all expense lines including tax. + :param reimbursable_amount: Total reimbursable amount (may differ from total if some expenses are non-reimbursable). + :param memo: The memo of the expense report. + :param department: + :param location: + :param account: + :param accounting_period: The accounting period the expense report is posted to. + :param subsidiary: + :param tracking_categories: A list of linked tracking categories. + :param tax_inclusive: Amounts are including tax + :param approved_by: The person who approved the expense report. + :param custom_fields: + :param row_version: A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. + :param pass_through: The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. + :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.AccountingExpenseReportsUpdateRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + expense_report=models.ExpenseReportInput( + display_id=display_id, + number=number, + title=title, + employee=utils.get_pydantic_model( + employee, models.ExpenseReportEmployee + ), + status=status, + transaction_date=transaction_date, + posting_date=posting_date, + due_date=due_date, + currency=currency, + currency_rate=currency_rate, + sub_total=sub_total, + total_tax=total_tax, + total_amount=total_amount, + reimbursable_amount=reimbursable_amount, + memo=memo, + department=utils.get_pydantic_model( + department, OptionalNullable[models.LinkedDepartmentInput] + ), + location=utils.get_pydantic_model( + location, OptionalNullable[models.LinkedLocationInput] + ), + account=utils.get_pydantic_model( + account, OptionalNullable[models.LinkedLedgerAccount] + ), + accounting_period=utils.get_pydantic_model( + accounting_period, OptionalNullable[models.AccountingPeriod] + ), + line_items=utils.get_pydantic_model( + line_items, List[models.ExpenseReportLineItemInput] + ), + subsidiary=utils.get_pydantic_model( + subsidiary, OptionalNullable[models.LinkedSubsidiaryInput] + ), + tracking_categories=utils.get_pydantic_model( + tracking_categories, + OptionalNullable[List[Nullable[models.LinkedTrackingCategory]]], + ), + tax_inclusive=tax_inclusive, + approved_by=utils.get_pydantic_model( + approved_by, OptionalNullable[models.ApprovedBy] + ), + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + row_version=row_version, + pass_through=utils.get_pydantic_model( + pass_through, Optional[List[models.PassThroughBody]] + ), + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/accounting/expense-reports/{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, + _globals=models.AccountingExpenseReportsUpdateGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.expense_report, False, False, "json", models.ExpenseReportInput + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="accounting.expenseReportsUpdate", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseReportsUpdateResponse( + update_expense_report_response=unmarshal_json_response( + Optional[models.UpdateExpenseReportResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseReportsUpdateResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + def delete( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseReportsDeleteResponse: + r"""Delete Expense Report + + Delete Expense Report + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :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.AccountingExpenseReportsDeleteRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + ) + + req = self._build_request( + method="DELETE", + path="/accounting/expense-reports/{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, + _globals=models.AccountingExpenseReportsDeleteGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.expenseReportsDelete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseReportsDeleteResponse( + delete_expense_report_response=unmarshal_json_response( + Optional[models.DeleteExpenseReportResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseReportsDeleteResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingExpenseReportsDeleteResponse: + r"""Delete Expense Report + + Delete Expense Report + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :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.AccountingExpenseReportsDeleteRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + ) + + req = self._build_request_async( + method="DELETE", + path="/accounting/expense-reports/{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, + _globals=models.AccountingExpenseReportsDeleteGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + 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 + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 900000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "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="accounting.expenseReportsDelete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingExpenseReportsDeleteResponse( + delete_expense_report_response=unmarshal_json_response( + Optional[models.DeleteExpenseReportResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(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) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingExpenseReportsDeleteResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) diff --git a/src/apideck_unify/hris.py b/src/apideck_unify/hris.py index 45f3ad25..19ba6c44 100644 --- a/src/apideck_unify/hris.py +++ b/src/apideck_unify/hris.py @@ -4,8 +4,8 @@ from .sdkconfiguration import SDKConfiguration from apideck_unify.apideck_companies import ApideckCompanies from apideck_unify.apideck_departments import ApideckDepartments +from apideck_unify.apideck_employees import ApideckEmployees from apideck_unify.employeepayrolls import EmployeePayrolls -from apideck_unify.employees import Employees from apideck_unify.employeeschedules_sdk import EmployeeSchedulesSDK from apideck_unify.payrolls import Payrolls from apideck_unify.timeoffrequests import TimeOffRequests @@ -13,7 +13,7 @@ class Hris(BaseSDK): - employees: Employees + employees: ApideckEmployees companies: ApideckCompanies departments: ApideckDepartments payrolls: Payrolls @@ -29,7 +29,9 @@ def __init__( self._init_sdks() def _init_sdks(self): - self.employees = Employees(self.sdk_configuration, parent_ref=self.parent_ref) + self.employees = ApideckEmployees( + self.sdk_configuration, parent_ref=self.parent_ref + ) self.companies = ApideckCompanies( self.sdk_configuration, parent_ref=self.parent_ref ) diff --git a/src/apideck_unify/models/__init__.py b/src/apideck_unify/models/__init__.py index 06a9790d..84d7565c 100644 --- a/src/apideck_unify/models/__init__.py +++ b/src/apideck_unify/models/__init__.py @@ -416,6 +416,126 @@ AccountingDepartmentsUpdateResponse, AccountingDepartmentsUpdateResponseTypedDict, ) + from .accounting_employeesaddop import ( + AccountingEmployeesAddGlobals, + AccountingEmployeesAddGlobalsTypedDict, + AccountingEmployeesAddRequest, + AccountingEmployeesAddRequestTypedDict, + AccountingEmployeesAddResponse, + AccountingEmployeesAddResponseTypedDict, + ) + from .accounting_employeesallop import ( + AccountingEmployeesAllGlobals, + AccountingEmployeesAllGlobalsTypedDict, + AccountingEmployeesAllRequest, + AccountingEmployeesAllRequestTypedDict, + AccountingEmployeesAllResponse, + AccountingEmployeesAllResponseTypedDict, + ) + from .accounting_employeesdeleteop import ( + AccountingEmployeesDeleteGlobals, + AccountingEmployeesDeleteGlobalsTypedDict, + AccountingEmployeesDeleteRequest, + AccountingEmployeesDeleteRequestTypedDict, + AccountingEmployeesDeleteResponse, + AccountingEmployeesDeleteResponseTypedDict, + ) + from .accounting_employeesoneop import ( + AccountingEmployeesOneGlobals, + AccountingEmployeesOneGlobalsTypedDict, + AccountingEmployeesOneRequest, + AccountingEmployeesOneRequestTypedDict, + AccountingEmployeesOneResponse, + AccountingEmployeesOneResponseTypedDict, + ) + from .accounting_employeesupdateop import ( + AccountingEmployeesUpdateGlobals, + AccountingEmployeesUpdateGlobalsTypedDict, + AccountingEmployeesUpdateRequest, + AccountingEmployeesUpdateRequestTypedDict, + AccountingEmployeesUpdateResponse, + AccountingEmployeesUpdateResponseTypedDict, + ) + from .accounting_expensecategoriesaddop import ( + AccountingExpenseCategoriesAddGlobals, + AccountingExpenseCategoriesAddGlobalsTypedDict, + AccountingExpenseCategoriesAddRequest, + AccountingExpenseCategoriesAddRequestTypedDict, + AccountingExpenseCategoriesAddResponse, + AccountingExpenseCategoriesAddResponseTypedDict, + ) + from .accounting_expensecategoriesallop import ( + AccountingExpenseCategoriesAllGlobals, + AccountingExpenseCategoriesAllGlobalsTypedDict, + AccountingExpenseCategoriesAllRequest, + AccountingExpenseCategoriesAllRequestTypedDict, + AccountingExpenseCategoriesAllResponse, + AccountingExpenseCategoriesAllResponseTypedDict, + ) + from .accounting_expensecategoriesdeleteop import ( + AccountingExpenseCategoriesDeleteGlobals, + AccountingExpenseCategoriesDeleteGlobalsTypedDict, + AccountingExpenseCategoriesDeleteRequest, + AccountingExpenseCategoriesDeleteRequestTypedDict, + AccountingExpenseCategoriesDeleteResponse, + AccountingExpenseCategoriesDeleteResponseTypedDict, + ) + from .accounting_expensecategoriesoneop import ( + AccountingExpenseCategoriesOneGlobals, + AccountingExpenseCategoriesOneGlobalsTypedDict, + AccountingExpenseCategoriesOneRequest, + AccountingExpenseCategoriesOneRequestTypedDict, + AccountingExpenseCategoriesOneResponse, + AccountingExpenseCategoriesOneResponseTypedDict, + ) + from .accounting_expensecategoriesupdateop import ( + AccountingExpenseCategoriesUpdateGlobals, + AccountingExpenseCategoriesUpdateGlobalsTypedDict, + AccountingExpenseCategoriesUpdateRequest, + AccountingExpenseCategoriesUpdateRequestTypedDict, + AccountingExpenseCategoriesUpdateResponse, + AccountingExpenseCategoriesUpdateResponseTypedDict, + ) + from .accounting_expensereportsaddop import ( + AccountingExpenseReportsAddGlobals, + AccountingExpenseReportsAddGlobalsTypedDict, + AccountingExpenseReportsAddRequest, + AccountingExpenseReportsAddRequestTypedDict, + AccountingExpenseReportsAddResponse, + AccountingExpenseReportsAddResponseTypedDict, + ) + from .accounting_expensereportsallop import ( + AccountingExpenseReportsAllGlobals, + AccountingExpenseReportsAllGlobalsTypedDict, + AccountingExpenseReportsAllRequest, + AccountingExpenseReportsAllRequestTypedDict, + AccountingExpenseReportsAllResponse, + AccountingExpenseReportsAllResponseTypedDict, + ) + from .accounting_expensereportsdeleteop import ( + AccountingExpenseReportsDeleteGlobals, + AccountingExpenseReportsDeleteGlobalsTypedDict, + AccountingExpenseReportsDeleteRequest, + AccountingExpenseReportsDeleteRequestTypedDict, + AccountingExpenseReportsDeleteResponse, + AccountingExpenseReportsDeleteResponseTypedDict, + ) + from .accounting_expensereportsoneop import ( + AccountingExpenseReportsOneGlobals, + AccountingExpenseReportsOneGlobalsTypedDict, + AccountingExpenseReportsOneRequest, + AccountingExpenseReportsOneRequestTypedDict, + AccountingExpenseReportsOneResponse, + AccountingExpenseReportsOneResponseTypedDict, + ) + from .accounting_expensereportsupdateop import ( + AccountingExpenseReportsUpdateGlobals, + AccountingExpenseReportsUpdateGlobalsTypedDict, + AccountingExpenseReportsUpdateRequest, + AccountingExpenseReportsUpdateRequestTypedDict, + AccountingExpenseReportsUpdateResponse, + AccountingExpenseReportsUpdateResponseTypedDict, + ) from .accounting_expensesaddop import ( AccountingExpensesAddGlobals, AccountingExpensesAddGlobalsTypedDict, @@ -1003,6 +1123,20 @@ AccountingDepartmentsFilter, AccountingDepartmentsFilterTypedDict, ) + from .accountingemployee import ( + AccountingEmployee, + AccountingEmployeeInput, + AccountingEmployeeInputTypedDict, + AccountingEmployeeManager, + AccountingEmployeeManagerTypedDict, + AccountingEmployeeTypedDict, + EmployeeStatus, + ) + from .accountingemployeesfilter import ( + AccountingEmployeesFilter, + AccountingEmployeesFilterStatus, + AccountingEmployeesFilterTypedDict, + ) from .accountinglocation import ( AccountingLocation, AccountingLocationInput, @@ -1473,6 +1607,10 @@ CreateAccountingDepartmentResponse, CreateAccountingDepartmentResponseTypedDict, ) + from .createaccountingemployeeresponse import ( + CreateAccountingEmployeeResponse, + CreateAccountingEmployeeResponseTypedDict, + ) from .createaccountinglocationresponse import ( CreateAccountingLocationResponse, CreateAccountingLocationResponseTypedDict, @@ -1570,6 +1708,14 @@ CreateEmployeeResponse, CreateEmployeeResponseTypedDict, ) + from .createexpensecategoryresponse import ( + CreateExpenseCategoryResponse, + CreateExpenseCategoryResponseTypedDict, + ) + from .createexpensereportresponse import ( + CreateExpenseReportResponse, + CreateExpenseReportResponseTypedDict, + ) from .createexpenseresponse import ( CreateExpenseResponse, CreateExpenseResponseTypedDict, @@ -2158,6 +2304,10 @@ DeleteAccountingDepartmentResponse, DeleteAccountingDepartmentResponseTypedDict, ) + from .deleteaccountingemployeeresponse import ( + DeleteAccountingEmployeeResponse, + DeleteAccountingEmployeeResponseTypedDict, + ) from .deleteaccountinglocationresponse import ( DeleteAccountingLocationResponse, DeleteAccountingLocationResponseTypedDict, @@ -2242,6 +2392,14 @@ DeleteEmployeeResponse, DeleteEmployeeResponseTypedDict, ) + from .deleteexpensecategoryresponse import ( + DeleteExpenseCategoryResponse, + DeleteExpenseCategoryResponseTypedDict, + ) + from .deleteexpensereportresponse import ( + DeleteExpenseReportResponse, + DeleteExpenseReportResponseTypedDict, + ) from .deleteexpenseresponse import ( DeleteExpenseResponse, DeleteExpenseResponseTypedDict, @@ -2513,11 +2671,49 @@ ExpenseType, ExpenseTypedDict, ) + from .expensecategoriesfilter import ( + ExpenseCategoriesFilter, + ExpenseCategoriesFilterStatus, + ExpenseCategoriesFilterTypedDict, + ) + from .expensecategory import ( + ExpenseCategory, + ExpenseCategoryInput, + ExpenseCategoryInputTypedDict, + ExpenseCategoryStatus, + ExpenseCategoryTypedDict, + ) from .expenselineitem import ExpenseLineItem, ExpenseLineItemTypedDict from .expenselineitem_input import ( ExpenseLineItemInput, ExpenseLineItemInputTypedDict, ) + from .expensereport import ( + AccountingPeriod, + AccountingPeriodTypedDict, + ApprovedBy, + ApprovedByTypedDict, + ExpenseReport, + ExpenseReportEmployee, + ExpenseReportEmployeeTypedDict, + ExpenseReportInput, + ExpenseReportInputTypedDict, + ExpenseReportStatus, + ExpenseReportTypedDict, + ) + from .expensereportlineitem import ( + ExpenseReportLineItem, + ExpenseReportLineItemExpenseCategory, + ExpenseReportLineItemExpenseCategoryTypedDict, + ExpenseReportLineItemInput, + ExpenseReportLineItemInputTypedDict, + ExpenseReportLineItemTypedDict, + ) + from .expensereportsfilter import ( + ExpenseReportsFilter, + ExpenseReportsFilterStatus, + ExpenseReportsFilterTypedDict, + ) from .expensesfilter import ( ExpensesFilter, ExpensesFilterStatus, @@ -2807,6 +3003,14 @@ GetAccountingDepartmentsResponse, GetAccountingDepartmentsResponseTypedDict, ) + from .getaccountingemployeeresponse import ( + GetAccountingEmployeeResponse, + GetAccountingEmployeeResponseTypedDict, + ) + from .getaccountingemployeesresponse import ( + GetAccountingEmployeesResponse, + GetAccountingEmployeesResponseTypedDict, + ) from .getaccountinglocationresponse import ( GetAccountingLocationResponse, GetAccountingLocationResponseTypedDict, @@ -3057,6 +3261,22 @@ GetEmployeesResponse, GetEmployeesResponseTypedDict, ) + from .getexpensecategoriesresponse import ( + GetExpenseCategoriesResponse, + GetExpenseCategoriesResponseTypedDict, + ) + from .getexpensecategoryresponse import ( + GetExpenseCategoryResponse, + GetExpenseCategoryResponseTypedDict, + ) + from .getexpensereportresponse import ( + GetExpenseReportResponse, + GetExpenseReportResponseTypedDict, + ) + from .getexpensereportsresponse import ( + GetExpenseReportsResponse, + GetExpenseReportsResponseTypedDict, + ) from .getexpenseresponse import GetExpenseResponse, GetExpenseResponseTypedDict from .getexpensesresponse import GetExpensesResponse, GetExpensesResponseTypedDict from .getfileresponse import GetFileResponse, GetFileResponseTypedDict @@ -3685,6 +3905,11 @@ LinkedParentCustomerTypedDict, ) from .linkedpurchaseorder import LinkedPurchaseOrder, LinkedPurchaseOrderTypedDict + from .linkedsubsidiary import LinkedSubsidiary, LinkedSubsidiaryTypedDict + from .linkedsubsidiary_input import ( + LinkedSubsidiaryInput, + LinkedSubsidiaryInputTypedDict, + ) from .linkedsupplier import LinkedSupplier, LinkedSupplierTypedDict from .linkedsupplier_input import LinkedSupplierInput, LinkedSupplierInputTypedDict from .linkedtaxdetail import LinkedTaxDetail, LinkedTaxDetailTypedDict @@ -4137,6 +4362,10 @@ UpdateAccountingDepartmentResponse, UpdateAccountingDepartmentResponseTypedDict, ) + from .updateaccountingemployeeresponse import ( + UpdateAccountingEmployeeResponse, + UpdateAccountingEmployeeResponseTypedDict, + ) from .updateaccountinglocationresponse import ( UpdateAccountingLocationResponse, UpdateAccountingLocationResponseTypedDict, @@ -4236,6 +4465,14 @@ UpdateEmployeeResponse, UpdateEmployeeResponseTypedDict, ) + from .updateexpensecategoryresponse import ( + UpdateExpenseCategoryResponse, + UpdateExpenseCategoryResponseTypedDict, + ) + from .updateexpensereportresponse import ( + UpdateExpenseReportResponse, + UpdateExpenseReportResponseTypedDict, + ) from .updateexpenseresponse import ( UpdateExpenseResponse, UpdateExpenseResponseTypedDict, @@ -4944,6 +5181,105 @@ "AccountingDepartmentsUpdateRequestTypedDict", "AccountingDepartmentsUpdateResponse", "AccountingDepartmentsUpdateResponseTypedDict", + "AccountingEmployee", + "AccountingEmployeeInput", + "AccountingEmployeeInputTypedDict", + "AccountingEmployeeManager", + "AccountingEmployeeManagerTypedDict", + "AccountingEmployeeTypedDict", + "AccountingEmployeesAddGlobals", + "AccountingEmployeesAddGlobalsTypedDict", + "AccountingEmployeesAddRequest", + "AccountingEmployeesAddRequestTypedDict", + "AccountingEmployeesAddResponse", + "AccountingEmployeesAddResponseTypedDict", + "AccountingEmployeesAllGlobals", + "AccountingEmployeesAllGlobalsTypedDict", + "AccountingEmployeesAllRequest", + "AccountingEmployeesAllRequestTypedDict", + "AccountingEmployeesAllResponse", + "AccountingEmployeesAllResponseTypedDict", + "AccountingEmployeesDeleteGlobals", + "AccountingEmployeesDeleteGlobalsTypedDict", + "AccountingEmployeesDeleteRequest", + "AccountingEmployeesDeleteRequestTypedDict", + "AccountingEmployeesDeleteResponse", + "AccountingEmployeesDeleteResponseTypedDict", + "AccountingEmployeesFilter", + "AccountingEmployeesFilterStatus", + "AccountingEmployeesFilterTypedDict", + "AccountingEmployeesOneGlobals", + "AccountingEmployeesOneGlobalsTypedDict", + "AccountingEmployeesOneRequest", + "AccountingEmployeesOneRequestTypedDict", + "AccountingEmployeesOneResponse", + "AccountingEmployeesOneResponseTypedDict", + "AccountingEmployeesUpdateGlobals", + "AccountingEmployeesUpdateGlobalsTypedDict", + "AccountingEmployeesUpdateRequest", + "AccountingEmployeesUpdateRequestTypedDict", + "AccountingEmployeesUpdateResponse", + "AccountingEmployeesUpdateResponseTypedDict", + "AccountingExpenseCategoriesAddGlobals", + "AccountingExpenseCategoriesAddGlobalsTypedDict", + "AccountingExpenseCategoriesAddRequest", + "AccountingExpenseCategoriesAddRequestTypedDict", + "AccountingExpenseCategoriesAddResponse", + "AccountingExpenseCategoriesAddResponseTypedDict", + "AccountingExpenseCategoriesAllGlobals", + "AccountingExpenseCategoriesAllGlobalsTypedDict", + "AccountingExpenseCategoriesAllRequest", + "AccountingExpenseCategoriesAllRequestTypedDict", + "AccountingExpenseCategoriesAllResponse", + "AccountingExpenseCategoriesAllResponseTypedDict", + "AccountingExpenseCategoriesDeleteGlobals", + "AccountingExpenseCategoriesDeleteGlobalsTypedDict", + "AccountingExpenseCategoriesDeleteRequest", + "AccountingExpenseCategoriesDeleteRequestTypedDict", + "AccountingExpenseCategoriesDeleteResponse", + "AccountingExpenseCategoriesDeleteResponseTypedDict", + "AccountingExpenseCategoriesOneGlobals", + "AccountingExpenseCategoriesOneGlobalsTypedDict", + "AccountingExpenseCategoriesOneRequest", + "AccountingExpenseCategoriesOneRequestTypedDict", + "AccountingExpenseCategoriesOneResponse", + "AccountingExpenseCategoriesOneResponseTypedDict", + "AccountingExpenseCategoriesUpdateGlobals", + "AccountingExpenseCategoriesUpdateGlobalsTypedDict", + "AccountingExpenseCategoriesUpdateRequest", + "AccountingExpenseCategoriesUpdateRequestTypedDict", + "AccountingExpenseCategoriesUpdateResponse", + "AccountingExpenseCategoriesUpdateResponseTypedDict", + "AccountingExpenseReportsAddGlobals", + "AccountingExpenseReportsAddGlobalsTypedDict", + "AccountingExpenseReportsAddRequest", + "AccountingExpenseReportsAddRequestTypedDict", + "AccountingExpenseReportsAddResponse", + "AccountingExpenseReportsAddResponseTypedDict", + "AccountingExpenseReportsAllGlobals", + "AccountingExpenseReportsAllGlobalsTypedDict", + "AccountingExpenseReportsAllRequest", + "AccountingExpenseReportsAllRequestTypedDict", + "AccountingExpenseReportsAllResponse", + "AccountingExpenseReportsAllResponseTypedDict", + "AccountingExpenseReportsDeleteGlobals", + "AccountingExpenseReportsDeleteGlobalsTypedDict", + "AccountingExpenseReportsDeleteRequest", + "AccountingExpenseReportsDeleteRequestTypedDict", + "AccountingExpenseReportsDeleteResponse", + "AccountingExpenseReportsDeleteResponseTypedDict", + "AccountingExpenseReportsOneGlobals", + "AccountingExpenseReportsOneGlobalsTypedDict", + "AccountingExpenseReportsOneRequest", + "AccountingExpenseReportsOneRequestTypedDict", + "AccountingExpenseReportsOneResponse", + "AccountingExpenseReportsOneResponseTypedDict", + "AccountingExpenseReportsUpdateGlobals", + "AccountingExpenseReportsUpdateGlobalsTypedDict", + "AccountingExpenseReportsUpdateRequest", + "AccountingExpenseReportsUpdateRequestTypedDict", + "AccountingExpenseReportsUpdateResponse", + "AccountingExpenseReportsUpdateResponseTypedDict", "AccountingExpensesAddGlobals", "AccountingExpensesAddGlobalsTypedDict", "AccountingExpensesAddRequest", @@ -5161,6 +5497,8 @@ "AccountingPaymentsUpdateRequestTypedDict", "AccountingPaymentsUpdateResponse", "AccountingPaymentsUpdateResponseTypedDict", + "AccountingPeriod", + "AccountingPeriodTypedDict", "AccountingProfitAndLossOneGlobals", "AccountingProfitAndLossOneGlobalsTypedDict", "AccountingProfitAndLossOneRequest", @@ -5427,6 +5765,8 @@ "ApplicationInputTypedDict", "ApplicationStatus", "ApplicationTypedDict", + "ApprovedBy", + "ApprovedByTypedDict", "Assignee", "AssigneeInput", "AssigneeInputTypedDict", @@ -5751,6 +6091,8 @@ "CoverageTypedDict", "CreateAccountingDepartmentResponse", "CreateAccountingDepartmentResponseTypedDict", + "CreateAccountingEmployeeResponse", + "CreateAccountingEmployeeResponseTypedDict", "CreateAccountingLocationResponse", "CreateAccountingLocationResponseTypedDict", "CreateActivityResponse", @@ -5805,6 +6147,10 @@ "CreateDriveResponseTypedDict", "CreateEmployeeResponse", "CreateEmployeeResponseTypedDict", + "CreateExpenseCategoryResponse", + "CreateExpenseCategoryResponseTypedDict", + "CreateExpenseReportResponse", + "CreateExpenseReportResponseTypedDict", "CreateExpenseResponse", "CreateExpenseResponseTypedDict", "CreateFolderRequest", @@ -6248,6 +6594,8 @@ "DefaultsTypedDict", "DeleteAccountingDepartmentResponse", "DeleteAccountingDepartmentResponseTypedDict", + "DeleteAccountingEmployeeResponse", + "DeleteAccountingEmployeeResponseTypedDict", "DeleteAccountingLocationResponse", "DeleteAccountingLocationResponseTypedDict", "DeleteActivityResponse", @@ -6294,6 +6642,10 @@ "DeleteDriveResponseTypedDict", "DeleteEmployeeResponse", "DeleteEmployeeResponseTypedDict", + "DeleteExpenseCategoryResponse", + "DeleteExpenseCategoryResponseTypedDict", + "DeleteExpenseReportResponse", + "DeleteExpenseReportResponseTypedDict", "DeleteExpenseResponse", "DeleteExpenseResponseTypedDict", "DeleteFileResponse", @@ -6479,6 +6831,7 @@ "EmployeePayrollTypedDict", "EmployeeSchedules", "EmployeeSchedulesTypedDict", + "EmployeeStatus", "EmployeeTypedDict", "EmployeesFilter", "EmployeesFilterEmploymentStatus", @@ -6500,6 +6853,14 @@ "EvenWeeksTypedDict", "EventSource", "Expense", + "ExpenseCategoriesFilter", + "ExpenseCategoriesFilterStatus", + "ExpenseCategoriesFilterTypedDict", + "ExpenseCategory", + "ExpenseCategoryInput", + "ExpenseCategoryInputTypedDict", + "ExpenseCategoryStatus", + "ExpenseCategoryTypedDict", "ExpenseInput", "ExpenseInputTypedDict", "ExpenseLineItem", @@ -6507,6 +6868,22 @@ "ExpenseLineItemInputTypedDict", "ExpenseLineItemTypedDict", "ExpensePaymentType", + "ExpenseReport", + "ExpenseReportEmployee", + "ExpenseReportEmployeeTypedDict", + "ExpenseReportInput", + "ExpenseReportInputTypedDict", + "ExpenseReportLineItem", + "ExpenseReportLineItemExpenseCategory", + "ExpenseReportLineItemExpenseCategoryTypedDict", + "ExpenseReportLineItemInput", + "ExpenseReportLineItemInputTypedDict", + "ExpenseReportLineItemTypedDict", + "ExpenseReportStatus", + "ExpenseReportTypedDict", + "ExpenseReportsFilter", + "ExpenseReportsFilterStatus", + "ExpenseReportsFilterTypedDict", "ExpenseStatus", "ExpenseType", "ExpenseTypedDict", @@ -6753,6 +7130,10 @@ "GetAccountingDepartmentResponseTypedDict", "GetAccountingDepartmentsResponse", "GetAccountingDepartmentsResponseTypedDict", + "GetAccountingEmployeeResponse", + "GetAccountingEmployeeResponseTypedDict", + "GetAccountingEmployeesResponse", + "GetAccountingEmployeesResponseTypedDict", "GetAccountingLocationResponse", "GetAccountingLocationResponseTypedDict", "GetAccountingLocationsResponse", @@ -6895,6 +7276,14 @@ "GetEmployeeSchedulesResponseTypedDict", "GetEmployeesResponse", "GetEmployeesResponseTypedDict", + "GetExpenseCategoriesResponse", + "GetExpenseCategoriesResponseTypedDict", + "GetExpenseCategoryResponse", + "GetExpenseCategoryResponseTypedDict", + "GetExpenseReportResponse", + "GetExpenseReportResponseTypedDict", + "GetExpenseReportsResponse", + "GetExpenseReportsResponseTypedDict", "GetExpenseResponse", "GetExpenseResponseTypedDict", "GetExpensesResponse", @@ -7394,6 +7783,10 @@ "LinkedPurchaseOrderTypedDict", "LinkedResources", "LinkedResourcesTypedDict", + "LinkedSubsidiary", + "LinkedSubsidiaryInput", + "LinkedSubsidiaryInputTypedDict", + "LinkedSubsidiaryTypedDict", "LinkedSupplier", "LinkedSupplierInput", "LinkedSupplierInputTypedDict", @@ -7813,6 +8206,8 @@ "UnprocessableResponseDetail", "UpdateAccountingDepartmentResponse", "UpdateAccountingDepartmentResponseTypedDict", + "UpdateAccountingEmployeeResponse", + "UpdateAccountingEmployeeResponseTypedDict", "UpdateAccountingLocationResponse", "UpdateAccountingLocationResponseTypedDict", "UpdateActivityResponse", @@ -7865,6 +8260,10 @@ "UpdateDriveResponseTypedDict", "UpdateEmployeeResponse", "UpdateEmployeeResponseTypedDict", + "UpdateExpenseCategoryResponse", + "UpdateExpenseCategoryResponseTypedDict", + "UpdateExpenseReportResponse", + "UpdateExpenseReportResponseTypedDict", "UpdateExpenseResponse", "UpdateExpenseResponseTypedDict", "UpdateFileRequest", @@ -8456,6 +8855,96 @@ "AccountingDepartmentsUpdateRequestTypedDict": ".accounting_departmentsupdateop", "AccountingDepartmentsUpdateResponse": ".accounting_departmentsupdateop", "AccountingDepartmentsUpdateResponseTypedDict": ".accounting_departmentsupdateop", + "AccountingEmployeesAddGlobals": ".accounting_employeesaddop", + "AccountingEmployeesAddGlobalsTypedDict": ".accounting_employeesaddop", + "AccountingEmployeesAddRequest": ".accounting_employeesaddop", + "AccountingEmployeesAddRequestTypedDict": ".accounting_employeesaddop", + "AccountingEmployeesAddResponse": ".accounting_employeesaddop", + "AccountingEmployeesAddResponseTypedDict": ".accounting_employeesaddop", + "AccountingEmployeesAllGlobals": ".accounting_employeesallop", + "AccountingEmployeesAllGlobalsTypedDict": ".accounting_employeesallop", + "AccountingEmployeesAllRequest": ".accounting_employeesallop", + "AccountingEmployeesAllRequestTypedDict": ".accounting_employeesallop", + "AccountingEmployeesAllResponse": ".accounting_employeesallop", + "AccountingEmployeesAllResponseTypedDict": ".accounting_employeesallop", + "AccountingEmployeesDeleteGlobals": ".accounting_employeesdeleteop", + "AccountingEmployeesDeleteGlobalsTypedDict": ".accounting_employeesdeleteop", + "AccountingEmployeesDeleteRequest": ".accounting_employeesdeleteop", + "AccountingEmployeesDeleteRequestTypedDict": ".accounting_employeesdeleteop", + "AccountingEmployeesDeleteResponse": ".accounting_employeesdeleteop", + "AccountingEmployeesDeleteResponseTypedDict": ".accounting_employeesdeleteop", + "AccountingEmployeesOneGlobals": ".accounting_employeesoneop", + "AccountingEmployeesOneGlobalsTypedDict": ".accounting_employeesoneop", + "AccountingEmployeesOneRequest": ".accounting_employeesoneop", + "AccountingEmployeesOneRequestTypedDict": ".accounting_employeesoneop", + "AccountingEmployeesOneResponse": ".accounting_employeesoneop", + "AccountingEmployeesOneResponseTypedDict": ".accounting_employeesoneop", + "AccountingEmployeesUpdateGlobals": ".accounting_employeesupdateop", + "AccountingEmployeesUpdateGlobalsTypedDict": ".accounting_employeesupdateop", + "AccountingEmployeesUpdateRequest": ".accounting_employeesupdateop", + "AccountingEmployeesUpdateRequestTypedDict": ".accounting_employeesupdateop", + "AccountingEmployeesUpdateResponse": ".accounting_employeesupdateop", + "AccountingEmployeesUpdateResponseTypedDict": ".accounting_employeesupdateop", + "AccountingExpenseCategoriesAddGlobals": ".accounting_expensecategoriesaddop", + "AccountingExpenseCategoriesAddGlobalsTypedDict": ".accounting_expensecategoriesaddop", + "AccountingExpenseCategoriesAddRequest": ".accounting_expensecategoriesaddop", + "AccountingExpenseCategoriesAddRequestTypedDict": ".accounting_expensecategoriesaddop", + "AccountingExpenseCategoriesAddResponse": ".accounting_expensecategoriesaddop", + "AccountingExpenseCategoriesAddResponseTypedDict": ".accounting_expensecategoriesaddop", + "AccountingExpenseCategoriesAllGlobals": ".accounting_expensecategoriesallop", + "AccountingExpenseCategoriesAllGlobalsTypedDict": ".accounting_expensecategoriesallop", + "AccountingExpenseCategoriesAllRequest": ".accounting_expensecategoriesallop", + "AccountingExpenseCategoriesAllRequestTypedDict": ".accounting_expensecategoriesallop", + "AccountingExpenseCategoriesAllResponse": ".accounting_expensecategoriesallop", + "AccountingExpenseCategoriesAllResponseTypedDict": ".accounting_expensecategoriesallop", + "AccountingExpenseCategoriesDeleteGlobals": ".accounting_expensecategoriesdeleteop", + "AccountingExpenseCategoriesDeleteGlobalsTypedDict": ".accounting_expensecategoriesdeleteop", + "AccountingExpenseCategoriesDeleteRequest": ".accounting_expensecategoriesdeleteop", + "AccountingExpenseCategoriesDeleteRequestTypedDict": ".accounting_expensecategoriesdeleteop", + "AccountingExpenseCategoriesDeleteResponse": ".accounting_expensecategoriesdeleteop", + "AccountingExpenseCategoriesDeleteResponseTypedDict": ".accounting_expensecategoriesdeleteop", + "AccountingExpenseCategoriesOneGlobals": ".accounting_expensecategoriesoneop", + "AccountingExpenseCategoriesOneGlobalsTypedDict": ".accounting_expensecategoriesoneop", + "AccountingExpenseCategoriesOneRequest": ".accounting_expensecategoriesoneop", + "AccountingExpenseCategoriesOneRequestTypedDict": ".accounting_expensecategoriesoneop", + "AccountingExpenseCategoriesOneResponse": ".accounting_expensecategoriesoneop", + "AccountingExpenseCategoriesOneResponseTypedDict": ".accounting_expensecategoriesoneop", + "AccountingExpenseCategoriesUpdateGlobals": ".accounting_expensecategoriesupdateop", + "AccountingExpenseCategoriesUpdateGlobalsTypedDict": ".accounting_expensecategoriesupdateop", + "AccountingExpenseCategoriesUpdateRequest": ".accounting_expensecategoriesupdateop", + "AccountingExpenseCategoriesUpdateRequestTypedDict": ".accounting_expensecategoriesupdateop", + "AccountingExpenseCategoriesUpdateResponse": ".accounting_expensecategoriesupdateop", + "AccountingExpenseCategoriesUpdateResponseTypedDict": ".accounting_expensecategoriesupdateop", + "AccountingExpenseReportsAddGlobals": ".accounting_expensereportsaddop", + "AccountingExpenseReportsAddGlobalsTypedDict": ".accounting_expensereportsaddop", + "AccountingExpenseReportsAddRequest": ".accounting_expensereportsaddop", + "AccountingExpenseReportsAddRequestTypedDict": ".accounting_expensereportsaddop", + "AccountingExpenseReportsAddResponse": ".accounting_expensereportsaddop", + "AccountingExpenseReportsAddResponseTypedDict": ".accounting_expensereportsaddop", + "AccountingExpenseReportsAllGlobals": ".accounting_expensereportsallop", + "AccountingExpenseReportsAllGlobalsTypedDict": ".accounting_expensereportsallop", + "AccountingExpenseReportsAllRequest": ".accounting_expensereportsallop", + "AccountingExpenseReportsAllRequestTypedDict": ".accounting_expensereportsallop", + "AccountingExpenseReportsAllResponse": ".accounting_expensereportsallop", + "AccountingExpenseReportsAllResponseTypedDict": ".accounting_expensereportsallop", + "AccountingExpenseReportsDeleteGlobals": ".accounting_expensereportsdeleteop", + "AccountingExpenseReportsDeleteGlobalsTypedDict": ".accounting_expensereportsdeleteop", + "AccountingExpenseReportsDeleteRequest": ".accounting_expensereportsdeleteop", + "AccountingExpenseReportsDeleteRequestTypedDict": ".accounting_expensereportsdeleteop", + "AccountingExpenseReportsDeleteResponse": ".accounting_expensereportsdeleteop", + "AccountingExpenseReportsDeleteResponseTypedDict": ".accounting_expensereportsdeleteop", + "AccountingExpenseReportsOneGlobals": ".accounting_expensereportsoneop", + "AccountingExpenseReportsOneGlobalsTypedDict": ".accounting_expensereportsoneop", + "AccountingExpenseReportsOneRequest": ".accounting_expensereportsoneop", + "AccountingExpenseReportsOneRequestTypedDict": ".accounting_expensereportsoneop", + "AccountingExpenseReportsOneResponse": ".accounting_expensereportsoneop", + "AccountingExpenseReportsOneResponseTypedDict": ".accounting_expensereportsoneop", + "AccountingExpenseReportsUpdateGlobals": ".accounting_expensereportsupdateop", + "AccountingExpenseReportsUpdateGlobalsTypedDict": ".accounting_expensereportsupdateop", + "AccountingExpenseReportsUpdateRequest": ".accounting_expensereportsupdateop", + "AccountingExpenseReportsUpdateRequestTypedDict": ".accounting_expensereportsupdateop", + "AccountingExpenseReportsUpdateResponse": ".accounting_expensereportsupdateop", + "AccountingExpenseReportsUpdateResponseTypedDict": ".accounting_expensereportsupdateop", "AccountingExpensesAddGlobals": ".accounting_expensesaddop", "AccountingExpensesAddGlobalsTypedDict": ".accounting_expensesaddop", "AccountingExpensesAddRequest": ".accounting_expensesaddop", @@ -8895,6 +9384,16 @@ "DepartmentStatus": ".accountingdepartment", "AccountingDepartmentsFilter": ".accountingdepartmentsfilter", "AccountingDepartmentsFilterTypedDict": ".accountingdepartmentsfilter", + "AccountingEmployee": ".accountingemployee", + "AccountingEmployeeInput": ".accountingemployee", + "AccountingEmployeeInputTypedDict": ".accountingemployee", + "AccountingEmployeeManager": ".accountingemployee", + "AccountingEmployeeManagerTypedDict": ".accountingemployee", + "AccountingEmployeeTypedDict": ".accountingemployee", + "EmployeeStatus": ".accountingemployee", + "AccountingEmployeesFilter": ".accountingemployeesfilter", + "AccountingEmployeesFilterStatus": ".accountingemployeesfilter", + "AccountingEmployeesFilterTypedDict": ".accountingemployeesfilter", "AccountingLocation": ".accountinglocation", "AccountingLocationInput": ".accountinglocation", "AccountingLocationInputTypedDict": ".accountinglocation", @@ -9312,6 +9811,8 @@ "CopyFolderRequestTypedDict": ".copyfolderrequest", "CreateAccountingDepartmentResponse": ".createaccountingdepartmentresponse", "CreateAccountingDepartmentResponseTypedDict": ".createaccountingdepartmentresponse", + "CreateAccountingEmployeeResponse": ".createaccountingemployeeresponse", + "CreateAccountingEmployeeResponseTypedDict": ".createaccountingemployeeresponse", "CreateAccountingLocationResponse": ".createaccountinglocationresponse", "CreateAccountingLocationResponseTypedDict": ".createaccountinglocationresponse", "CreateActivityResponse": ".createactivityresponse", @@ -9366,6 +9867,10 @@ "CreateDriveResponseTypedDict": ".createdriveresponse", "CreateEmployeeResponse": ".createemployeeresponse", "CreateEmployeeResponseTypedDict": ".createemployeeresponse", + "CreateExpenseCategoryResponse": ".createexpensecategoryresponse", + "CreateExpenseCategoryResponseTypedDict": ".createexpensecategoryresponse", + "CreateExpenseReportResponse": ".createexpensereportresponse", + "CreateExpenseReportResponseTypedDict": ".createexpensereportresponse", "CreateExpenseResponse": ".createexpenseresponse", "CreateExpenseResponseTypedDict": ".createexpenseresponse", "CreateFolderRequest": ".createfolderrequest", @@ -9800,6 +10305,8 @@ "DeductionTypedDict": ".deduction", "DeleteAccountingDepartmentResponse": ".deleteaccountingdepartmentresponse", "DeleteAccountingDepartmentResponseTypedDict": ".deleteaccountingdepartmentresponse", + "DeleteAccountingEmployeeResponse": ".deleteaccountingemployeeresponse", + "DeleteAccountingEmployeeResponseTypedDict": ".deleteaccountingemployeeresponse", "DeleteAccountingLocationResponse": ".deleteaccountinglocationresponse", "DeleteAccountingLocationResponseTypedDict": ".deleteaccountinglocationresponse", "DeleteActivityResponse": ".deleteactivityresponse", @@ -9846,6 +10353,10 @@ "DeleteDriveResponseTypedDict": ".deletedriveresponse", "DeleteEmployeeResponse": ".deleteemployeeresponse", "DeleteEmployeeResponseTypedDict": ".deleteemployeeresponse", + "DeleteExpenseCategoryResponse": ".deleteexpensecategoryresponse", + "DeleteExpenseCategoryResponseTypedDict": ".deleteexpensecategoryresponse", + "DeleteExpenseReportResponse": ".deleteexpensereportresponse", + "DeleteExpenseReportResponseTypedDict": ".deleteexpensereportresponse", "DeleteExpenseResponse": ".deleteexpenseresponse", "DeleteExpenseResponseTypedDict": ".deleteexpenseresponse", "DeleteFileResponse": ".deletefileresponse", @@ -10052,10 +10563,38 @@ "ExpenseStatus": ".expense", "ExpenseType": ".expense", "ExpenseTypedDict": ".expense", + "ExpenseCategoriesFilter": ".expensecategoriesfilter", + "ExpenseCategoriesFilterStatus": ".expensecategoriesfilter", + "ExpenseCategoriesFilterTypedDict": ".expensecategoriesfilter", + "ExpenseCategory": ".expensecategory", + "ExpenseCategoryInput": ".expensecategory", + "ExpenseCategoryInputTypedDict": ".expensecategory", + "ExpenseCategoryStatus": ".expensecategory", + "ExpenseCategoryTypedDict": ".expensecategory", "ExpenseLineItem": ".expenselineitem", "ExpenseLineItemTypedDict": ".expenselineitem", "ExpenseLineItemInput": ".expenselineitem_input", "ExpenseLineItemInputTypedDict": ".expenselineitem_input", + "AccountingPeriod": ".expensereport", + "AccountingPeriodTypedDict": ".expensereport", + "ApprovedBy": ".expensereport", + "ApprovedByTypedDict": ".expensereport", + "ExpenseReport": ".expensereport", + "ExpenseReportEmployee": ".expensereport", + "ExpenseReportEmployeeTypedDict": ".expensereport", + "ExpenseReportInput": ".expensereport", + "ExpenseReportInputTypedDict": ".expensereport", + "ExpenseReportStatus": ".expensereport", + "ExpenseReportTypedDict": ".expensereport", + "ExpenseReportLineItem": ".expensereportlineitem", + "ExpenseReportLineItemExpenseCategory": ".expensereportlineitem", + "ExpenseReportLineItemExpenseCategoryTypedDict": ".expensereportlineitem", + "ExpenseReportLineItemInput": ".expensereportlineitem", + "ExpenseReportLineItemInputTypedDict": ".expensereportlineitem", + "ExpenseReportLineItemTypedDict": ".expensereportlineitem", + "ExpenseReportsFilter": ".expensereportsfilter", + "ExpenseReportsFilterStatus": ".expensereportsfilter", + "ExpenseReportsFilterTypedDict": ".expensereportsfilter", "ExpensesFilter": ".expensesfilter", "ExpensesFilterStatus": ".expensesfilter", "ExpensesFilterType": ".expensesfilter", @@ -10281,6 +10820,10 @@ "GetAccountingDepartmentResponseTypedDict": ".getaccountingdepartmentresponse", "GetAccountingDepartmentsResponse": ".getaccountingdepartmentsresponse", "GetAccountingDepartmentsResponseTypedDict": ".getaccountingdepartmentsresponse", + "GetAccountingEmployeeResponse": ".getaccountingemployeeresponse", + "GetAccountingEmployeeResponseTypedDict": ".getaccountingemployeeresponse", + "GetAccountingEmployeesResponse": ".getaccountingemployeesresponse", + "GetAccountingEmployeesResponseTypedDict": ".getaccountingemployeesresponse", "GetAccountingLocationResponse": ".getaccountinglocationresponse", "GetAccountingLocationResponseTypedDict": ".getaccountinglocationresponse", "GetAccountingLocationsResponse": ".getaccountinglocationsresponse", @@ -10431,6 +10974,14 @@ "GetEmployeeSchedulesResponseTypedDict": ".getemployeeschedulesresponse", "GetEmployeesResponse": ".getemployeesresponse", "GetEmployeesResponseTypedDict": ".getemployeesresponse", + "GetExpenseCategoriesResponse": ".getexpensecategoriesresponse", + "GetExpenseCategoriesResponseTypedDict": ".getexpensecategoriesresponse", + "GetExpenseCategoryResponse": ".getexpensecategoryresponse", + "GetExpenseCategoryResponseTypedDict": ".getexpensecategoryresponse", + "GetExpenseReportResponse": ".getexpensereportresponse", + "GetExpenseReportResponseTypedDict": ".getexpensereportresponse", + "GetExpenseReportsResponse": ".getexpensereportsresponse", + "GetExpenseReportsResponseTypedDict": ".getexpensereportsresponse", "GetExpenseResponse": ".getexpenseresponse", "GetExpenseResponseTypedDict": ".getexpenseresponse", "GetExpensesResponse": ".getexpensesresponse", @@ -10945,6 +11496,10 @@ "LinkedParentCustomerTypedDict": ".linkedparentcustomer", "LinkedPurchaseOrder": ".linkedpurchaseorder", "LinkedPurchaseOrderTypedDict": ".linkedpurchaseorder", + "LinkedSubsidiary": ".linkedsubsidiary", + "LinkedSubsidiaryTypedDict": ".linkedsubsidiary", + "LinkedSubsidiaryInput": ".linkedsubsidiary_input", + "LinkedSubsidiaryInputTypedDict": ".linkedsubsidiary_input", "LinkedSupplier": ".linkedsupplier", "LinkedSupplierTypedDict": ".linkedsupplier", "LinkedSupplierInput": ".linkedsupplier_input", @@ -11346,6 +11901,8 @@ "UnprocessableResponseDetail": ".unprocessableresponse", "UpdateAccountingDepartmentResponse": ".updateaccountingdepartmentresponse", "UpdateAccountingDepartmentResponseTypedDict": ".updateaccountingdepartmentresponse", + "UpdateAccountingEmployeeResponse": ".updateaccountingemployeeresponse", + "UpdateAccountingEmployeeResponseTypedDict": ".updateaccountingemployeeresponse", "UpdateAccountingLocationResponse": ".updateaccountinglocationresponse", "UpdateAccountingLocationResponseTypedDict": ".updateaccountinglocationresponse", "UpdateActivityResponse": ".updateactivityresponse", @@ -11401,6 +11958,10 @@ "UpdateDriveResponseTypedDict": ".updatedriveresponse", "UpdateEmployeeResponse": ".updateemployeeresponse", "UpdateEmployeeResponseTypedDict": ".updateemployeeresponse", + "UpdateExpenseCategoryResponse": ".updateexpensecategoryresponse", + "UpdateExpenseCategoryResponseTypedDict": ".updateexpensecategoryresponse", + "UpdateExpenseReportResponse": ".updateexpensereportresponse", + "UpdateExpenseReportResponseTypedDict": ".updateexpensereportresponse", "UpdateExpenseResponse": ".updateexpenseresponse", "UpdateExpenseResponseTypedDict": ".updateexpenseresponse", "UpdateFileRequest": ".updatefilerequest", diff --git a/src/apideck_unify/models/accounting_employeesaddop.py b/src/apideck_unify/models/accounting_employeesaddop.py new file mode 100644 index 00000000..36278062 --- /dev/null +++ b/src/apideck_unify/models/accounting_employeesaddop.py @@ -0,0 +1,117 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .accountingemployee import ( + AccountingEmployeeInput, + AccountingEmployeeInputTypedDict, +) +from .createaccountingemployeeresponse import ( + CreateAccountingEmployeeResponse, + CreateAccountingEmployeeResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + QueryParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingEmployeesAddGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingEmployeesAddGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingEmployeesAddRequestTypedDict(TypedDict): + accounting_employee: AccountingEmployeeInputTypedDict + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + +class AccountingEmployeesAddRequest(BaseModel): + accounting_employee: Annotated[ + AccountingEmployeeInput, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + +class AccountingEmployeesAddResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + create_accounting_employee_response: NotRequired[ + CreateAccountingEmployeeResponseTypedDict + ] + r"""Employees""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingEmployeesAddResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + create_accounting_employee_response: Optional[CreateAccountingEmployeeResponse] = ( + None + ) + r"""Employees""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_employeesallop.py b/src/apideck_unify/models/accounting_employeesallop.py new file mode 100644 index 00000000..388073e1 --- /dev/null +++ b/src/apideck_unify/models/accounting_employeesallop.py @@ -0,0 +1,185 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .accountingemployeesfilter import ( + AccountingEmployeesFilter, + AccountingEmployeesFilterTypedDict, +) +from .getaccountingemployeesresponse import ( + GetAccountingEmployeesResponse, + GetAccountingEmployeesResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Callable, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingEmployeesAllGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingEmployeesAllGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingEmployeesAllRequestTypedDict(TypedDict): + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + cursor: NotRequired[Nullable[str]] + r"""Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.""" + limit: NotRequired[int] + r"""Number of results to return. Minimum 1, Maximum 200, Default 20""" + fields: NotRequired[Nullable[str]] + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + filter_: NotRequired[AccountingEmployeesFilterTypedDict] + r"""Apply filters""" + + +class AccountingEmployeesAllRequest(BaseModel): + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 20 + r"""Number of results to return. Minimum 1, Maximum 200, Default 20""" + + fields: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + filter_: Annotated[ + Optional[AccountingEmployeesFilter], + pydantic.Field(alias="filter"), + FieldMetadata(query=QueryParamMetadata(style="deepObject", explode=True)), + ] = None + r"""Apply filters""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "raw", + "consumerId", + "appId", + "serviceId", + "cursor", + "limit", + "fields", + "filter", + ] + nullable_fields = ["cursor", "fields"] + 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 AccountingEmployeesAllResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_accounting_employees_response: NotRequired[ + GetAccountingEmployeesResponseTypedDict + ] + r"""Employees""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingEmployeesAllResponse(BaseModel): + next: Callable[[], Optional[AccountingEmployeesAllResponse]] + + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_accounting_employees_response: Optional[GetAccountingEmployeesResponse] = None + r"""Employees""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_employeesdeleteop.py b/src/apideck_unify/models/accounting_employeesdeleteop.py new file mode 100644 index 00000000..01c88f05 --- /dev/null +++ b/src/apideck_unify/models/accounting_employeesdeleteop.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .deleteaccountingemployeeresponse import ( + DeleteAccountingEmployeeResponse, + DeleteAccountingEmployeeResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingEmployeesDeleteGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingEmployeesDeleteGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingEmployeesDeleteRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingEmployeesDeleteRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingEmployeesDeleteResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + delete_accounting_employee_response: NotRequired[ + DeleteAccountingEmployeeResponseTypedDict + ] + r"""Employees""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingEmployeesDeleteResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + delete_accounting_employee_response: Optional[DeleteAccountingEmployeeResponse] = ( + None + ) + r"""Employees""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_employeesoneop.py b/src/apideck_unify/models/accounting_employeesoneop.py new file mode 100644 index 00000000..15b68a41 --- /dev/null +++ b/src/apideck_unify/models/accounting_employeesoneop.py @@ -0,0 +1,157 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .getaccountingemployeeresponse import ( + GetAccountingEmployeeResponse, + GetAccountingEmployeeResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingEmployeesOneGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingEmployeesOneGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingEmployeesOneRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + fields: NotRequired[Nullable[str]] + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + +class AccountingEmployeesOneRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + fields: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["consumerId", "appId", "serviceId", "raw", "fields"] + nullable_fields = ["fields"] + 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 AccountingEmployeesOneResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_accounting_employee_response: NotRequired[ + GetAccountingEmployeeResponseTypedDict + ] + r"""Employees""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingEmployeesOneResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_accounting_employee_response: Optional[GetAccountingEmployeeResponse] = None + r"""Employees""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_employeesupdateop.py b/src/apideck_unify/models/accounting_employeesupdateop.py new file mode 100644 index 00000000..ec6538be --- /dev/null +++ b/src/apideck_unify/models/accounting_employeesupdateop.py @@ -0,0 +1,125 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .accountingemployee import ( + AccountingEmployeeInput, + AccountingEmployeeInputTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from .updateaccountingemployeeresponse import ( + UpdateAccountingEmployeeResponse, + UpdateAccountingEmployeeResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingEmployeesUpdateGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingEmployeesUpdateGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingEmployeesUpdateRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + accounting_employee: AccountingEmployeeInputTypedDict + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingEmployeesUpdateRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + accounting_employee: Annotated[ + AccountingEmployeeInput, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingEmployeesUpdateResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + update_accounting_employee_response: NotRequired[ + UpdateAccountingEmployeeResponseTypedDict + ] + r"""Employees""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingEmployeesUpdateResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + update_accounting_employee_response: Optional[UpdateAccountingEmployeeResponse] = ( + None + ) + r"""Employees""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_expensecategoriesaddop.py b/src/apideck_unify/models/accounting_expensecategoriesaddop.py new file mode 100644 index 00000000..c9821d39 --- /dev/null +++ b/src/apideck_unify/models/accounting_expensecategoriesaddop.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .createexpensecategoryresponse import ( + CreateExpenseCategoryResponse, + CreateExpenseCategoryResponseTypedDict, +) +from .expensecategory import ExpenseCategoryInput, ExpenseCategoryInputTypedDict +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + QueryParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingExpenseCategoriesAddGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingExpenseCategoriesAddGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingExpenseCategoriesAddRequestTypedDict(TypedDict): + expense_category: ExpenseCategoryInputTypedDict + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + +class AccountingExpenseCategoriesAddRequest(BaseModel): + expense_category: Annotated[ + ExpenseCategoryInput, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + +class AccountingExpenseCategoriesAddResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + create_expense_category_response: NotRequired[ + CreateExpenseCategoryResponseTypedDict + ] + r"""Expense Categories""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingExpenseCategoriesAddResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + create_expense_category_response: Optional[CreateExpenseCategoryResponse] = None + r"""Expense Categories""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_expensecategoriesallop.py b/src/apideck_unify/models/accounting_expensecategoriesallop.py new file mode 100644 index 00000000..5de2cd4d --- /dev/null +++ b/src/apideck_unify/models/accounting_expensecategoriesallop.py @@ -0,0 +1,183 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .expensecategoriesfilter import ( + ExpenseCategoriesFilter, + ExpenseCategoriesFilterTypedDict, +) +from .getexpensecategoriesresponse import ( + GetExpenseCategoriesResponse, + GetExpenseCategoriesResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Callable, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingExpenseCategoriesAllGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingExpenseCategoriesAllGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingExpenseCategoriesAllRequestTypedDict(TypedDict): + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + cursor: NotRequired[Nullable[str]] + r"""Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.""" + limit: NotRequired[int] + r"""Number of results to return. Minimum 1, Maximum 200, Default 20""" + fields: NotRequired[Nullable[str]] + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + filter_: NotRequired[ExpenseCategoriesFilterTypedDict] + r"""Apply filters""" + + +class AccountingExpenseCategoriesAllRequest(BaseModel): + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 20 + r"""Number of results to return. Minimum 1, Maximum 200, Default 20""" + + fields: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + filter_: Annotated[ + Optional[ExpenseCategoriesFilter], + pydantic.Field(alias="filter"), + FieldMetadata(query=QueryParamMetadata(style="deepObject", explode=True)), + ] = None + r"""Apply filters""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "raw", + "consumerId", + "appId", + "serviceId", + "cursor", + "limit", + "fields", + "filter", + ] + nullable_fields = ["cursor", "fields"] + 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 AccountingExpenseCategoriesAllResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_expense_categories_response: NotRequired[GetExpenseCategoriesResponseTypedDict] + r"""Expense Categories""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingExpenseCategoriesAllResponse(BaseModel): + next: Callable[[], Optional[AccountingExpenseCategoriesAllResponse]] + + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_expense_categories_response: Optional[GetExpenseCategoriesResponse] = None + r"""Expense Categories""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_expensecategoriesdeleteop.py b/src/apideck_unify/models/accounting_expensecategoriesdeleteop.py new file mode 100644 index 00000000..a2a9a3f6 --- /dev/null +++ b/src/apideck_unify/models/accounting_expensecategoriesdeleteop.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .deleteexpensecategoryresponse import ( + DeleteExpenseCategoryResponse, + DeleteExpenseCategoryResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingExpenseCategoriesDeleteGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingExpenseCategoriesDeleteGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingExpenseCategoriesDeleteRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingExpenseCategoriesDeleteRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingExpenseCategoriesDeleteResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + delete_expense_category_response: NotRequired[ + DeleteExpenseCategoryResponseTypedDict + ] + r"""Expense Categories""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingExpenseCategoriesDeleteResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + delete_expense_category_response: Optional[DeleteExpenseCategoryResponse] = None + r"""Expense Categories""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_expensecategoriesoneop.py b/src/apideck_unify/models/accounting_expensecategoriesoneop.py new file mode 100644 index 00000000..915e9a5d --- /dev/null +++ b/src/apideck_unify/models/accounting_expensecategoriesoneop.py @@ -0,0 +1,155 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .getexpensecategoryresponse import ( + GetExpenseCategoryResponse, + GetExpenseCategoryResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingExpenseCategoriesOneGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingExpenseCategoriesOneGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingExpenseCategoriesOneRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + fields: NotRequired[Nullable[str]] + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + +class AccountingExpenseCategoriesOneRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + fields: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["consumerId", "appId", "serviceId", "raw", "fields"] + nullable_fields = ["fields"] + 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 AccountingExpenseCategoriesOneResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_expense_category_response: NotRequired[GetExpenseCategoryResponseTypedDict] + r"""Expense Categories""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingExpenseCategoriesOneResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_expense_category_response: Optional[GetExpenseCategoryResponse] = None + r"""Expense Categories""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_expensecategoriesupdateop.py b/src/apideck_unify/models/accounting_expensecategoriesupdateop.py new file mode 100644 index 00000000..cdfa8572 --- /dev/null +++ b/src/apideck_unify/models/accounting_expensecategoriesupdateop.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .expensecategory import ExpenseCategoryInput, ExpenseCategoryInputTypedDict +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from .updateexpensecategoryresponse import ( + UpdateExpenseCategoryResponse, + UpdateExpenseCategoryResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingExpenseCategoriesUpdateGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingExpenseCategoriesUpdateGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingExpenseCategoriesUpdateRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + expense_category: ExpenseCategoryInputTypedDict + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingExpenseCategoriesUpdateRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + expense_category: Annotated[ + ExpenseCategoryInput, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingExpenseCategoriesUpdateResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + update_expense_category_response: NotRequired[ + UpdateExpenseCategoryResponseTypedDict + ] + r"""Expense Categories""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingExpenseCategoriesUpdateResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + update_expense_category_response: Optional[UpdateExpenseCategoryResponse] = None + r"""Expense Categories""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_expensereportsaddop.py b/src/apideck_unify/models/accounting_expensereportsaddop.py new file mode 100644 index 00000000..00a4f264 --- /dev/null +++ b/src/apideck_unify/models/accounting_expensereportsaddop.py @@ -0,0 +1,110 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .createexpensereportresponse import ( + CreateExpenseReportResponse, + CreateExpenseReportResponseTypedDict, +) +from .expensereport import ExpenseReportInput, ExpenseReportInputTypedDict +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + QueryParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingExpenseReportsAddGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingExpenseReportsAddGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingExpenseReportsAddRequestTypedDict(TypedDict): + expense_report: ExpenseReportInputTypedDict + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + +class AccountingExpenseReportsAddRequest(BaseModel): + expense_report: Annotated[ + ExpenseReportInput, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + +class AccountingExpenseReportsAddResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + create_expense_report_response: NotRequired[CreateExpenseReportResponseTypedDict] + r"""Expense Reports""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingExpenseReportsAddResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + create_expense_report_response: Optional[CreateExpenseReportResponse] = None + r"""Expense Reports""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_expensereportsallop.py b/src/apideck_unify/models/accounting_expensereportsallop.py new file mode 100644 index 00000000..c6ce643b --- /dev/null +++ b/src/apideck_unify/models/accounting_expensereportsallop.py @@ -0,0 +1,180 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .expensereportsfilter import ExpenseReportsFilter, ExpenseReportsFilterTypedDict +from .getexpensereportsresponse import ( + GetExpenseReportsResponse, + GetExpenseReportsResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Callable, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingExpenseReportsAllGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingExpenseReportsAllGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingExpenseReportsAllRequestTypedDict(TypedDict): + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + cursor: NotRequired[Nullable[str]] + r"""Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.""" + limit: NotRequired[int] + r"""Number of results to return. Minimum 1, Maximum 200, Default 20""" + fields: NotRequired[Nullable[str]] + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + filter_: NotRequired[ExpenseReportsFilterTypedDict] + r"""Apply filters""" + + +class AccountingExpenseReportsAllRequest(BaseModel): + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 20 + r"""Number of results to return. Minimum 1, Maximum 200, Default 20""" + + fields: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + filter_: Annotated[ + Optional[ExpenseReportsFilter], + pydantic.Field(alias="filter"), + FieldMetadata(query=QueryParamMetadata(style="deepObject", explode=True)), + ] = None + r"""Apply filters""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "raw", + "consumerId", + "appId", + "serviceId", + "cursor", + "limit", + "fields", + "filter", + ] + nullable_fields = ["cursor", "fields"] + 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 AccountingExpenseReportsAllResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_expense_reports_response: NotRequired[GetExpenseReportsResponseTypedDict] + r"""Expense Reports""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingExpenseReportsAllResponse(BaseModel): + next: Callable[[], Optional[AccountingExpenseReportsAllResponse]] + + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_expense_reports_response: Optional[GetExpenseReportsResponse] = None + r"""Expense Reports""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_expensereportsdeleteop.py b/src/apideck_unify/models/accounting_expensereportsdeleteop.py new file mode 100644 index 00000000..09945913 --- /dev/null +++ b/src/apideck_unify/models/accounting_expensereportsdeleteop.py @@ -0,0 +1,110 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .deleteexpensereportresponse import ( + DeleteExpenseReportResponse, + DeleteExpenseReportResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingExpenseReportsDeleteGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingExpenseReportsDeleteGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingExpenseReportsDeleteRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingExpenseReportsDeleteRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingExpenseReportsDeleteResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + delete_expense_report_response: NotRequired[DeleteExpenseReportResponseTypedDict] + r"""Expense Reports""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingExpenseReportsDeleteResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + delete_expense_report_response: Optional[DeleteExpenseReportResponse] = None + r"""Expense Reports""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_expensereportsoneop.py b/src/apideck_unify/models/accounting_expensereportsoneop.py new file mode 100644 index 00000000..9781d1cc --- /dev/null +++ b/src/apideck_unify/models/accounting_expensereportsoneop.py @@ -0,0 +1,155 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .getexpensereportresponse import ( + GetExpenseReportResponse, + GetExpenseReportResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingExpenseReportsOneGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingExpenseReportsOneGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingExpenseReportsOneRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + fields: NotRequired[Nullable[str]] + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + +class AccountingExpenseReportsOneRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + fields: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["consumerId", "appId", "serviceId", "raw", "fields"] + nullable_fields = ["fields"] + 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 AccountingExpenseReportsOneResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_expense_report_response: NotRequired[GetExpenseReportResponseTypedDict] + r"""Expense Reports""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingExpenseReportsOneResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_expense_report_response: Optional[GetExpenseReportResponse] = None + r"""Expense Reports""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_expensereportsupdateop.py b/src/apideck_unify/models/accounting_expensereportsupdateop.py new file mode 100644 index 00000000..9e7f2035 --- /dev/null +++ b/src/apideck_unify/models/accounting_expensereportsupdateop.py @@ -0,0 +1,118 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .expensereport import ExpenseReportInput, ExpenseReportInputTypedDict +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from .updateexpensereportresponse import ( + UpdateExpenseReportResponse, + UpdateExpenseReportResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingExpenseReportsUpdateGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingExpenseReportsUpdateGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingExpenseReportsUpdateRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + expense_report: ExpenseReportInputTypedDict + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingExpenseReportsUpdateRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + expense_report: Annotated[ + ExpenseReportInput, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingExpenseReportsUpdateResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + update_expense_report_response: NotRequired[UpdateExpenseReportResponseTypedDict] + r"""Expense Reports""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingExpenseReportsUpdateResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + update_expense_report_response: Optional[UpdateExpenseReportResponse] = None + r"""Expense Reports""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accountingemployee.py b/src/apideck_unify/models/accountingemployee.py new file mode 100644 index 00000000..2ac71027 --- /dev/null +++ b/src/apideck_unify/models/accountingemployee.py @@ -0,0 +1,602 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .address import Address, AddressTypedDict +from .currency import Currency +from .customfield import CustomField, CustomFieldTypedDict +from .email import Email, EmailTypedDict +from .gender import Gender +from .linkeddepartment import LinkedDepartment, LinkedDepartmentTypedDict +from .linkeddepartment_input import ( + LinkedDepartmentInput, + LinkedDepartmentInputTypedDict, +) +from .linkedlocation import LinkedLocation, LinkedLocationTypedDict +from .linkedlocation_input import LinkedLocationInput, LinkedLocationInputTypedDict +from .linkedsubsidiary import LinkedSubsidiary, LinkedSubsidiaryTypedDict +from .linkedsubsidiary_input import ( + LinkedSubsidiaryInput, + LinkedSubsidiaryInputTypedDict, +) +from .linkedtrackingcategory import ( + LinkedTrackingCategory, + LinkedTrackingCategoryTypedDict, +) +from .passthroughbody import PassThroughBody, PassThroughBodyTypedDict +from .phonenumber import PhoneNumber, PhoneNumberTypedDict +from apideck_unify import models, utils +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import validate_open_enum +from datetime import date, datetime +from enum import Enum +from pydantic import field_serializer, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class EmployeeStatus(str, Enum, metaclass=utils.OpenEnumMeta): + r"""The status of the employee.""" + + ACTIVE = "active" + INACTIVE = "inactive" + TERMINATED = "terminated" + + +class AccountingEmployeeManagerTypedDict(TypedDict): + r"""The manager of the employee.""" + + id: NotRequired[str] + r"""A unique identifier for the manager.""" + name: NotRequired[Nullable[str]] + r"""The name of the manager.""" + + +class AccountingEmployeeManager(BaseModel): + r"""The manager of the employee.""" + + id: Optional[str] = None + r"""A unique identifier for the manager.""" + + name: OptionalNullable[str] = UNSET + r"""The name of the manager.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "name"] + nullable_fields = ["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 + + +class AccountingEmployeeTypedDict(TypedDict): + id: NotRequired[str] + r"""A unique identifier for an object.""" + downstream_id: NotRequired[Nullable[str]] + r"""The third-party API ID of original entity""" + display_id: NotRequired[Nullable[str]] + r"""Id to be displayed.""" + first_name: NotRequired[Nullable[str]] + r"""The first name of the employee.""" + last_name: NotRequired[Nullable[str]] + r"""The last name of the employee.""" + display_name: NotRequired[Nullable[str]] + r"""The display name of the employee.""" + emails: NotRequired[List[EmailTypedDict]] + r"""Email addresses of the employee.""" + employee_number: NotRequired[Nullable[str]] + r"""The employee number or identifier.""" + job_title: NotRequired[Nullable[str]] + r"""The job title of the employee.""" + status: NotRequired[Nullable[EmployeeStatus]] + r"""The status of the employee.""" + is_contractor: NotRequired[Nullable[bool]] + r"""Whether the employee is a contractor.""" + department: NotRequired[Nullable[LinkedDepartmentTypedDict]] + location: NotRequired[Nullable[LinkedLocationTypedDict]] + manager: NotRequired[AccountingEmployeeManagerTypedDict] + r"""The manager of the employee.""" + hire_date: NotRequired[Nullable[date]] + r"""The date the employee was hired.""" + termination_date: NotRequired[Nullable[date]] + r"""The date the employee was terminated.""" + gender: NotRequired[Nullable[Gender]] + r"""The gender represents the gender identity of a person.""" + birth_date: NotRequired[Nullable[date]] + r"""The date of birth of the employee.""" + subsidiary: NotRequired[Nullable[LinkedSubsidiaryTypedDict]] + tracking_categories: NotRequired[ + Nullable[List[Nullable[LinkedTrackingCategoryTypedDict]]] + ] + r"""A list of linked tracking categories.""" + currency: NotRequired[Nullable[Currency]] + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + notes: NotRequired[Nullable[str]] + r"""Notes about the employee.""" + addresses: NotRequired[List[AddressTypedDict]] + r"""Addresses of the employee.""" + phone_numbers: NotRequired[List[PhoneNumberTypedDict]] + r"""Phone numbers of the employee.""" + custom_fields: NotRequired[List[CustomFieldTypedDict]] + custom_mappings: NotRequired[Nullable[Dict[str, Any]]] + r"""When custom mappings are configured on the resource, the result is included here.""" + row_version: NotRequired[Nullable[str]] + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + updated_at: NotRequired[Nullable[datetime]] + r"""The date and time when the object was last updated.""" + created_at: NotRequired[Nullable[datetime]] + r"""The date and time when the object was created.""" + pass_through: NotRequired[List[PassThroughBodyTypedDict]] + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + +class AccountingEmployee(BaseModel): + id: Optional[str] = None + r"""A unique identifier for an object.""" + + downstream_id: OptionalNullable[str] = UNSET + r"""The third-party API ID of original entity""" + + display_id: OptionalNullable[str] = UNSET + r"""Id to be displayed.""" + + first_name: OptionalNullable[str] = UNSET + r"""The first name of the employee.""" + + last_name: OptionalNullable[str] = UNSET + r"""The last name of the employee.""" + + display_name: OptionalNullable[str] = UNSET + r"""The display name of the employee.""" + + emails: Optional[List[Email]] = None + r"""Email addresses of the employee.""" + + employee_number: OptionalNullable[str] = UNSET + r"""The employee number or identifier.""" + + job_title: OptionalNullable[str] = UNSET + r"""The job title of the employee.""" + + status: Annotated[ + OptionalNullable[EmployeeStatus], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""The status of the employee.""" + + is_contractor: OptionalNullable[bool] = UNSET + r"""Whether the employee is a contractor.""" + + department: OptionalNullable[LinkedDepartment] = UNSET + + location: OptionalNullable[LinkedLocation] = UNSET + + manager: Optional[AccountingEmployeeManager] = None + r"""The manager of the employee.""" + + hire_date: OptionalNullable[date] = UNSET + r"""The date the employee was hired.""" + + termination_date: OptionalNullable[date] = UNSET + r"""The date the employee was terminated.""" + + gender: Annotated[ + OptionalNullable[Gender], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""The gender represents the gender identity of a person.""" + + birth_date: OptionalNullable[date] = UNSET + r"""The date of birth of the employee.""" + + subsidiary: OptionalNullable[LinkedSubsidiary] = UNSET + + tracking_categories: OptionalNullable[List[Nullable[LinkedTrackingCategory]]] = ( + UNSET + ) + r"""A list of linked tracking categories.""" + + currency: Annotated[ + OptionalNullable[Currency], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + + notes: OptionalNullable[str] = UNSET + r"""Notes about the employee.""" + + addresses: Optional[List[Address]] = None + r"""Addresses of the employee.""" + + phone_numbers: Optional[List[PhoneNumber]] = None + r"""Phone numbers of the employee.""" + + custom_fields: Optional[List[CustomField]] = None + + custom_mappings: OptionalNullable[Dict[str, Any]] = UNSET + r"""When custom mappings are configured on the resource, the result is included here.""" + + row_version: OptionalNullable[str] = UNSET + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + + updated_at: OptionalNullable[datetime] = UNSET + r"""The date and time when the object was last updated.""" + + created_at: OptionalNullable[datetime] = UNSET + r"""The date and time when the object was created.""" + + pass_through: Optional[List[PassThroughBody]] = None + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.EmployeeStatus(value) + except ValueError: + return value + return value + + @field_serializer("gender") + def serialize_gender(self, value): + if isinstance(value, str): + try: + return models.Gender(value) + except ValueError: + return value + return value + + @field_serializer("currency") + def serialize_currency(self, value): + if isinstance(value, str): + try: + return models.Currency(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "id", + "downstream_id", + "display_id", + "first_name", + "last_name", + "display_name", + "emails", + "employee_number", + "job_title", + "status", + "is_contractor", + "department", + "location", + "manager", + "hire_date", + "termination_date", + "gender", + "birth_date", + "subsidiary", + "tracking_categories", + "currency", + "notes", + "addresses", + "phone_numbers", + "custom_fields", + "custom_mappings", + "row_version", + "updated_at", + "created_at", + "pass_through", + ] + nullable_fields = [ + "downstream_id", + "display_id", + "first_name", + "last_name", + "display_name", + "employee_number", + "job_title", + "status", + "is_contractor", + "department", + "location", + "hire_date", + "termination_date", + "gender", + "birth_date", + "subsidiary", + "tracking_categories", + "currency", + "notes", + "custom_mappings", + "row_version", + "updated_at", + "created_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 AccountingEmployeeInputTypedDict(TypedDict): + display_id: NotRequired[Nullable[str]] + r"""Id to be displayed.""" + first_name: NotRequired[Nullable[str]] + r"""The first name of the employee.""" + last_name: NotRequired[Nullable[str]] + r"""The last name of the employee.""" + display_name: NotRequired[Nullable[str]] + r"""The display name of the employee.""" + emails: NotRequired[List[EmailTypedDict]] + r"""Email addresses of the employee.""" + employee_number: NotRequired[Nullable[str]] + r"""The employee number or identifier.""" + job_title: NotRequired[Nullable[str]] + r"""The job title of the employee.""" + status: NotRequired[Nullable[EmployeeStatus]] + r"""The status of the employee.""" + is_contractor: NotRequired[Nullable[bool]] + r"""Whether the employee is a contractor.""" + department: NotRequired[Nullable[LinkedDepartmentInputTypedDict]] + location: NotRequired[Nullable[LinkedLocationInputTypedDict]] + manager: NotRequired[AccountingEmployeeManagerTypedDict] + r"""The manager of the employee.""" + hire_date: NotRequired[Nullable[date]] + r"""The date the employee was hired.""" + termination_date: NotRequired[Nullable[date]] + r"""The date the employee was terminated.""" + gender: NotRequired[Nullable[Gender]] + r"""The gender represents the gender identity of a person.""" + birth_date: NotRequired[Nullable[date]] + r"""The date of birth of the employee.""" + subsidiary: NotRequired[Nullable[LinkedSubsidiaryInputTypedDict]] + tracking_categories: NotRequired[ + Nullable[List[Nullable[LinkedTrackingCategoryTypedDict]]] + ] + r"""A list of linked tracking categories.""" + currency: NotRequired[Nullable[Currency]] + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + notes: NotRequired[Nullable[str]] + r"""Notes about the employee.""" + addresses: NotRequired[List[AddressTypedDict]] + r"""Addresses of the employee.""" + phone_numbers: NotRequired[List[PhoneNumberTypedDict]] + r"""Phone numbers of the employee.""" + custom_fields: NotRequired[List[CustomFieldTypedDict]] + row_version: NotRequired[Nullable[str]] + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + pass_through: NotRequired[List[PassThroughBodyTypedDict]] + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + +class AccountingEmployeeInput(BaseModel): + display_id: OptionalNullable[str] = UNSET + r"""Id to be displayed.""" + + first_name: OptionalNullable[str] = UNSET + r"""The first name of the employee.""" + + last_name: OptionalNullable[str] = UNSET + r"""The last name of the employee.""" + + display_name: OptionalNullable[str] = UNSET + r"""The display name of the employee.""" + + emails: Optional[List[Email]] = None + r"""Email addresses of the employee.""" + + employee_number: OptionalNullable[str] = UNSET + r"""The employee number or identifier.""" + + job_title: OptionalNullable[str] = UNSET + r"""The job title of the employee.""" + + status: Annotated[ + OptionalNullable[EmployeeStatus], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""The status of the employee.""" + + is_contractor: OptionalNullable[bool] = UNSET + r"""Whether the employee is a contractor.""" + + department: OptionalNullable[LinkedDepartmentInput] = UNSET + + location: OptionalNullable[LinkedLocationInput] = UNSET + + manager: Optional[AccountingEmployeeManager] = None + r"""The manager of the employee.""" + + hire_date: OptionalNullable[date] = UNSET + r"""The date the employee was hired.""" + + termination_date: OptionalNullable[date] = UNSET + r"""The date the employee was terminated.""" + + gender: Annotated[ + OptionalNullable[Gender], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""The gender represents the gender identity of a person.""" + + birth_date: OptionalNullable[date] = UNSET + r"""The date of birth of the employee.""" + + subsidiary: OptionalNullable[LinkedSubsidiaryInput] = UNSET + + tracking_categories: OptionalNullable[List[Nullable[LinkedTrackingCategory]]] = ( + UNSET + ) + r"""A list of linked tracking categories.""" + + currency: Annotated[ + OptionalNullable[Currency], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + + notes: OptionalNullable[str] = UNSET + r"""Notes about the employee.""" + + addresses: Optional[List[Address]] = None + r"""Addresses of the employee.""" + + phone_numbers: Optional[List[PhoneNumber]] = None + r"""Phone numbers of the employee.""" + + custom_fields: Optional[List[CustomField]] = None + + row_version: OptionalNullable[str] = UNSET + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + + pass_through: Optional[List[PassThroughBody]] = None + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.EmployeeStatus(value) + except ValueError: + return value + return value + + @field_serializer("gender") + def serialize_gender(self, value): + if isinstance(value, str): + try: + return models.Gender(value) + except ValueError: + return value + return value + + @field_serializer("currency") + def serialize_currency(self, value): + if isinstance(value, str): + try: + return models.Currency(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "display_id", + "first_name", + "last_name", + "display_name", + "emails", + "employee_number", + "job_title", + "status", + "is_contractor", + "department", + "location", + "manager", + "hire_date", + "termination_date", + "gender", + "birth_date", + "subsidiary", + "tracking_categories", + "currency", + "notes", + "addresses", + "phone_numbers", + "custom_fields", + "row_version", + "pass_through", + ] + nullable_fields = [ + "display_id", + "first_name", + "last_name", + "display_name", + "employee_number", + "job_title", + "status", + "is_contractor", + "department", + "location", + "hire_date", + "termination_date", + "gender", + "birth_date", + "subsidiary", + "tracking_categories", + "currency", + "notes", + "row_version", + ] + 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/src/apideck_unify/models/accountingemployeesfilter.py b/src/apideck_unify/models/accountingemployeesfilter.py new file mode 100644 index 00000000..93f49d37 --- /dev/null +++ b/src/apideck_unify/models/accountingemployeesfilter.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from apideck_unify import models, utils +from apideck_unify.types import BaseModel +from apideck_unify.utils import FieldMetadata, validate_open_enum +from datetime import datetime +from enum import Enum +from pydantic import field_serializer +from pydantic.functional_validators import PlainValidator +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingEmployeesFilterStatus(str, Enum, metaclass=utils.OpenEnumMeta): + ACTIVE = "active" + INACTIVE = "inactive" + TERMINATED = "terminated" + + +class AccountingEmployeesFilterTypedDict(TypedDict): + updated_since: NotRequired[datetime] + status: NotRequired[AccountingEmployeesFilterStatus] + + +class AccountingEmployeesFilter(BaseModel): + updated_since: Annotated[Optional[datetime], FieldMetadata(query=True)] = None + + status: Annotated[ + Annotated[ + Optional[AccountingEmployeesFilterStatus], + PlainValidator(validate_open_enum(False)), + ], + FieldMetadata(query=True), + ] = None + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.AccountingEmployeesFilterStatus(value) + except ValueError: + return value + return value diff --git a/src/apideck_unify/models/createaccountingemployeeresponse.py b/src/apideck_unify/models/createaccountingemployeeresponse.py new file mode 100644 index 00000000..f9d5a61b --- /dev/null +++ b/src/apideck_unify/models/createaccountingemployeeresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateAccountingEmployeeResponseTypedDict(TypedDict): + r"""Employees""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class CreateAccountingEmployeeResponse(BaseModel): + r"""Employees""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/createexpensecategoryresponse.py b/src/apideck_unify/models/createexpensecategoryresponse.py new file mode 100644 index 00000000..4e131c58 --- /dev/null +++ b/src/apideck_unify/models/createexpensecategoryresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateExpenseCategoryResponseTypedDict(TypedDict): + r"""Expense Categories""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class CreateExpenseCategoryResponse(BaseModel): + r"""Expense Categories""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/createexpensereportresponse.py b/src/apideck_unify/models/createexpensereportresponse.py new file mode 100644 index 00000000..50a1b7f6 --- /dev/null +++ b/src/apideck_unify/models/createexpensereportresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateExpenseReportResponseTypedDict(TypedDict): + r"""Expense Reports""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class CreateExpenseReportResponse(BaseModel): + r"""Expense Reports""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/deleteaccountingemployeeresponse.py b/src/apideck_unify/models/deleteaccountingemployeeresponse.py new file mode 100644 index 00000000..ba557e2b --- /dev/null +++ b/src/apideck_unify/models/deleteaccountingemployeeresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DeleteAccountingEmployeeResponseTypedDict(TypedDict): + r"""Employees""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class DeleteAccountingEmployeeResponse(BaseModel): + r"""Employees""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/deleteexpensecategoryresponse.py b/src/apideck_unify/models/deleteexpensecategoryresponse.py new file mode 100644 index 00000000..ca48a944 --- /dev/null +++ b/src/apideck_unify/models/deleteexpensecategoryresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DeleteExpenseCategoryResponseTypedDict(TypedDict): + r"""Expense Categories""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class DeleteExpenseCategoryResponse(BaseModel): + r"""Expense Categories""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/deleteexpensereportresponse.py b/src/apideck_unify/models/deleteexpensereportresponse.py new file mode 100644 index 00000000..16db7db3 --- /dev/null +++ b/src/apideck_unify/models/deleteexpensereportresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DeleteExpenseReportResponseTypedDict(TypedDict): + r"""Expense Reports""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class DeleteExpenseReportResponse(BaseModel): + r"""Expense Reports""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/expensecategoriesfilter.py b/src/apideck_unify/models/expensecategoriesfilter.py new file mode 100644 index 00000000..ff6a9187 --- /dev/null +++ b/src/apideck_unify/models/expensecategoriesfilter.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from apideck_unify import models, utils +from apideck_unify.types import BaseModel +from apideck_unify.utils import FieldMetadata, validate_open_enum +from datetime import datetime +from enum import Enum +from pydantic import field_serializer +from pydantic.functional_validators import PlainValidator +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ExpenseCategoriesFilterStatus(str, Enum, metaclass=utils.OpenEnumMeta): + ACTIVE = "active" + INACTIVE = "inactive" + + +class ExpenseCategoriesFilterTypedDict(TypedDict): + updated_since: NotRequired[datetime] + status: NotRequired[ExpenseCategoriesFilterStatus] + + +class ExpenseCategoriesFilter(BaseModel): + updated_since: Annotated[Optional[datetime], FieldMetadata(query=True)] = None + + status: Annotated[ + Annotated[ + Optional[ExpenseCategoriesFilterStatus], + PlainValidator(validate_open_enum(False)), + ], + FieldMetadata(query=True), + ] = None + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.ExpenseCategoriesFilterStatus(value) + except ValueError: + return value + return value diff --git a/src/apideck_unify/models/expensecategory.py b/src/apideck_unify/models/expensecategory.py new file mode 100644 index 00000000..b42eab1c --- /dev/null +++ b/src/apideck_unify/models/expensecategory.py @@ -0,0 +1,302 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .linkedledgeraccount import LinkedLedgerAccount, LinkedLedgerAccountTypedDict +from .linkedtaxrate import LinkedTaxRate, LinkedTaxRateTypedDict +from .linkedtaxrate_input import LinkedTaxRateInput, LinkedTaxRateInputTypedDict +from .passthroughbody import PassThroughBody, PassThroughBodyTypedDict +from apideck_unify import models, utils +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import validate_open_enum +from datetime import datetime +from enum import Enum +from pydantic import field_serializer, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ExpenseCategoryStatus(str, Enum, metaclass=utils.OpenEnumMeta): + r"""The status of the expense category.""" + + ACTIVE = "active" + INACTIVE = "inactive" + + +class ExpenseCategoryTypedDict(TypedDict): + name: str + r"""The name of the expense category.""" + id: NotRequired[str] + r"""A unique identifier for an object.""" + display_id: NotRequired[Nullable[str]] + r"""Id to be displayed.""" + code: NotRequired[Nullable[str]] + r"""The code or external identifier of the expense category.""" + description: NotRequired[Nullable[str]] + r"""The description of the expense category.""" + status: NotRequired[Nullable[ExpenseCategoryStatus]] + r"""The status of the expense category.""" + account: NotRequired[Nullable[LinkedLedgerAccountTypedDict]] + offset_account: NotRequired[Nullable[LinkedLedgerAccountTypedDict]] + tax_rate: NotRequired[LinkedTaxRateTypedDict] + rate_required: NotRequired[Nullable[bool]] + r"""Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile).""" + default_rate: NotRequired[Nullable[float]] + r"""Default rate when rate_required is true (e.g. 0.67 for mileage).""" + custom_mappings: NotRequired[Nullable[Dict[str, Any]]] + r"""When custom mappings are configured on the resource, the result is included here.""" + row_version: NotRequired[Nullable[str]] + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + updated_at: NotRequired[Nullable[datetime]] + r"""The date and time when the object was last updated.""" + created_at: NotRequired[Nullable[datetime]] + r"""The date and time when the object was created.""" + pass_through: NotRequired[List[PassThroughBodyTypedDict]] + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + +class ExpenseCategory(BaseModel): + name: str + r"""The name of the expense category.""" + + id: Optional[str] = None + r"""A unique identifier for an object.""" + + display_id: OptionalNullable[str] = UNSET + r"""Id to be displayed.""" + + code: OptionalNullable[str] = UNSET + r"""The code or external identifier of the expense category.""" + + description: OptionalNullable[str] = UNSET + r"""The description of the expense category.""" + + status: Annotated[ + OptionalNullable[ExpenseCategoryStatus], + PlainValidator(validate_open_enum(False)), + ] = UNSET + r"""The status of the expense category.""" + + account: OptionalNullable[LinkedLedgerAccount] = UNSET + + offset_account: OptionalNullable[LinkedLedgerAccount] = UNSET + + tax_rate: Optional[LinkedTaxRate] = None + + rate_required: OptionalNullable[bool] = UNSET + r"""Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile).""" + + default_rate: OptionalNullable[float] = UNSET + r"""Default rate when rate_required is true (e.g. 0.67 for mileage).""" + + custom_mappings: OptionalNullable[Dict[str, Any]] = UNSET + r"""When custom mappings are configured on the resource, the result is included here.""" + + row_version: OptionalNullable[str] = UNSET + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + + updated_at: OptionalNullable[datetime] = UNSET + r"""The date and time when the object was last updated.""" + + created_at: OptionalNullable[datetime] = UNSET + r"""The date and time when the object was created.""" + + pass_through: Optional[List[PassThroughBody]] = None + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.ExpenseCategoryStatus(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "id", + "display_id", + "code", + "description", + "status", + "account", + "offset_account", + "tax_rate", + "rate_required", + "default_rate", + "custom_mappings", + "row_version", + "updated_at", + "created_at", + "pass_through", + ] + nullable_fields = [ + "display_id", + "code", + "description", + "status", + "account", + "offset_account", + "rate_required", + "default_rate", + "custom_mappings", + "row_version", + "updated_at", + "created_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 ExpenseCategoryInputTypedDict(TypedDict): + name: str + r"""The name of the expense category.""" + display_id: NotRequired[Nullable[str]] + r"""Id to be displayed.""" + code: NotRequired[Nullable[str]] + r"""The code or external identifier of the expense category.""" + description: NotRequired[Nullable[str]] + r"""The description of the expense category.""" + status: NotRequired[Nullable[ExpenseCategoryStatus]] + r"""The status of the expense category.""" + account: NotRequired[Nullable[LinkedLedgerAccountTypedDict]] + offset_account: NotRequired[Nullable[LinkedLedgerAccountTypedDict]] + tax_rate: NotRequired[LinkedTaxRateInputTypedDict] + rate_required: NotRequired[Nullable[bool]] + r"""Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile).""" + default_rate: NotRequired[Nullable[float]] + r"""Default rate when rate_required is true (e.g. 0.67 for mileage).""" + row_version: NotRequired[Nullable[str]] + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + pass_through: NotRequired[List[PassThroughBodyTypedDict]] + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + +class ExpenseCategoryInput(BaseModel): + name: str + r"""The name of the expense category.""" + + display_id: OptionalNullable[str] = UNSET + r"""Id to be displayed.""" + + code: OptionalNullable[str] = UNSET + r"""The code or external identifier of the expense category.""" + + description: OptionalNullable[str] = UNSET + r"""The description of the expense category.""" + + status: Annotated[ + OptionalNullable[ExpenseCategoryStatus], + PlainValidator(validate_open_enum(False)), + ] = UNSET + r"""The status of the expense category.""" + + account: OptionalNullable[LinkedLedgerAccount] = UNSET + + offset_account: OptionalNullable[LinkedLedgerAccount] = UNSET + + tax_rate: Optional[LinkedTaxRateInput] = None + + rate_required: OptionalNullable[bool] = UNSET + r"""Whether the expense category requires rate/quantity entry (e.g. mileage at $/mile).""" + + default_rate: OptionalNullable[float] = UNSET + r"""Default rate when rate_required is true (e.g. 0.67 for mileage).""" + + row_version: OptionalNullable[str] = UNSET + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + + pass_through: Optional[List[PassThroughBody]] = None + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.ExpenseCategoryStatus(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "display_id", + "code", + "description", + "status", + "account", + "offset_account", + "tax_rate", + "rate_required", + "default_rate", + "row_version", + "pass_through", + ] + nullable_fields = [ + "display_id", + "code", + "description", + "status", + "account", + "offset_account", + "rate_required", + "default_rate", + "row_version", + ] + 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/src/apideck_unify/models/expensereport.py b/src/apideck_unify/models/expensereport.py new file mode 100644 index 00000000..16fb8fc0 --- /dev/null +++ b/src/apideck_unify/models/expensereport.py @@ -0,0 +1,700 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .currency import Currency +from .customfield import CustomField, CustomFieldTypedDict +from .expensereportlineitem import ( + ExpenseReportLineItem, + ExpenseReportLineItemInput, + ExpenseReportLineItemInputTypedDict, + ExpenseReportLineItemTypedDict, +) +from .linkeddepartment import LinkedDepartment, LinkedDepartmentTypedDict +from .linkeddepartment_input import ( + LinkedDepartmentInput, + LinkedDepartmentInputTypedDict, +) +from .linkedledgeraccount import LinkedLedgerAccount, LinkedLedgerAccountTypedDict +from .linkedlocation import LinkedLocation, LinkedLocationTypedDict +from .linkedlocation_input import LinkedLocationInput, LinkedLocationInputTypedDict +from .linkedsubsidiary import LinkedSubsidiary, LinkedSubsidiaryTypedDict +from .linkedsubsidiary_input import ( + LinkedSubsidiaryInput, + LinkedSubsidiaryInputTypedDict, +) +from .linkedtrackingcategory import ( + LinkedTrackingCategory, + LinkedTrackingCategoryTypedDict, +) +from .passthroughbody import PassThroughBody, PassThroughBodyTypedDict +from apideck_unify import models, utils +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import validate_open_enum +from datetime import date, datetime +from enum import Enum +from pydantic import field_serializer, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ExpenseReportEmployeeTypedDict(TypedDict): + r"""The employee who submitted the expense report.""" + + id: NotRequired[str] + r"""A unique identifier for the employee.""" + display_name: NotRequired[Nullable[str]] + r"""The display name of the employee.""" + + +class ExpenseReportEmployee(BaseModel): + r"""The employee who submitted the expense report.""" + + id: Optional[str] = None + r"""A unique identifier for the employee.""" + + display_name: OptionalNullable[str] = UNSET + r"""The display name of the employee.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "display_name"] + nullable_fields = ["display_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 + + +class ExpenseReportStatus(str, Enum, metaclass=utils.OpenEnumMeta): + r"""The status of the expense report.""" + + DRAFT = "draft" + SUBMITTED = "submitted" + APPROVED = "approved" + REIMBURSED = "reimbursed" + REJECTED = "rejected" + REVERSED = "reversed" + VOIDED = "voided" + + +class AccountingPeriodTypedDict(TypedDict): + r"""The accounting period the expense report is posted to.""" + + id: NotRequired[str] + r"""A unique identifier for the accounting period.""" + name: NotRequired[Nullable[str]] + r"""The name of the accounting period.""" + + +class AccountingPeriod(BaseModel): + r"""The accounting period the expense report is posted to.""" + + id: Optional[str] = None + r"""A unique identifier for the accounting period.""" + + name: OptionalNullable[str] = UNSET + r"""The name of the accounting period.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "name"] + nullable_fields = ["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 + + +class ApprovedByTypedDict(TypedDict): + r"""The person who approved the expense report.""" + + id: NotRequired[str] + r"""A unique identifier for the approver.""" + display_name: NotRequired[Nullable[str]] + r"""The display name of the approver.""" + + +class ApprovedBy(BaseModel): + r"""The person who approved the expense report.""" + + id: Optional[str] = None + r"""A unique identifier for the approver.""" + + display_name: OptionalNullable[str] = UNSET + r"""The display name of the approver.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "display_name"] + nullable_fields = ["display_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 + + +class ExpenseReportTypedDict(TypedDict): + employee: ExpenseReportEmployeeTypedDict + r"""The employee who submitted the expense report.""" + transaction_date: Nullable[datetime] + r"""The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD""" + line_items: List[ExpenseReportLineItemTypedDict] + r"""Expense line items linked to this expense report.""" + id: NotRequired[str] + r"""A unique identifier for an object.""" + display_id: NotRequired[Nullable[str]] + r"""Id to be displayed.""" + number: NotRequired[Nullable[str]] + r"""The expense report number.""" + title: NotRequired[Nullable[str]] + r"""Title or purpose of the expense report.""" + status: NotRequired[Nullable[ExpenseReportStatus]] + r"""The status of the expense report.""" + posting_date: NotRequired[Nullable[date]] + r"""The date the expense report was posted to the general ledger.""" + due_date: NotRequired[Nullable[date]] + r"""Date when reimbursement is due.""" + currency: NotRequired[Nullable[Currency]] + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + currency_rate: NotRequired[Nullable[float]] + r"""Currency Exchange Rate at the time entity was recorded/generated.""" + sub_total: NotRequired[Nullable[float]] + r"""Subtotal amount, normally before tax.""" + total_tax: NotRequired[Nullable[float]] + r"""Total tax amount applied to this transaction.""" + total_amount: NotRequired[Nullable[float]] + r"""Total amount of all expense lines including tax.""" + reimbursable_amount: NotRequired[Nullable[float]] + r"""Total reimbursable amount (may differ from total if some expenses are non-reimbursable).""" + memo: NotRequired[Nullable[str]] + r"""The memo of the expense report.""" + department: NotRequired[Nullable[LinkedDepartmentTypedDict]] + location: NotRequired[Nullable[LinkedLocationTypedDict]] + account: NotRequired[Nullable[LinkedLedgerAccountTypedDict]] + accounting_period: NotRequired[Nullable[AccountingPeriodTypedDict]] + r"""The accounting period the expense report is posted to.""" + subsidiary: NotRequired[Nullable[LinkedSubsidiaryTypedDict]] + tracking_categories: NotRequired[ + Nullable[List[Nullable[LinkedTrackingCategoryTypedDict]]] + ] + r"""A list of linked tracking categories.""" + tax_inclusive: NotRequired[Nullable[bool]] + r"""Amounts are including tax""" + approved_by: NotRequired[Nullable[ApprovedByTypedDict]] + r"""The person who approved the expense report.""" + custom_fields: NotRequired[List[CustomFieldTypedDict]] + custom_mappings: NotRequired[Nullable[Dict[str, Any]]] + r"""When custom mappings are configured on the resource, the result is included here.""" + row_version: NotRequired[Nullable[str]] + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + updated_at: NotRequired[Nullable[datetime]] + r"""The date and time when the object was last updated.""" + created_at: NotRequired[Nullable[datetime]] + r"""The date and time when the object was created.""" + pass_through: NotRequired[List[PassThroughBodyTypedDict]] + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + +class ExpenseReport(BaseModel): + employee: ExpenseReportEmployee + r"""The employee who submitted the expense report.""" + + transaction_date: Nullable[datetime] + r"""The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD""" + + line_items: List[ExpenseReportLineItem] + r"""Expense line items linked to this expense report.""" + + id: Optional[str] = None + r"""A unique identifier for an object.""" + + display_id: OptionalNullable[str] = UNSET + r"""Id to be displayed.""" + + number: OptionalNullable[str] = UNSET + r"""The expense report number.""" + + title: OptionalNullable[str] = UNSET + r"""Title or purpose of the expense report.""" + + status: Annotated[ + OptionalNullable[ExpenseReportStatus], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""The status of the expense report.""" + + posting_date: OptionalNullable[date] = UNSET + r"""The date the expense report was posted to the general ledger.""" + + due_date: OptionalNullable[date] = UNSET + r"""Date when reimbursement is due.""" + + currency: Annotated[ + OptionalNullable[Currency], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + + currency_rate: OptionalNullable[float] = UNSET + r"""Currency Exchange Rate at the time entity was recorded/generated.""" + + sub_total: OptionalNullable[float] = UNSET + r"""Subtotal amount, normally before tax.""" + + total_tax: OptionalNullable[float] = UNSET + r"""Total tax amount applied to this transaction.""" + + total_amount: OptionalNullable[float] = UNSET + r"""Total amount of all expense lines including tax.""" + + reimbursable_amount: OptionalNullable[float] = UNSET + r"""Total reimbursable amount (may differ from total if some expenses are non-reimbursable).""" + + memo: OptionalNullable[str] = UNSET + r"""The memo of the expense report.""" + + department: OptionalNullable[LinkedDepartment] = UNSET + + location: OptionalNullable[LinkedLocation] = UNSET + + account: OptionalNullable[LinkedLedgerAccount] = UNSET + + accounting_period: OptionalNullable[AccountingPeriod] = UNSET + r"""The accounting period the expense report is posted to.""" + + subsidiary: OptionalNullable[LinkedSubsidiary] = UNSET + + tracking_categories: OptionalNullable[List[Nullable[LinkedTrackingCategory]]] = ( + UNSET + ) + r"""A list of linked tracking categories.""" + + tax_inclusive: OptionalNullable[bool] = UNSET + r"""Amounts are including tax""" + + approved_by: OptionalNullable[ApprovedBy] = UNSET + r"""The person who approved the expense report.""" + + custom_fields: Optional[List[CustomField]] = None + + custom_mappings: OptionalNullable[Dict[str, Any]] = UNSET + r"""When custom mappings are configured on the resource, the result is included here.""" + + row_version: OptionalNullable[str] = UNSET + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + + updated_at: OptionalNullable[datetime] = UNSET + r"""The date and time when the object was last updated.""" + + created_at: OptionalNullable[datetime] = UNSET + r"""The date and time when the object was created.""" + + pass_through: Optional[List[PassThroughBody]] = None + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.ExpenseReportStatus(value) + except ValueError: + return value + return value + + @field_serializer("currency") + def serialize_currency(self, value): + if isinstance(value, str): + try: + return models.Currency(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "id", + "display_id", + "number", + "title", + "status", + "posting_date", + "due_date", + "currency", + "currency_rate", + "sub_total", + "total_tax", + "total_amount", + "reimbursable_amount", + "memo", + "department", + "location", + "account", + "accounting_period", + "subsidiary", + "tracking_categories", + "tax_inclusive", + "approved_by", + "custom_fields", + "custom_mappings", + "row_version", + "updated_at", + "created_at", + "pass_through", + ] + nullable_fields = [ + "display_id", + "number", + "title", + "status", + "transaction_date", + "posting_date", + "due_date", + "currency", + "currency_rate", + "sub_total", + "total_tax", + "total_amount", + "reimbursable_amount", + "memo", + "department", + "location", + "account", + "accounting_period", + "subsidiary", + "tracking_categories", + "tax_inclusive", + "approved_by", + "custom_mappings", + "row_version", + "updated_at", + "created_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 ExpenseReportInputTypedDict(TypedDict): + employee: ExpenseReportEmployeeTypedDict + r"""The employee who submitted the expense report.""" + transaction_date: Nullable[datetime] + r"""The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD""" + line_items: List[ExpenseReportLineItemInputTypedDict] + r"""Expense line items linked to this expense report.""" + display_id: NotRequired[Nullable[str]] + r"""Id to be displayed.""" + number: NotRequired[Nullable[str]] + r"""The expense report number.""" + title: NotRequired[Nullable[str]] + r"""Title or purpose of the expense report.""" + status: NotRequired[Nullable[ExpenseReportStatus]] + r"""The status of the expense report.""" + posting_date: NotRequired[Nullable[date]] + r"""The date the expense report was posted to the general ledger.""" + due_date: NotRequired[Nullable[date]] + r"""Date when reimbursement is due.""" + currency: NotRequired[Nullable[Currency]] + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + currency_rate: NotRequired[Nullable[float]] + r"""Currency Exchange Rate at the time entity was recorded/generated.""" + sub_total: NotRequired[Nullable[float]] + r"""Subtotal amount, normally before tax.""" + total_tax: NotRequired[Nullable[float]] + r"""Total tax amount applied to this transaction.""" + total_amount: NotRequired[Nullable[float]] + r"""Total amount of all expense lines including tax.""" + reimbursable_amount: NotRequired[Nullable[float]] + r"""Total reimbursable amount (may differ from total if some expenses are non-reimbursable).""" + memo: NotRequired[Nullable[str]] + r"""The memo of the expense report.""" + department: NotRequired[Nullable[LinkedDepartmentInputTypedDict]] + location: NotRequired[Nullable[LinkedLocationInputTypedDict]] + account: NotRequired[Nullable[LinkedLedgerAccountTypedDict]] + accounting_period: NotRequired[Nullable[AccountingPeriodTypedDict]] + r"""The accounting period the expense report is posted to.""" + subsidiary: NotRequired[Nullable[LinkedSubsidiaryInputTypedDict]] + tracking_categories: NotRequired[ + Nullable[List[Nullable[LinkedTrackingCategoryTypedDict]]] + ] + r"""A list of linked tracking categories.""" + tax_inclusive: NotRequired[Nullable[bool]] + r"""Amounts are including tax""" + approved_by: NotRequired[Nullable[ApprovedByTypedDict]] + r"""The person who approved the expense report.""" + custom_fields: NotRequired[List[CustomFieldTypedDict]] + row_version: NotRequired[Nullable[str]] + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + pass_through: NotRequired[List[PassThroughBodyTypedDict]] + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + +class ExpenseReportInput(BaseModel): + employee: ExpenseReportEmployee + r"""The employee who submitted the expense report.""" + + transaction_date: Nullable[datetime] + r"""The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD""" + + line_items: List[ExpenseReportLineItemInput] + r"""Expense line items linked to this expense report.""" + + display_id: OptionalNullable[str] = UNSET + r"""Id to be displayed.""" + + number: OptionalNullable[str] = UNSET + r"""The expense report number.""" + + title: OptionalNullable[str] = UNSET + r"""Title or purpose of the expense report.""" + + status: Annotated[ + OptionalNullable[ExpenseReportStatus], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""The status of the expense report.""" + + posting_date: OptionalNullable[date] = UNSET + r"""The date the expense report was posted to the general ledger.""" + + due_date: OptionalNullable[date] = UNSET + r"""Date when reimbursement is due.""" + + currency: Annotated[ + OptionalNullable[Currency], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + + currency_rate: OptionalNullable[float] = UNSET + r"""Currency Exchange Rate at the time entity was recorded/generated.""" + + sub_total: OptionalNullable[float] = UNSET + r"""Subtotal amount, normally before tax.""" + + total_tax: OptionalNullable[float] = UNSET + r"""Total tax amount applied to this transaction.""" + + total_amount: OptionalNullable[float] = UNSET + r"""Total amount of all expense lines including tax.""" + + reimbursable_amount: OptionalNullable[float] = UNSET + r"""Total reimbursable amount (may differ from total if some expenses are non-reimbursable).""" + + memo: OptionalNullable[str] = UNSET + r"""The memo of the expense report.""" + + department: OptionalNullable[LinkedDepartmentInput] = UNSET + + location: OptionalNullable[LinkedLocationInput] = UNSET + + account: OptionalNullable[LinkedLedgerAccount] = UNSET + + accounting_period: OptionalNullable[AccountingPeriod] = UNSET + r"""The accounting period the expense report is posted to.""" + + subsidiary: OptionalNullable[LinkedSubsidiaryInput] = UNSET + + tracking_categories: OptionalNullable[List[Nullable[LinkedTrackingCategory]]] = ( + UNSET + ) + r"""A list of linked tracking categories.""" + + tax_inclusive: OptionalNullable[bool] = UNSET + r"""Amounts are including tax""" + + approved_by: OptionalNullable[ApprovedBy] = UNSET + r"""The person who approved the expense report.""" + + custom_fields: Optional[List[CustomField]] = None + + row_version: OptionalNullable[str] = UNSET + r"""A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.""" + + pass_through: Optional[List[PassThroughBody]] = None + r"""The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.""" + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.ExpenseReportStatus(value) + except ValueError: + return value + return value + + @field_serializer("currency") + def serialize_currency(self, value): + if isinstance(value, str): + try: + return models.Currency(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "display_id", + "number", + "title", + "status", + "posting_date", + "due_date", + "currency", + "currency_rate", + "sub_total", + "total_tax", + "total_amount", + "reimbursable_amount", + "memo", + "department", + "location", + "account", + "accounting_period", + "subsidiary", + "tracking_categories", + "tax_inclusive", + "approved_by", + "custom_fields", + "row_version", + "pass_through", + ] + nullable_fields = [ + "display_id", + "number", + "title", + "status", + "transaction_date", + "posting_date", + "due_date", + "currency", + "currency_rate", + "sub_total", + "total_tax", + "total_amount", + "reimbursable_amount", + "memo", + "department", + "location", + "account", + "accounting_period", + "subsidiary", + "tracking_categories", + "tax_inclusive", + "approved_by", + "row_version", + ] + 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/src/apideck_unify/models/expensereportlineitem.py b/src/apideck_unify/models/expensereportlineitem.py new file mode 100644 index 00000000..0b174840 --- /dev/null +++ b/src/apideck_unify/models/expensereportlineitem.py @@ -0,0 +1,413 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .currency import Currency +from .linkedcustomer import LinkedCustomer, LinkedCustomerTypedDict +from .linkedcustomer_input import LinkedCustomerInput, LinkedCustomerInputTypedDict +from .linkeddepartment import LinkedDepartment, LinkedDepartmentTypedDict +from .linkeddepartment_input import ( + LinkedDepartmentInput, + LinkedDepartmentInputTypedDict, +) +from .linkedledgeraccount import LinkedLedgerAccount, LinkedLedgerAccountTypedDict +from .linkedlocation import LinkedLocation, LinkedLocationTypedDict +from .linkedlocation_input import LinkedLocationInput, LinkedLocationInputTypedDict +from .linkedtaxrate import LinkedTaxRate, LinkedTaxRateTypedDict +from .linkedtaxrate_input import LinkedTaxRateInput, LinkedTaxRateInputTypedDict +from .linkedtrackingcategory import ( + LinkedTrackingCategory, + LinkedTrackingCategoryTypedDict, +) +from apideck_unify import models +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import validate_open_enum +from datetime import date +from pydantic import field_serializer, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ExpenseReportLineItemExpenseCategoryTypedDict(TypedDict): + r"""The expense category for this line item.""" + + id: NotRequired[str] + r"""A unique identifier for the expense category.""" + name: NotRequired[Nullable[str]] + r"""The name of the expense category.""" + + +class ExpenseReportLineItemExpenseCategory(BaseModel): + r"""The expense category for this line item.""" + + id: Optional[str] = None + r"""A unique identifier for the expense category.""" + + name: OptionalNullable[str] = UNSET + r"""The name of the expense category.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "name"] + nullable_fields = ["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 + + +class ExpenseReportLineItemTypedDict(TypedDict): + amount: float + r"""The amount of the expense line item.""" + id: NotRequired[str] + r"""A unique identifier for an object.""" + expense_category: NotRequired[ExpenseReportLineItemExpenseCategoryTypedDict] + r"""The expense category for this line item.""" + account: NotRequired[Nullable[LinkedLedgerAccountTypedDict]] + description: NotRequired[Nullable[str]] + r"""The description of the expense line item.""" + quantity: NotRequired[Nullable[float]] + unit_price: NotRequired[Nullable[float]] + tax_rate: NotRequired[LinkedTaxRateTypedDict] + tax_amount: NotRequired[Nullable[float]] + r"""Tax amount""" + total_amount: NotRequired[Nullable[float]] + r"""The total amount of the expense line item including tax.""" + transaction_date: NotRequired[Nullable[date]] + r"""The date of the individual expense.""" + billable: NotRequired[Nullable[bool]] + r"""Whether the expense is billable to a customer.""" + reimbursable: NotRequired[Nullable[bool]] + r"""Whether the expense is reimbursable to the employee.""" + customer: NotRequired[Nullable[LinkedCustomerTypedDict]] + r"""The customer this entity is linked to.""" + department: NotRequired[Nullable[LinkedDepartmentTypedDict]] + location: NotRequired[Nullable[LinkedLocationTypedDict]] + tracking_categories: NotRequired[ + Nullable[List[Nullable[LinkedTrackingCategoryTypedDict]]] + ] + r"""A list of linked tracking categories.""" + receipt_url: NotRequired[Nullable[str]] + r"""URL to the receipt or attachment for this expense line.""" + currency: NotRequired[Nullable[Currency]] + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + + +class ExpenseReportLineItem(BaseModel): + amount: float + r"""The amount of the expense line item.""" + + id: Optional[str] = None + r"""A unique identifier for an object.""" + + expense_category: Optional[ExpenseReportLineItemExpenseCategory] = None + r"""The expense category for this line item.""" + + account: OptionalNullable[LinkedLedgerAccount] = UNSET + + description: OptionalNullable[str] = UNSET + r"""The description of the expense line item.""" + + quantity: OptionalNullable[float] = UNSET + + unit_price: OptionalNullable[float] = UNSET + + tax_rate: Optional[LinkedTaxRate] = None + + tax_amount: OptionalNullable[float] = UNSET + r"""Tax amount""" + + total_amount: OptionalNullable[float] = UNSET + r"""The total amount of the expense line item including tax.""" + + transaction_date: OptionalNullable[date] = UNSET + r"""The date of the individual expense.""" + + billable: OptionalNullable[bool] = UNSET + r"""Whether the expense is billable to a customer.""" + + reimbursable: OptionalNullable[bool] = UNSET + r"""Whether the expense is reimbursable to the employee.""" + + customer: OptionalNullable[LinkedCustomer] = UNSET + r"""The customer this entity is linked to.""" + + department: OptionalNullable[LinkedDepartment] = UNSET + + location: OptionalNullable[LinkedLocation] = UNSET + + tracking_categories: OptionalNullable[List[Nullable[LinkedTrackingCategory]]] = ( + UNSET + ) + r"""A list of linked tracking categories.""" + + receipt_url: OptionalNullable[str] = UNSET + r"""URL to the receipt or attachment for this expense line.""" + + currency: Annotated[ + OptionalNullable[Currency], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + + @field_serializer("currency") + def serialize_currency(self, value): + if isinstance(value, str): + try: + return models.Currency(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "id", + "expense_category", + "account", + "description", + "quantity", + "unit_price", + "tax_rate", + "tax_amount", + "total_amount", + "transaction_date", + "billable", + "reimbursable", + "customer", + "department", + "location", + "tracking_categories", + "receipt_url", + "currency", + ] + nullable_fields = [ + "account", + "description", + "quantity", + "unit_price", + "tax_amount", + "total_amount", + "transaction_date", + "billable", + "reimbursable", + "customer", + "department", + "location", + "tracking_categories", + "receipt_url", + "currency", + ] + 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 ExpenseReportLineItemInputTypedDict(TypedDict): + amount: float + r"""The amount of the expense line item.""" + expense_category: NotRequired[ExpenseReportLineItemExpenseCategoryTypedDict] + r"""The expense category for this line item.""" + account: NotRequired[Nullable[LinkedLedgerAccountTypedDict]] + description: NotRequired[Nullable[str]] + r"""The description of the expense line item.""" + quantity: NotRequired[Nullable[float]] + unit_price: NotRequired[Nullable[float]] + tax_rate: NotRequired[LinkedTaxRateInputTypedDict] + tax_amount: NotRequired[Nullable[float]] + r"""Tax amount""" + total_amount: NotRequired[Nullable[float]] + r"""The total amount of the expense line item including tax.""" + transaction_date: NotRequired[Nullable[date]] + r"""The date of the individual expense.""" + billable: NotRequired[Nullable[bool]] + r"""Whether the expense is billable to a customer.""" + reimbursable: NotRequired[Nullable[bool]] + r"""Whether the expense is reimbursable to the employee.""" + customer: NotRequired[Nullable[LinkedCustomerInputTypedDict]] + r"""The customer this entity is linked to.""" + department: NotRequired[Nullable[LinkedDepartmentInputTypedDict]] + location: NotRequired[Nullable[LinkedLocationInputTypedDict]] + tracking_categories: NotRequired[ + Nullable[List[Nullable[LinkedTrackingCategoryTypedDict]]] + ] + r"""A list of linked tracking categories.""" + receipt_url: NotRequired[Nullable[str]] + r"""URL to the receipt or attachment for this expense line.""" + currency: NotRequired[Nullable[Currency]] + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + + +class ExpenseReportLineItemInput(BaseModel): + amount: float + r"""The amount of the expense line item.""" + + expense_category: Optional[ExpenseReportLineItemExpenseCategory] = None + r"""The expense category for this line item.""" + + account: OptionalNullable[LinkedLedgerAccount] = UNSET + + description: OptionalNullable[str] = UNSET + r"""The description of the expense line item.""" + + quantity: OptionalNullable[float] = UNSET + + unit_price: OptionalNullable[float] = UNSET + + tax_rate: Optional[LinkedTaxRateInput] = None + + tax_amount: OptionalNullable[float] = UNSET + r"""Tax amount""" + + total_amount: OptionalNullable[float] = UNSET + r"""The total amount of the expense line item including tax.""" + + transaction_date: OptionalNullable[date] = UNSET + r"""The date of the individual expense.""" + + billable: OptionalNullable[bool] = UNSET + r"""Whether the expense is billable to a customer.""" + + reimbursable: OptionalNullable[bool] = UNSET + r"""Whether the expense is reimbursable to the employee.""" + + customer: OptionalNullable[LinkedCustomerInput] = UNSET + r"""The customer this entity is linked to.""" + + department: OptionalNullable[LinkedDepartmentInput] = UNSET + + location: OptionalNullable[LinkedLocationInput] = UNSET + + tracking_categories: OptionalNullable[List[Nullable[LinkedTrackingCategory]]] = ( + UNSET + ) + r"""A list of linked tracking categories.""" + + receipt_url: OptionalNullable[str] = UNSET + r"""URL to the receipt or attachment for this expense line.""" + + currency: Annotated[ + OptionalNullable[Currency], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + + @field_serializer("currency") + def serialize_currency(self, value): + if isinstance(value, str): + try: + return models.Currency(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "expense_category", + "account", + "description", + "quantity", + "unit_price", + "tax_rate", + "tax_amount", + "total_amount", + "transaction_date", + "billable", + "reimbursable", + "customer", + "department", + "location", + "tracking_categories", + "receipt_url", + "currency", + ] + nullable_fields = [ + "account", + "description", + "quantity", + "unit_price", + "tax_amount", + "total_amount", + "transaction_date", + "billable", + "reimbursable", + "customer", + "department", + "location", + "tracking_categories", + "receipt_url", + "currency", + ] + 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/src/apideck_unify/models/expensereportsfilter.py b/src/apideck_unify/models/expensereportsfilter.py new file mode 100644 index 00000000..580aa071 --- /dev/null +++ b/src/apideck_unify/models/expensereportsfilter.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from apideck_unify import models, utils +from apideck_unify.types import BaseModel +from apideck_unify.utils import FieldMetadata, validate_open_enum +from datetime import datetime +from enum import Enum +from pydantic import field_serializer +from pydantic.functional_validators import PlainValidator +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ExpenseReportsFilterStatus(str, Enum, metaclass=utils.OpenEnumMeta): + DRAFT = "draft" + SUBMITTED = "submitted" + APPROVED = "approved" + REIMBURSED = "reimbursed" + REJECTED = "rejected" + REVERSED = "reversed" + VOIDED = "voided" + + +class ExpenseReportsFilterTypedDict(TypedDict): + updated_since: NotRequired[datetime] + status: NotRequired[ExpenseReportsFilterStatus] + employee_id: NotRequired[str] + r"""Filter by employee ID""" + + +class ExpenseReportsFilter(BaseModel): + updated_since: Annotated[Optional[datetime], FieldMetadata(query=True)] = None + + status: Annotated[ + Annotated[ + Optional[ExpenseReportsFilterStatus], + PlainValidator(validate_open_enum(False)), + ], + FieldMetadata(query=True), + ] = None + + employee_id: Annotated[Optional[str], FieldMetadata(query=True)] = None + r"""Filter by employee ID""" + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.ExpenseReportsFilterStatus(value) + except ValueError: + return value + return value diff --git a/src/apideck_unify/models/getaccountingemployeeresponse.py b/src/apideck_unify/models/getaccountingemployeeresponse.py new file mode 100644 index 00000000..cb9c10de --- /dev/null +++ b/src/apideck_unify/models/getaccountingemployeeresponse.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .accountingemployee import AccountingEmployee, AccountingEmployeeTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetAccountingEmployeeResponseTypedDict(TypedDict): + r"""Employees""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: AccountingEmployeeTypedDict + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class GetAccountingEmployeeResponse(BaseModel): + r"""Employees""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: AccountingEmployee + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/getaccountingemployeesresponse.py b/src/apideck_unify/models/getaccountingemployeesresponse.py new file mode 100644 index 00000000..0e4693a4 --- /dev/null +++ b/src/apideck_unify/models/getaccountingemployeesresponse.py @@ -0,0 +1,101 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .accountingemployee import AccountingEmployee, AccountingEmployeeTypedDict +from .links import Links, LinksTypedDict +from .meta import Meta, MetaTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetAccountingEmployeesResponseTypedDict(TypedDict): + r"""Employees""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: List[AccountingEmployeeTypedDict] + meta: NotRequired[MetaTypedDict] + r"""Response metadata""" + links: NotRequired[LinksTypedDict] + r"""Links to navigate to previous or next pages through the API""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class GetAccountingEmployeesResponse(BaseModel): + r"""Employees""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: List[AccountingEmployee] + + meta: Optional[Meta] = None + r"""Response metadata""" + + links: Optional[Links] = None + r"""Links to navigate to previous or next pages through the API""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["meta", "links", "_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/getexpensecategoriesresponse.py b/src/apideck_unify/models/getexpensecategoriesresponse.py new file mode 100644 index 00000000..77b8a473 --- /dev/null +++ b/src/apideck_unify/models/getexpensecategoriesresponse.py @@ -0,0 +1,101 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .expensecategory import ExpenseCategory, ExpenseCategoryTypedDict +from .links import Links, LinksTypedDict +from .meta import Meta, MetaTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetExpenseCategoriesResponseTypedDict(TypedDict): + r"""Expense Categories""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: List[ExpenseCategoryTypedDict] + meta: NotRequired[MetaTypedDict] + r"""Response metadata""" + links: NotRequired[LinksTypedDict] + r"""Links to navigate to previous or next pages through the API""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class GetExpenseCategoriesResponse(BaseModel): + r"""Expense Categories""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: List[ExpenseCategory] + + meta: Optional[Meta] = None + r"""Response metadata""" + + links: Optional[Links] = None + r"""Links to navigate to previous or next pages through the API""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["meta", "links", "_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/getexpensecategoryresponse.py b/src/apideck_unify/models/getexpensecategoryresponse.py new file mode 100644 index 00000000..e975ee81 --- /dev/null +++ b/src/apideck_unify/models/getexpensecategoryresponse.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .expensecategory import ExpenseCategory, ExpenseCategoryTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetExpenseCategoryResponseTypedDict(TypedDict): + r"""Expense Categories""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: ExpenseCategoryTypedDict + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class GetExpenseCategoryResponse(BaseModel): + r"""Expense Categories""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: ExpenseCategory + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/getexpensereportresponse.py b/src/apideck_unify/models/getexpensereportresponse.py new file mode 100644 index 00000000..c1effe45 --- /dev/null +++ b/src/apideck_unify/models/getexpensereportresponse.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .expensereport import ExpenseReport, ExpenseReportTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetExpenseReportResponseTypedDict(TypedDict): + r"""Expense Reports""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: ExpenseReportTypedDict + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class GetExpenseReportResponse(BaseModel): + r"""Expense Reports""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: ExpenseReport + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/getexpensereportsresponse.py b/src/apideck_unify/models/getexpensereportsresponse.py new file mode 100644 index 00000000..79629975 --- /dev/null +++ b/src/apideck_unify/models/getexpensereportsresponse.py @@ -0,0 +1,101 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .expensereport import ExpenseReport, ExpenseReportTypedDict +from .links import Links, LinksTypedDict +from .meta import Meta, MetaTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetExpenseReportsResponseTypedDict(TypedDict): + r"""Expense Reports""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: List[ExpenseReportTypedDict] + meta: NotRequired[MetaTypedDict] + r"""Response metadata""" + links: NotRequired[LinksTypedDict] + r"""Links to navigate to previous or next pages through the API""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class GetExpenseReportsResponse(BaseModel): + r"""Expense Reports""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: List[ExpenseReport] + + meta: Optional[Meta] = None + r"""Response metadata""" + + links: Optional[Links] = None + r"""Links to navigate to previous or next pages through the API""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["meta", "links", "_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/linkedsubsidiary.py b/src/apideck_unify/models/linkedsubsidiary.py new file mode 100644 index 00000000..32873d52 --- /dev/null +++ b/src/apideck_unify/models/linkedsubsidiary.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class LinkedSubsidiaryTypedDict(TypedDict): + id: NotRequired[str] + r"""A unique identifier for an object.""" + display_id: NotRequired[Nullable[str]] + r"""Id to be displayed.""" + name: NotRequired[Nullable[str]] + r"""The name of the resource.""" + + +class LinkedSubsidiary(BaseModel): + id: Optional[str] = None + r"""A unique identifier for an object.""" + + display_id: OptionalNullable[str] = UNSET + r"""Id to be displayed.""" + + name: OptionalNullable[str] = UNSET + r"""The name of the resource.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "display_id", "name"] + nullable_fields = ["display_id", "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/src/apideck_unify/models/linkedsubsidiary_input.py b/src/apideck_unify/models/linkedsubsidiary_input.py new file mode 100644 index 00000000..2f42322b --- /dev/null +++ b/src/apideck_unify/models/linkedsubsidiary_input.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class LinkedSubsidiaryInputTypedDict(TypedDict): + display_id: NotRequired[Nullable[str]] + r"""Id to be displayed.""" + name: NotRequired[Nullable[str]] + r"""The name of the resource.""" + + +class LinkedSubsidiaryInput(BaseModel): + display_id: OptionalNullable[str] = UNSET + r"""Id to be displayed.""" + + name: OptionalNullable[str] = UNSET + r"""The name of the resource.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["display_id", "name"] + nullable_fields = ["display_id", "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/src/apideck_unify/models/updateaccountingemployeeresponse.py b/src/apideck_unify/models/updateaccountingemployeeresponse.py new file mode 100644 index 00000000..8d58f1b9 --- /dev/null +++ b/src/apideck_unify/models/updateaccountingemployeeresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class UpdateAccountingEmployeeResponseTypedDict(TypedDict): + r"""Employees""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class UpdateAccountingEmployeeResponse(BaseModel): + r"""Employees""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/updateexpensecategoryresponse.py b/src/apideck_unify/models/updateexpensecategoryresponse.py new file mode 100644 index 00000000..f55947e1 --- /dev/null +++ b/src/apideck_unify/models/updateexpensecategoryresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class UpdateExpenseCategoryResponseTypedDict(TypedDict): + r"""Expense Categories""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class UpdateExpenseCategoryResponse(BaseModel): + r"""Expense Categories""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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/src/apideck_unify/models/updateexpensereportresponse.py b/src/apideck_unify/models/updateexpensereportresponse.py new file mode 100644 index 00000000..a8d626aa --- /dev/null +++ b/src/apideck_unify/models/updateexpensereportresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class UpdateExpenseReportResponseTypedDict(TypedDict): + r"""Expense Reports""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class UpdateExpenseReportResponse(BaseModel): + r"""Expense Reports""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + 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 From cf52e0e206573f5ae6576d93de2680b1b307d6ac Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Fri, 20 Feb 2026 13:58:39 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow